-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (35 loc) · 764 Bytes
/
Makefile
File metadata and controls
50 lines (35 loc) · 764 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
ZZ ?= $(shell which zz)
CWD ?= $(shell pwd)
ZZFLAGS =
export ZZ_MODULE_PATHS += ":$(CWD)/.."
default: build
release: ZZFLAGS+="--release -0"
release: build
build:
$(ZZ) build $(ZZFLAGS)
clean:
$(ZZ) clean
check:
$(ZZ) check
test:
$(ZZ) test $(TEST)
bench:
$(ZZ) bench
CWD ?= $(shell pwd)
.PHONY: libuv
build: libuv
libuv: target/lib/libuv.a
target/lib/libuv.a:
git submodule update --init
mkdir -p target
{ \
cd libuv && \
sh ./autogen.sh && \
CFLAGS=-fPIC ./configure --disable-shared --prefix=$(CWD)/target && \
make && \
make install && \
cp -f $(CWD)/target/lib/pkgconfig/libuv.pc $(CWD)/libuv.pc && \
find $(CWD)/target/include/uv/**.h -type f | xargs sed 's/uv\//.\//g' -i; \
} >&2
distclean: clean
$(MAKE) $@ -C libuv