diff options
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 42 |
1 files changed, 12 insertions, 30 deletions
| @@ -1,41 +1,23 @@ | |||
| 1 | include config.mk | 1 | include config.mk |
| 2 | 2 | ||
| 3 | all: bin/day01 \ | 3 | all: $(patsubst 2020/src/%.cpp,2020/bin/%,$(wildcard 2020/src/*.cpp)) \ |
| 4 | bin/day02 \ | 4 | $(patsubst 2023/src/%.cpp,2023/bin/%,$(wildcard 2023/src/*.cpp)) |
| 5 | bin/day03 \ | ||
| 6 | bin/day04 \ | ||
| 7 | bin/day05 \ | ||
| 8 | bin/day06 \ | ||
| 9 | bin/day07 \ | ||
| 10 | bin/day08 \ | ||
| 11 | bin/day09 \ | ||
| 12 | bin/day10 \ | ||
| 13 | bin/day11 \ | ||
| 14 | bin/day12 \ | ||
| 15 | bin/day13 \ | ||
| 16 | bin/day14 \ | ||
| 17 | bin/day15 \ | ||
| 18 | bin/day16 \ | ||
| 19 | bin/day17 \ | ||
| 20 | bin/day18 \ | ||
| 21 | bin/day19 \ | ||
| 22 | bin/day20 \ | ||
| 23 | bin/day21 \ | ||
| 24 | bin/day22 \ | ||
| 25 | bin/day23 \ | ||
| 26 | bin/day24 \ | ||
| 27 | bin/day25 | ||
| 28 | 5 | ||
| 29 | bin: | 6 | %/bin: |
| 30 | mkdir $@ | 7 | mkdir -p $@ |
| 31 | 8 | ||
| 32 | bin/%: src/%.cpp | bin | 9 | # 2020 |
| 10 | 2020/bin/%: 2020/src/%.cpp | 2020/bin | ||
| 33 | c++ $(CPPFLAGS) $^ -o $@ | 11 | c++ $(CPPFLAGS) $^ -o $@ |
| 34 | 12 | ||
| 35 | bin/day24: src/day24.cpp | bin | 13 | # 2023 |
| 14 | 2023/bin/%: 2023/src/%.cpp | 2023/bin | ||
| 15 | c++ $(CPPFLAGS) $^ -o $@ | ||
| 16 | |||
| 17 | 2023/bin/day24: 2023/src/day24.cpp | 2023/bin | ||
| 36 | c++ $(CPPFLAGS) -Wno-sign-conversion -I/usr/local/include $^ -L/usr/local/lib -lz3 -o $@ | 18 | c++ $(CPPFLAGS) -Wno-sign-conversion -I/usr/local/include $^ -L/usr/local/lib -lz3 -o $@ |
| 37 | 19 | ||
| 38 | clean: | 20 | clean: |
| 39 | rm -rf bin | 21 | rm -rf 2020/bin 2023/bin |
| 40 | 22 | ||
| 41 | .PHONY: all clean | 23 | .PHONY: all clean |
