-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (24 loc) · 1.29 KB
/
Makefile
File metadata and controls
32 lines (24 loc) · 1.29 KB
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
MongoDB_IFLAG = -I/usr/local/include/mongocxx/v_noabi -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/bsoncxx/v_noabi -I/usr/local/include/libbson-1.0
MongoDB_LFLAG = -L/usr/local/lib -lmongocxx -lbsoncxx
NCURSES_LFLAG = -lncurses
all: dependency study.exe tests.exe
dependency:
+$(MAKE) -C Modal/
+$(MAKE) -C Service/
+$(MAKE) -C Controller/
+$(MAKE) -C UI/
main.o: main.cpp
g++ -c -std=c++11 -g $^ $(pkg-config --cflags --libs libmongocxx) $(MongoDB_IFLAG)
ui-demo.o: ui-demo.cpp
g++ -c -std=c++11 -g $^ $(pkg-config --cflags --libs libmongocxx libncurses) $(MongoDB_IFLAG)
tests.exe: Modal/card.o Service/studyService.o Service/config.o Controller/jobPool.o main.o UI/ui.o
g++ -std=c++11 -g -o $@ $^ -Wall $(pkg-config --cflags --libs libmongocxx) -Wl,-rpath,/usr/local/lib $(NCURSES_LFLAG) $(MongoDB_LFLAG)
study.exe: Modal/card.o Service/studyService.o Service/config.o Controller/jobPool.o ui-demo.o UI/ui.o
g++ -std=c++11 -g -o $@ $^ -Wall $(pkg-config --cflags --libs libmongocxx) -Wl,-rpath,/usr/local/lib $(NCURSES_LFLAG) $(MongoDB_LFLAG)
SUBDIR_ROOTS := Modal Service Controller UI
DIRS := . $(shell find $(SUBDIR_ROOTS) -type d)
GARBAGE_PATTERNS := *.o *.exe
GARBAGE := $(foreach DIR,$(DIRS),$(addprefix $(DIR)/,$(GARBAGE_PATTERNS)))
clean:
rm -rf $(GARBAGE)
rm -f config.txt