aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 3a2d07f365835fe3f6c6daf579aaadda3a0427ae (plain) (blame)
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
30
31
32
33
CXX = g++
CXXFLAGS = -ggdb3 -O0 -Wpedantic -Wall -Werror -std=c++17
OUTPUT_OPTION = -MMD -MP -o $@

LINK.o = $(LINK.cc)
LDFLAGS = -Ldocopt -Ljsmn -Lsolvitaire
LDLIBS = -lpthread -lsol -ldocopt -ljsmn

TRGT = centre
SRC = metasol.cpp centre.cpp
OBJ = $(SRC:.cpp=.o)
DEP = $(SRC:.cpp=.d)

.PHONY: default all init-submodules docs

default: all
all: $(TRGT)
$(TRGT): $(OBJ)

init-submodules:
	git submodule init
	git submodule update
	$(MAKE) -C jsmn
	(cd docopt; cmake .) ; $(MAKE) -C docopt docopt_s
	(cd solvitaire; sh build.sh)

docs:
	doxygen ./Doxyfile

-include $(DEP)

clean:
	$(RM) $(TRGT) $(OBJ) $(DEP) -r docs