forked from pcrain/slippc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
63 lines (50 loc) · 1.2 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
RM := rm -rf
MKDIR_P = mkdir -p
# INCLUDES := -I/usr/include/jsoncpp
# LIBS := -ljsoncpp
UNUSED := -Wno-unused-variable
HEADERS += \
src/parser.h \
src/replay.h \
src/analyzer.h \
src/analysis.h \
src/enums.h \
src/util.h
OBJS += \
build/parser.o \
build/replay.o \
build/analyzer.o \
build/analysis.o \
build/main.o
CPP_DEPS += \
build/parser.d \
build/replay.d \
build/analyzer.d \
build/analysis.d \
build/main.d
OUT_DIR = build
# OLEVEL := -O0
# OLEVEL := -O3
OLEVEL := -Ofast -march=native -frename-registers -fno-signed-zeros -fno-trapping-math
all: directories slippc
slippc: $(OBJS)
@echo 'Building target: $@'
@echo 'Invoking: GCC C++ Linker'
g++ -L/usr/lib -std=c++17 -o "./slippc" $(OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '
build/%.o: ./src/%.cpp $(HEADERS)
@echo 'Building file: $<'
@echo 'Invoking: GCC C++ Compiler'
$(LINK.c) $< -c -o $@
g++ -D__GXX_EXPERIMENTAL_CXX0X__ $(INCLUDES) $(OLEVEL) -g3 -Wall -c -fmessage-length=0 -std=c++17 $(UNUSED) -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
clean:
-$(RM) $(OBJS)$(C++_DEPS) ./slippc
-@echo ' '
directories: ${OUT_DIR}
${OUT_DIR}:
${MKDIR_P} ${OUT_DIR}
.PHONY: all clean dependents directories
.SECONDARY: