forked from dndx/shadowsocks-libuv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (33 loc) · 723 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
UNAME := $(shell uname)
RTFLAGS=-lrt
ifeq ($(UNAME), Darwin)
RTFLAGS=-framework CoreServices
endif
OLEVEL=-O2 -DNDEBUG
CFLAGS=-Wall $(OLEVEL) -I libuv/include -std=gnu99
FILES=server.c utils.c encrypt.c md5.c rc4.c
APP=server
all: $(FILES) libuv/libuv.a
$(CC) $(CFLAGS) -o \
$(APP) $(FILES) \
libuv/libuv.a -lpthread -lcrypto -lm $(RTFLAGS)
libuv/libuv.a:
$(MAKE) -C libuv
valgrind: OLEVEL=-O0 -g
valgrind: all
valgrind --leak-check=full ./server
debug: OLEVEL=-O0 -g
debug: all
gprof: OLEVEL=-O0 -g -pg
gprof: all
test: OLEVEL=-O0 -g
test: FILES=tests.c encrypt.c md5.c rc4.c
test: APP=test
test: all
./test
cd pytest; python test.py
clean:
$(MAKE) -C libuv clean
rm -f server
rm -rf *.dSYM
rm -rf test