-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
33 lines (25 loc) · 904 Bytes
/
Makefile
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
CXXFLAGS:=-g -std=c++14 -Wall -Wextra -Isrc
DEPTRACKING=-MD -MF $(@:.o=.d)
BUILDEXE=/usr/bin/g++ -o$@ $(CXXFLAGS) $(LDFLAGS) $^
ifeq ($(OS),Windows_NT)
nativefile=$(subst /,\\,$(1))
CHECKDIR=@if not exist $(call nativefile,$(dir $@)) mkdir $(call nativefile,$(dir $@))
LDFLAGS:= -Wl,--enable-auto-import
EXEEXT:=.exe
else
CHECKDIR=@mkdir -p $(dir $@)
EXEEXT:=
endif
all: bin/admin$(EXEEXT) bin/isql$(EXEEXT) bin/runsql$(EXEEXT) bin/QueryGraph$(EXEEXT) \
bin/GOO$(EXEEXT) bin/DP$(EXEEXT) bin/QuickPick$(EXEEXT) examples_bin
include src/LocalMakefile
include examples/LocalMakefile
-include bin/*.d bin/*/*.d
bin/%.o: src/%.cpp
$(CHECKDIR)
/usr/bin/g++ -o$@ -c $(CXXFLAGS) $(DEPTRACKING) $<
bin/examples/%.o: examples/%.cpp
$(CHECKDIR)
/usr/bin/g++ -o$@ -c $(CXXFLAGS) $(DEPTRACKING) $<
clean:
find bin -name '*.d' -delete -o -name '*.o' -delete -o '(' -perm -u=x '!' -type d ')' -delete