aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMistivia <i@mistivia.com>2025-01-16 15:54:22 +0800
committerMistivia <i@mistivia.com>2025-01-16 15:54:22 +0800
commit3172921dd5f51a9eec19729f2e9841fd986f4176 (patch)
treea08411b44e195a6cd0a3b749248a2f680b1f8683
parent8689a7c78c50676ea739f52fbcee9f091709f5c0 (diff)
update readme & makefile
-rw-r--r--.gitignore9
-rw-r--r--Makefile10
-rw-r--r--Readme.md8
3 files changed, 23 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index d859fb4..d0c101c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,13 @@
*.o
+*.o.d
+lib/mstch/CMakeFiles/*
+lib/mstch/src/CMakeFiles/*
+lib/mstch/Makefile
+lib/mstch/src/Makefile
+lib/mstch/.*
+*.cmake
+*.a
+lib/mstch/CMakeCache.txt
hivemind
hivemind-release.tar.gz
mtg.json
diff --git a/Makefile b/Makefile
index 5ee2cfa..eaecfe3 100644
--- a/Makefile
+++ b/Makefile
@@ -3,13 +3,18 @@ CFLAGS= -g -std=c++17 -Wall
RM= rm -f
LIBS = -lm -lpthread -lmstch -static
-INCS = -I./src/ -I./lib/crow/include/
+INCS = -I./src/ -I./lib/crow/include/ -Ilib/mstch/include/
OBJ = $(patsubst %.cc,%.o,$(shell find src/ -name *.cc))
all: hivemind
-hivemind: $(OBJ)
+lib/mstch/src/libmstch.a:
+ cd lib/mstch && \
+ cmake . && \
+ make
+
+hivemind: $(OBJ) lib/mstch/src/libmstch.a
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
package: hivemind
@@ -21,3 +26,4 @@ package: hivemind
.PHONY: clean
clean:
-$(RM) $(shell find . -name *.o) hivemind
+ -cd lib/mstch && make clean
diff --git a/Readme.md b/Readme.md
index 75b403a..fe1795a 100644
--- a/Readme.md
+++ b/Readme.md
@@ -5,8 +5,6 @@
## 依赖
- Boost
-- [Crow](https://github.com/ipkn/crow)
-- [mstch](https://github.com/no1msd/mstch)
## 构建和运行
@@ -20,3 +18,9 @@ make && ./hivemind
![image](https://github.com/user-attachments/assets/cf8f4899-794d-4792-9e08-9c45e82c4891)
+## 鸣谢
+
+HiveMind使用了来自下面两个库的代码
+
+- [Crow](https://github.com/ipkn/crow)
+- [mstch](https://github.com/no1msd/mstch)