forked from boytm/mproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.mingw
48 lines (35 loc) · 1.12 KB
/
Makefile.mingw
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
OPENSSL_DIR=/d/openssl
LIBEVENT_DIR=/d/Sources/libevent-2.0.22-stable
SYSINC:= $(LIBEVENT_DIR)/include/ \
$(LIBEVENT_DIR)/WIN32-Code/ \
$(OPENSSL_DIR)/include
SYSLIB:= $(LIBEVENT_DIR)/.libs/ \
$(OPENSSL_DIR)/lib
CC:= gcc
CFLAGS:= -Wall -g -O2 -static -DNDEBUG -DNO_SYS_UN=1 -DENABLE_SS=1 \
-Ilibevhtp -I libevhtp/compat/ \
-levent -lws2_32 \
-DUSE_CRYPTO_OPENSSL=1 -lcrypto \
$(addprefix -isystem , $(SYSINC)) \
$(addprefix -L , $(SYSLIB))
sources:= evhtp_proxy.c evhtp_sock_relay.c connector.c lru.c log.c \
ss_connector.c encrypt.c \
libevhtp/evhtp.c libevhtp/htparse.c libevhtp/evhtp_numtoa.c
objects:= $(sources:.c=.o)
depends:= $(sources:.c=.d)
.PHONY: all clean
all: mproxy
libevhtp/evhtp-config.h: evhtp-config.h.win32
cp $< $@
libevhtp/compat/sys/tree.h libevhtp/compat/sys/queue.h : %.h : %.h.in
cp $< $@
$(objects): %.o: %.c
$(CC) -c $(CFLAGS) $< -o $@
$(sources:.c=.d): %.d: %.c
$(CC) -M $(CFLAGS) $< > $@
$(depends) : libevhtp/evhtp-config.h libevhtp/compat/sys/queue.h libevhtp/compat/sys/tree.h
include $(sources:.c=.d)
mproxy : $(objects)
$(CC) -o $@ $^ $(CFLAGS)
clean:
-rm -f $(objects) mproxy