learning_c/hello_world/SimpleMakefile

13 lines
255 B
Plaintext

CC := gcc
OPTIMIZATION := -O3
CFLAGS = $(OPTIMIZATION) -Werror -Wextra -Wall -Wpedantic
all: helloworld
#could be automatically built from implicit rules.
helloworld: src/helloworld.c
mkdir -p build
$(CC) $(CFLAGS) -o build/$@ $^
clean:
rm -rf build