-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (31 loc) · 887 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
TOPDIR=`pwd`
CROSS =
CPP = $(CROSS)g++
CC = $(CROSS)gcc
LD = $(CROSS)ld
AR = $(CROSS)ar
STRIP = $(CROSS)strip
CFLAGS += -Wall -O2 -Os
CFLAGS += -D_REENTRANT -msoft-float
CFLAGS += -g
LDFLAGS += -lpthread -lrt -lssl -lcrypto
AFLAGS += -r
CFLAGS+=-I $(TOPDIR)/Depends/include/libevent/linux/
##LDFLAGS+=-L ./Depends/lib/libevent/ -levent
LDFLAGS+=-L ./Depends/lib/libevent/linux -levent_core
LDFLAGS+=-L ./Depends/lib/libevent/linux -levent
##LDFLAGS+=-L ./Depends/lib/libcurl -lcurl
LDFLAGS+=-lcurl
SRC_PATH := src src/utils
#src/utils
SRC_FILE_CPP := $(foreach dir, ${SRC_PATH}, $(wildcard $(dir)/*.cpp))
LIB_CPP_OBJS = $(patsubst %.cpp, %.o,${SRC_FILE_CPP})
LIB_TARGET=proxy
ALL : $(LIB_TARGET)
$(LIB_TARGET) : $(LIB_CPP_OBJS)
$(CPP) $(LIB_CPP_OBJS) -o $(LIB_TARGET) $(LDFLAGS)
%.o: %.cpp
$(CPP) -c $(CFLAGS) $(CFLAGS_NDBG) $< -o $@
clean:
rm src/*.o -f
rm $(LIB_TARGET)