forked from pagekite/libpagekite
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.pk
59 lines (47 loc) · 1.68 KB
/
Makefile.pk
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
export HAVE_RELAY := $(shell grep HAVE_RELAY config.h | awk '{print $$3}')
default:
@make -f Makefile.pk native PK_TESTS=0
optimized:
@make -f Makefile.pk all OPT="-O3 -s" PK_TESTS=0
debug:
@cd libpagekite && make tests PK_MEMORY_CANARIES=1 PK_TRACE=1 PK_TESTS=1
@make -f Makefile.pk all PK_MEMORY_CANARIES=1 PK_TRACE=1 PK_TESTS=1
debugwindows:
@make -f Makefile.pk windows PK_MEMORY_CANARIES=1 PK_TRACE=1 PK_TESTS=1
all: native windows
native:
@echo '=== Building for '`uname`' ==='
cp /dev/null config.h
cd libpagekite && make -f Makefile.pk
@mv -v libpagekite/*.a libpagekite/*.so lib/
cd contrib/backends/ && make -f Makefile.pk
@mv -v contrib/backends/pagekitec bin/
@echo
@echo Note: To run the apps, you may need to do this first:
@echo
@echo $$ export LD_LIBRARY_PATH=`pwd`/lib
@echo
nativerelay: native
cd contrib/relays/ && make -f Makefile.pk
@mv -v contrib/relays/pagekiter bin/
windows:
@echo '=== Building for win32 ==='
cd libpagekite && ../tools/bash.mxe -c 'make -f Makefile.pk windows'
@mv -v libpagekite/*.dll libpagekite/*.a lib/
cd contrib/backends/ && ../../tools/bash.mxe -c 'make -f Makefile.pk windows'
@mv -v contrib/backends/*.exe bin/
@echo
version:
@cd libpagekite && make -f Makefile.pk version
publicapi:
@mkdir -p bindings/java/net/pagekite/lib
python2 tools/make-bindings.py include/pagekite.h \
bindings/java/net/pagekite/lib/PageKiteAPI.java \
bindings/python/libpagekite/__init__.py \
libpagekite/pagekite-jni.c \
doc/API.md doc/API_JNI.md
buildclean:
@cd contrib && make -f Makefile.pk clean
@cd libpagekite && make -f Makefile.pk clean
clean: buildclean
rm -rf bin/* lib/*