-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (23 loc) · 666 Bytes
/
Copy pathMakefile
File metadata and controls
30 lines (23 loc) · 666 Bytes
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
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
CFLAGS += -g
CPPFLAGS += -Isrc
LDFLAGS=-lm
CPPFLAGS += -D_LARGEFILE_SOURCE
CPPFLAGS += -D_FILE_OFFSET_BITS=64
ifeq (Darwin,$(uname_S))
CPPFLAGS += -D_DARWIN_USE_64_BIT_INODE=1
LDFLAGS+=-framework CoreServices -dynamiclib
endif
ifeq (Linux,$(uname_S))
LDFLAGS+=-ldl -lrt
endif
webserver: webserver.c libuv/libuv.a http-parser/http_parser.o
gcc $(CPPFLAGS) -o webserver webserver.c libuv/libuv.a http-parser/http_parser.o $(LDFLAGS);
libuv/libuv.a:
make -C libuv
http_parser/http_parser.o:
make -C http-parser http_parser.o
clean:
make -C http-parser clean
make -C libuv distclean
rm webserver