aoc2023/Makefile

25 lines
474 B
Makefile
Raw Normal View History

2023-12-02 17:34:17 +04:00
CC=cc
2023-12-03 19:00:55 +04:00
CFLAGS=--std=c2x -O3 -Wall -Werror -Wextra -pedantic
2023-12-02 17:34:17 +04:00
EXES = $(wildcard day*)
all: create_bin_dir $(EXES)
create_bin_dir:
@mkdir -p bin
day1: day1/p1.c day1/p2.c
${CC} ${CFLAGS} $@/p1.c -o bin/$@p1
${CC} ${CFLAGS} $@/p2.c -o bin/$@p2
2023-12-02 19:20:52 +04:00
day2: day2/p1.c day2/p2.c
${CC} ${CFLAGS} $@/p1.c -o bin/$@p1
2023-12-02 19:45:58 +04:00
${CC} ${CFLAGS} $@/p2.c -o bin/$@p2
2023-12-02 19:20:52 +04:00
2023-12-03 17:57:26 +04:00
day3: day3/p1.c day3/p2.c
${CC} ${CFLAGS} $@/p1.c -o bin/$@p1
2023-12-03 18:27:32 +04:00
${CC} ${CFLAGS} $@/p2.c -o bin/$@p2
2023-12-02 17:34:17 +04:00
clean:
rm -f bin/day*p*