summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorBenji Dial <benji@benjidial.net>2023-05-29 16:36:19 -0400
committerBenji Dial <benji@benjidial.net>2023-05-29 16:36:19 -0400
commit97c79ff771d4993e322d0d6c44f265180797b2eb (patch)
tree5513cf25721cf21c06efd913ed2f82b980e3cb24 /makefile
parent338549f9cd49fa0f3001826c6605663fa6dd019b (diff)
downloadlib94-97c79ff771d4993e322d0d6c44f265180797b2eb.tar.gz
a whole lot more
Diffstat (limited to 'makefile')
-rw-r--r--makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..62e2684
--- /dev/null
+++ b/makefile
@@ -0,0 +1,23 @@
+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
+
+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 $@
+
+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 $@