2024-03-29 23:16:43 +01:00
|
|
|
SRC = $(wildcard *.c)
|
|
|
|
OBJ = $(filter-out build/main.o build/test.o, $(SRC:%.c=build/%.o))
|
|
|
|
FLAGS = -Wall -Wextra -g -O3
|
2024-03-26 17:06:15 +01:00
|
|
|
|
2024-03-29 23:16:43 +01:00
|
|
|
all: build/test
|
2024-03-26 17:06:15 +01:00
|
|
|
|
2024-03-29 23:16:43 +01:00
|
|
|
build/test: test.c $(OBJ)
|
|
|
|
gcc $^ -o $@ $(FLAGS)
|
2024-03-26 17:06:15 +01:00
|
|
|
|
2024-03-29 23:16:43 +01:00
|
|
|
build/%.o: %.c %.h
|
|
|
|
gcc -c $< -o $@ $(FLAGS)
|
2024-03-26 17:06:15 +01:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f build/*
|