forked from nodenative/nodenative
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile_old
39 lines (29 loc) · 1.58 KB
/
Makefile_old
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
HTTP_PARSER_PATH = http-parser
LIBUV_PATH = libuv
LD = llvm-link -v
LIBUV_NAME=libuv.la
OS_NAME=$(shell uname -s)
ifeq (${OS_NAME},Darwin)
RTLIB=
CXXFLAGS = -framework CoreFoundation -framework CoreServices -std=gnu++0x -stdlib=libc++ -g -O0 -I$(LIBUV_PATH)/include -I$(HTTP_PARSER_PATH) -I. -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
else
RTLIB=-lrt
CXXFLAGS = -std=gnu++0x -g -O0 -I$(LIBUV_PATH)/include -I$(HTTP_PARSER_PATH) -I. -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
endif
all: webclient webserver file_test
webclient: samples/webclient.cpp $(LIBUV_PATH)/$(LIBUV_NAME) $(HTTP_PARSER_PATH)/http_parser.o $(wildcard native/*.h)
$(CXX) $(CXXFLAGS) -o webclient samples/webclient.cpp $(LIBUV_PATH)/$(LIBUV_NAME) $(HTTP_PARSER_PATH)/http_parser.o $(RTLIB) -lm -lpthread
webserver: samples/webserver.cpp $(LIBUV_PATH)/$(LIBUV_NAME) $(HTTP_PARSER_PATH)/http_parser.o $(wildcard native/*.h)
$(CXX) $(CXXFLAGS) -o webserver samples/webserver.cpp $(LIBUV_PATH)/$(LIBUV_NAME) $(HTTP_PARSER_PATH)/http_parser.o $(RTLIB) -lm -lpthread
file_test: samples/file_test.cpp $(LIBUV_PATH)/$(LIBUV_NAME) $(HTTP_PARSER_PATH)/http_parser.o $(wildcard native/*.h)
$(CXX) $(CXXFLAGS) -o file_test samples/file_test.cpp $(LIBUV_PATH)/$(LIBUV_NAME) $(HTTP_PARSER_PATH)/http_parser.o $(RTLIB) -lm -lpthread
$(LIBUV_PATH)/$(LIBUV_NAME):
$(MAKE) -C $(LIBUV_PATH)
$(HTTP_PARSER_PATH)/http_parser.o:
$(MAKE) -C $(HTTP_PARSER_PATH) http_parser.o
clean:
$(MAKE) -C libuv clean
$(MAKE) -C http-parser clean
rm -f $(LIBUV_PATH)/$(LIBUV_NAME)
rm -f $(HTTP_PARSER_PATH)/http_parser.o
rm -f webclient webserver file_test