forked from saghul/uttp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (30 loc) · 876 Bytes
/
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
BUILDTYPE ?= Debug
BUILDDIR ?= build
V ?=
DEPSDIR = deps
LIBUV = $(DEPSDIR)/libuv/uv.gyp
HTTP_PARSER = $(DEPSDIR)/http-parser/http_parser.gyp
TOOLSDIR = tools
GYP = $(TOOLSDIR)/gyp/gyp
SOURCES := src/*.c src/*.h
.PHONY: all clean
all: $(BUILDDIR)/$(BUILDTYPE)/uttp
clean:
$(RM) -rf $(BUILDDIR)
$(GYP):
git clone https://chromium.googlesource.com/external/gyp.git $(TOOLSDIR)/gyp
$(LIBUV):
git clone -b v1.x https://github.com/libuv/libuv $(DEPSDIR)/libuv
$(HTTP_PARSER):
git clone https://github.com/joyent/http-parser $(DEPSDIR)/http-parser
$(BUILDDIR)/$(BUILDTYPE)/uttp: $(BUILDDIR)/Makefile $(SOURCES)
$(MAKE) -C $(BUILDDIR) V=$(V)
$(BUILDDIR)/Makefile: $(GYP) $(LIBUV) $(HTTP_PARSER) common.gypi uttp.gyp
$(GYP) \
-Duv_library=static_library \
-Goutput_dir=. \
-Icommon.gypi \
-f make \
--depth=. \
--generator-output=$(BUILDDIR) \
uttp.gyp