forked from phate/jive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.sub
141 lines (121 loc) · 3.7 KB
/
Makefile.sub
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
define HELP_TEXT_JIVE
echo ""
echo "Jive Make Targets"
echo "--------------------------------------------------------------------------------"
echo "jive-debug Compiles jive library in debug mode"
echo "jive-debug-check Compiles jive library in debug mode and runs tests"
echo "jive-release Compiles jive library in release mode"
echo "jive-clean Cleans all build files and libraries"
endef
# RVSDG core
LIBJIVE_SRC = \
src/common.cpp \
src/rvsdg/binary.cpp \
src/rvsdg/control.cpp \
src/rvsdg/equivalence.cpp \
src/rvsdg/gamma.cpp \
src/rvsdg/graph.cpp \
src/rvsdg/label.cpp \
src/rvsdg/negotiator.cpp \
src/rvsdg/node-normal-form.cpp \
src/rvsdg/node.cpp \
src/rvsdg/notifiers.cpp \
src/rvsdg/nullary.cpp \
src/rvsdg/operation.cpp \
src/rvsdg/phi.cpp \
src/rvsdg/region.cpp \
src/rvsdg/resource.cpp \
src/rvsdg/simple-normal-form.cpp \
src/rvsdg/simple-node.cpp \
src/rvsdg/statemux.cpp \
src/rvsdg/splitnode.cpp \
src/rvsdg/structural-normal-form.cpp \
src/rvsdg/structural-node.cpp \
src/rvsdg/theta.cpp \
src/rvsdg/tracker.cpp \
src/rvsdg/traverser.cpp \
src/rvsdg/type.cpp \
src/rvsdg/unary.cpp \
#evaluation
LIBJIVE_SRC += \
src/evaluator/eval.cpp \
src/evaluator/literal.cpp \
# visualization
LIBJIVE_SRC += \
src/util/callbacks.cpp \
src/view.cpp \
# bitstrings
LIBJIVE_SRC += \
src/types/bitstring/arithmetic.cpp \
src/types/bitstring/bitoperation-classes.cpp \
src/types/bitstring/comparison.cpp \
src/types/bitstring/concat.cpp \
src/types/bitstring/constant.cpp \
src/types/bitstring/slice.cpp \
src/types/bitstring/type.cpp \
src/types/bitstring/value-representation.cpp \
# floats
LIBJIVE_SRC += \
src/types/float/arithmetic.cpp \
src/types/float/comparison.cpp \
src/types/float/fltconstant.cpp \
src/types/float/fltoperation-classes.cpp \
src/types/float/flttype.cpp \
# records
LIBJIVE_SRC += \
src/types/record.cpp \
# unions
LIBJIVE_SRC += \
src/types/union.cpp \
# functions
LIBJIVE_SRC += \
src/types/function.cpp \
# arch definitions
LIBJIVE_SRC += \
src/arch/address-transform.cpp \
src/arch/address.cpp \
src/arch/addresstype.cpp \
src/arch/call.cpp \
src/arch/compilate.cpp \
src/arch/dataobject.cpp \
src/arch/immediate.cpp \
src/arch/instruction.cpp \
src/arch/instructionset.cpp \
src/arch/label-mapper.cpp \
src/arch/load.cpp \
src/arch/memlayout-simple.cpp \
src/arch/memlayout.cpp \
src/arch/registers.cpp \
src/arch/regselector.cpp \
src/arch/regvalue.cpp \
src/arch/sizeof.cpp \
src/arch/stackslot.cpp \
src/arch/store.cpp \
src/arch/subroutine.cpp \
src/arch/subroutine/nodes.cpp \
include $(JIVE_ROOT)/src/backend/i386/Makefile.sub
SOURCES += $(LIBJIVE_SRC)
HEADERS = $(shell find $(JIVE_ROOT)/include -name "*.h")
.PHONY: jive-debug
jive-debug: CFLAGS += -g -DJIVE_DEBUG
jive-debug: $(JIVE_ROOT)/libjive.a
.PHONY: jive-debug-check
jive-debug-check: jive-debug check
.PHONY: jive-release
jive-release: CFLAGS += -O3
jive-release: $(JIVE_ROOT)/libjive.a
$(JIVE_ROOT)/libjive.a: CFLAGS+=-Wall -Wpedantic -Wextra -Wno-unused-parameter --std=c++14
$(JIVE_ROOT)/libjive.a: CPPFLAGS+=-I$(JIVE_ROOT)/include
$(JIVE_ROOT)/libjive.a: $(patsubst %.cpp, $(JIVE_ROOT)/%.la, $(LIBJIVE_SRC))
$(JIVE_ROOT)/libjive.so: CFLAGS+=-Wall -Wpedantic -Wextra -Wno-unused-parameter --std=c++14
$(JIVE_ROOT)/libjive.so: CPPFLAGS+=-I$(JIVE_ROOT)/include
$(JIVE_ROOT)/libjive.so: $(patsubst %.cpp, $(JIVE_ROOT)/%.lo, $(LIBJIVE_SRC))
.PHONY: jive-clean
jive-clean: jive-depclean
@find $(JIVE_ROOT)/ -name "*.o" -o -name "*.lo" -o -name "*.la" -o -name "*.so" -o -name "*.a" | xargs rm -rf
@rm -rf $(JIVE_ROOT)/*.log
@rm -rf $(JIVE_ROOT)/a.out
@rm -rf $(JIVE_ROOT)/tests/test-runner
.PHONY: jive-depclean
jive-depclean:
@rm -rf $(JIVE_ROOT)/.dep