-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathMakefile
71 lines (51 loc) · 1.41 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
all: eager split r-merge r-wrap r-split r-unwrap dgsh-tee set-diff
.PHONY: all eager-debug split-debug clean
CFLAGS=-Wall
ifeq ($(DEBUG),1)
# We want debug mode.
CFLAGS += -g -DDEBUG -Og -ggdb -Wno-attributes
else
# We want release mode.
CFLAGS += -O3 -DNDEBUG
endif
ifeq ($(PERF),1)
# We want debug mode.
CFLAGS += -g -ggdb
endif
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S), Darwin)
DGSH_ASSEMBLY_FILE=dgsh-macho.s
else
DGSH_ASSEMBLY_FILE=dgsh-elf.s
endif
split: split.c
gcc ${CFLAGS} split.c -o split
split-debug: split.c
gcc ${CFLAGS} split.c -o split
eager: eager.c eager_lib.c
gcc ${CFLAGS} eager.c eager_lib.c -o eager
eager-debug: eager.c eager_lib.c
gcc ${CFLAGS} -pg eager.c eager_lib.c -o eager
r-split: r_split.c r_split.h
gcc ${CFLAGS} r_split.c -o r_split
r-merge: r_merge.c r_split.h
gcc ${CFLAGS} r_merge.c -o r_merge
r-wrap: r_wrap.c r_split.h
gcc ${CFLAGS} r_wrap.c -o r_wrap
r-unwrap: r_unwrap.c r_split.h
gcc ${CFLAGS} r_unwrap.c -o r_unwrap
set-diff: set-diff.c
gcc ${CFLAGS} set-diff.c -o set-diff
libdgsh_a_SOURCES = negotiate.c $(DGSH_ASSEMBLY_FILE)
dgsh_tee_SOURCES = dgsh-tee.c
dgsh-tee:
git clone https://github.com/binpash/dgsh.git;\
cd dgsh;\
git checkout pash;\
cd core-tools/src;\
gcc ${CFLAGS} $(dgsh_tee_SOURCES) $(libdgsh_a_SOURCES) -o $@; \
cp dgsh-tee ../../../dgsh-tee;
rm -rf dgsh/
clean:
rm -f eager split r_split r_wrap r_unwrap dgsh-tee
rm -rf dgsh