-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
125 lines (91 loc) · 3.11 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
CC?=cc
CFLAGS+=-W -Wall -Os -fPIC -fwrapv -pedantic
DESTDIR?=
BINARIES=httpfile
BINARIES+=utime
all: $(BINARIES)
alloc.o: alloc.c log.h alloc.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c alloc.c
case_diffs.o: case_diffs.c case.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c case_diffs.c
case_lowerb.o: case_lowerb.c case.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c case_lowerb.c
case_startb.o: case_startb.c case.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c case_startb.c
droproot.o: droproot.c droproot.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c droproot.c
e.o: e.c e.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c e.c
file.o: file.c log.h file.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c file.c
filetype.o: filetype.c str.h log.h case.h filetype.h stralloc.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c filetype.c
getuidgid.o: getuidgid.c getuidgid.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c getuidgid.c
hostparse.o: hostparse.c stralloc.h hostparse.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c hostparse.c
httpdate.o: httpdate.c httpdate.h stralloc.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c httpdate.c
httpfile.o: httpfile.c stralloc.h pathdecode.h hostparse.h httpdate.h \
milliseconds.h percent.h case.h log.h str.h filetype.h file.h droproot.h \
alloc.h e.h timeoutwrite.h rangeparser.h getuidgid.h randombytes.h \
limits.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c httpfile.c
limits.o: limits.c log.h limits.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c limits.c
log.o: log.c e.h randommod.h log.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c log.c
milliseconds.o: milliseconds.c milliseconds.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c milliseconds.c
pathdecode.o: pathdecode.c pathdecode.h stralloc.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c pathdecode.c
percent.o: percent.c percent.h stralloc.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c percent.c
randombytes.o: randombytes.c log.h randombytes.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c randombytes.c
randommod.o: randommod.c randombytes.h randommod.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c randommod.c
rangeparser.o: rangeparser.c rangeparser.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c rangeparser.c
stralloc.o: stralloc.c alloc.h e.h stralloc.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c stralloc.c
str.o: str.c str.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c str.c
timeoutwrite.o: timeoutwrite.c e.h milliseconds.h timeoutwrite.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c timeoutwrite.c
utime.o: utime.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c utime.c
OBJECTS=alloc.o
OBJECTS+=case_diffs.o
OBJECTS+=case_lowerb.o
OBJECTS+=case_startb.o
OBJECTS+=droproot.o
OBJECTS+=e.o
OBJECTS+=file.o
OBJECTS+=filetype.o
OBJECTS+=getuidgid.o
OBJECTS+=hostparse.o
OBJECTS+=httpdate.o
OBJECTS+=limits.o
OBJECTS+=log.o
OBJECTS+=milliseconds.o
OBJECTS+=pathdecode.o
OBJECTS+=percent.o
OBJECTS+=randombytes.o
OBJECTS+=randommod.o
OBJECTS+=rangeparser.o
OBJECTS+=stralloc.o
OBJECTS+=str.o
OBJECTS+=timeoutwrite.o
httpfile: httpfile.o $(OBJECTS)
$(CC) $(CFLAGS) $(CPPFLAGS) -o httpfile httpfile.o $(OBJECTS) $(LDFLAGS)
utime: utime.o $(OBJECTS)
$(CC) $(CFLAGS) $(CPPFLAGS) -o utime utime.o $(OBJECTS) $(LDFLAGS)
install: httpfile
install -D -m 0755 httpfile $(DESTDIR)/usr/bin/httpfile
rts.out: $(BINARIES) rts.tests
sh rts.tests > rts.out
rts: rts.exp rts.out
cmp rts.exp rts.out || (cat rts.out; exit 1;)
clean:
rm -f *.o $(BINARIES) rts.out