-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
78 lines (68 loc) · 2.03 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
COMMON_FILES = kweb.c kqueue.c cpu_util.c urlcmd.c
NON_CUSTOM_SCHED_FILES = $(COMMON_FILES) tpool.c kstats.c ktimer.c
THUMBNAIL_FILES = thumbnails.c
THUMBNAIL_LIBS = -fopenmp -lGraphicsMagick -larchive
THUMBNAIL_DIRS = -I/usr/include/GraphicsMagick
LINUX_NATIVE_FILES = linux.c $(THUMBNAIL_FILES) $(NON_CUSTOM_SCHED_FILES)
LINUX_UPTHREAD_FILES = linux-upthread.c $(THUMBNAIL_FILES) $(NON_CUSTOM_SCHED_FILES)
LINUX_CUSTOM_SCHED_FILES = linux-custom-sched.c $(COMMON_FILES)
AKAROS_FILES = akaros.c $(NON_CUSTOM_SCHED_FILES)
AKAROS_CUSTOM_SCHED_FILES = akaros-custom-sched.c $(COMMON_FILES)
all:
@echo "Must run one of:\n" \
"\tmake linux\n" \
"\tmake linux-upthread\n" \
"\tmake linux-upthread-lithe\n" \
"\tmake linux-custom-sched\n" \
"\tmake akaros\n" \
"\tmake akaros-custom-sched"
linux:
gcc -std=gnu99 \
$(LINUX_NATIVE_FILES) \
$(THUMBNAIL_DIRS) \
$(THUMBNAIL_LIBS) \
-lpthread \
-o kweb
linux-upthread:
gcc -g -std=gnu99 \
$(LINUX_UPTHREAD_FILES) \
-I/usr/include/upthread/compatibility \
$(THUMBNAIL_DIRS) \
$(THUMBNAIL_LIBS) \
-lupthread -lparlib \
-Wl,-wrap,socket \
-Wl,-wrap,accept \
-DWITH_PARLIB -DWITH_UPTHREAD \
-o kweb
linux-upthread-lithe:
gcc -g -std=gnu99 \
$(LINUX_UPTHREAD_FILES) \
-I/usr/include/upthread-lithe/compatibility \
$(THUMBNAIL_DIRS) \
$(THUMBNAIL_LIBS) \
-lupthread-lithe -lithe -lparlib \
-Wl,-wrap,socket \
-Wl,-wrap,accept \
-DWITH_PARLIB -DWITH_UPTHREAD -DWITH_LITHE \
-o kweb
linux-custom-sched:
gcc -g -std=gnu99
$(LINUX_CUSTOM_SCHED_FILES) \
-lparlib \
-Wl,-wrap,socket \
-Wl,-wrap,accept \
-DWITH_PARLIB -DWITH_CUSTOM_SCHED \
-o kweb
akaros:
x86_64-ucb-akaros-gcc -std=gnu99 \
$(AKAROS_FILES) \
-lpthread -lbenchutil -lbsd
-o kweb
akaros-custom-sched:
x86_64-ucb-akaros-gcc -std=gnu99 \
$(AKAROS_CUSTOM_SCHED_FILES) \
-lpthread -lbenchutil -lbsd \
-DWITH_CUSTOM_SCHED \
-o kweb
clean:
rm -rf kweb