27 lines
705 B
Makefile
27 lines
705 B
Makefile
CPP_ARGS = -std=c++20 -O2 -Wall -Wextra -Iinclude
|
|
GTKMM_CPP_ARGS = $(shell pkg-config --cflags gtkmm-4.0)
|
|
GTKMM_LD_ARGS = $(shell pkg-config --libs gtkmm-4.0)
|
|
|
|
default: bin/bench bin/score
|
|
|
|
clean:
|
|
rm -r obj bin
|
|
|
|
bin/bench: obj/bench/main.o obj/bench/bench_window.o obj/bench/core_widget.o obj/lib94.o
|
|
@mkdir -p $(dir $@)
|
|
g++ ${CPP_ARGS} $^ ${GTKMM_LD_ARGS} -o $@
|
|
|
|
bin/score: obj/score/main.o obj/lib94.o
|
|
@mkdir -p $(dir $@)
|
|
g++ ${CPP_ARGS} $^ -o $@
|
|
|
|
obj/lib94.o: obj/lib94/core.o obj/lib94/executors.o obj/lib94/warrior.o
|
|
ld -r $^ -o $@
|
|
|
|
obj/bench/%.o: bench/%.cpp
|
|
@mkdir -p $(dir $@)
|
|
g++ -c ${CPP_ARGS} ${GTKMM_CPP_ARGS} $^ -o $@
|
|
|
|
obj/%.o: %.cpp
|
|
@mkdir -p $(dir $@)
|
|
g++ -c ${CPP_ARGS} $^ -o $@
|