aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMistivia <i@mistivia.com>2025-01-15 19:12:12 +0800
committerMistivia <i@mistivia.com>2025-01-15 19:12:46 +0800
commit4da382953c830a61ae24ccbe95c4241db8788269 (patch)
tree31f6d184273274e2660516d1ac1146b5661f20b6 /Makefile
restore
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..5ee2cfa
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,23 @@
+CC= g++
+CFLAGS= -g -std=c++17 -Wall
+RM= rm -f
+
+LIBS = -lm -lpthread -lmstch -static
+INCS = -I./src/ -I./lib/crow/include/
+
+OBJ = $(patsubst %.cc,%.o,$(shell find src/ -name *.cc))
+
+all: hivemind
+
+hivemind: $(OBJ)
+ $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
+
+package: hivemind
+ tar --gzip -cf hivemind-release.tar.gz hivemind resource/
+
+%.o: %.cc
+ $(CC) -c -o $@ $(CFLAGS) ${INCS} $<
+
+.PHONY: clean
+clean:
+ -$(RM) $(shell find . -name *.o) hivemind