aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: eaecfe33672365cec1085656ea4a8db655b41d56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
CC= g++
CFLAGS= -g -std=c++17 -Wall
RM= rm -f

LIBS = -lm -lpthread -lmstch -static
INCS = -I./src/ -I./lib/crow/include/ -Ilib/mstch/include/

OBJ = $(patsubst %.cc,%.o,$(shell find src/ -name *.cc))

all: hivemind

lib/mstch/src/libmstch.a:
	cd lib/mstch && \
	cmake . && \
	make

hivemind: $(OBJ) lib/mstch/src/libmstch.a
	$(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
	-cd lib/mstch && make clean