15 lines
272 B
Makefile
15 lines
272 B
Makefile
SRC = $(wildcard *.c)
|
|
OBJ = $(filter-out build/main.o build/test.o, $(SRC:%.c=build/%.o))
|
|
FLAGS = -Wall -Wextra -g -O3
|
|
|
|
all: build/test
|
|
|
|
build/test: test.c $(OBJ)
|
|
gcc $^ -o $@ $(FLAGS)
|
|
|
|
build/%.o: %.c %.h
|
|
gcc -c $< -o $@ $(FLAGS)
|
|
|
|
clean:
|
|
rm -f build/*
|