-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
110 lines (83 loc) · 2.6 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
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
CC = g++-4.2
READLINE_DIR = lib/greadline
#CFLAGS = -O2 -g -Wall -W -I./include/ -I$(READLINE_DIR)/include -DUSING_JIT #-DDEBUG_MODE
CFLAGS = -O0 -g3 -Wall -W -I./include/ -I$(READLINE_DIR)/include -I/opt/local/include/ -DUSING_JIT -DDEBUG_MODE -DUSING_GRAPH_DEBUG
READLINE_CFLAGS= -O2 -Wall -W -I$(READLINE_DIR)/include/
LDLIBS = -L/usr/local/lib/x86_64 -ljit -lpthread -lm -lgraph -lgvc #`pkg-config libgvc --libs`
target = gperl
objs = build/main.o \
build/gperl.o \
build/token.o \
build/parse.o \
build/ast.o \
build/graph.o \
build/compiler.o\
build/memory.o\
build/vm.o \
build/gen_vm.o\
build/string.o\
build/array.o\
build/hash.o\
build/func.o\
build/class.o\
build/undef.o\
build/jit.o\
$(READLINE_DIR)/build/greadline.o\
$(READLINE_DIR)/build/keyword.o\
$(READLINE_DIR)/build/term.o\
$(READLINE_DIR)/build/complete.o\
$(READLINE_DIR)/build/history.o\
$(READLINE_DIR)/build/mem.o
.PHONY: all
all: $(target)
$(target): $(objs)
$(CC) -o $@ $^ $(LDLIBS)
build/main.o : src/main.cpp
$(CC) $(CFLAGS) -o $@ -c $^
build/gperl.o : src/gperl.cpp
$(CC) $(CFLAGS) -o $@ -c $^
build/token.o : src/token.cpp
$(CC) $(CFLAGS) -o $@ -c $^
build/parse.o : src/parse.cpp
$(CC) $(CFLAGS) -o $@ -c $^
build/ast.o : src/ast.cpp
$(CC) $(CFLAGS) -o $@ -c $^
build/graph.o : src/graph.cpp
$(CC) $(CFLAGS) -o $@ -c $^
build/compiler.o : src/compiler.cpp
$(CC) $(CFLAGS) -o $@ -c $^
build/memory.o : src/memory.cpp
$(CC) $(CFLAGS) -o $@ -c $^
build/vm.o : src/vm.cpp
$(CC) $(CFLAGS) -o $@ -c $^
build/gen_vm.o : src/gen_vm.cpp
$(CC) $(CFLAGS) -o $@ -c $^
build/string.o : src/string.cpp
$(CC) $(CFLAGS) -o $@ -c $^
build/array.o : src/array.cpp
$(CC) $(CFLAGS) -o $@ -c $^
build/hash.o : src/hash.cpp
$(CC) $(CFLAGS) -o $@ -c $^
build/func.o : src/func.cpp
$(CC) $(CFLAGS) -o $@ -c $^
build/class.o : src/class.cpp
$(CC) $(CFLAGS) -o $@ -c $^
build/undef.o : src/undef.cpp
$(CC) $(CFLAGS) -o $@ -c $^
build/jit.o : src/jit.cpp
$(CC) $(CFLAGS) -o $@ -c $^
$(READLINE_DIR)/build/greadline.o : $(READLINE_DIR)/src/greadline.c
$(CC) $(READLINE_CFLAGS) -o $@ -c $^
$(READLINE_DIR)/build/complete.o : $(READLINE_DIR)/src/complete.c
$(CC) $(READLINE_CFLAGS) -o $@ -c $^
$(READLINE_DIR)/build/keyword.o : $(READLINE_DIR)/src/keyword.c
$(CC) $(READLINE_CFLAGS) -o $@ -c $^
$(READLINE_DIR)/build/term.o : $(READLINE_DIR)/src/term.c
$(CC) $(READLINE_CFLAGS) -o $@ -c $^
$(READLINE_DIR)/build/history.o : $(READLINE_DIR)/src/history.c
$(CC) $(READLINE_CFLAGS) -o $@ -c $^
$(READLINE_DIR)/build/mem.o : $(READLINE_DIR)/src/mem.c
$(CC) $(READLINE_CFLAGS) -o $@ -c $^
.PHONY: clean
clean:
$(RM) -rf $(objs) $(target) *~