update README and Makefile for RcB2
[rofl0r-rocksocks5.git] / Makefile
blobb7a29e34592c27863d6a94c281c0d4d511d689f1
1 INCLUDES="."
2 LINKDIRS=
3 LINKLIBS=
5 FNAME=socksserver
6 MAINFILE=$(FNAME).c
8 -include config.mak
10 CFLAGS_OWN=-Wall -D_GNU_SOURCE -std=c99 -static $(CFLAGS)
11 #c99 for firedns compatibility (restrict keyword)
12 CFLAGS_DBG=-g -O0
13 CFLAGS_OPT=-s -Os -flto -fwhole-program
14 CFLAGS_OPT_HEAVY=$(CFLAGS_OPT) -flto -fwhole-program -fno-asynchronous-unwind-tables -nostartfiles $(MUSL_DIR)/lib/crt1.o
16 RCB=rcb2
18 CFLAGS_RCB_OPTH=${CFLAGS_OWN} ${CFLAGS_OPT_HEAVY} -I ${INCLUDES} ${LINKLIBS} ${CFLAGS}
19 CFLAGS_RCB_OPT=${CFLAGS_OWN} ${CFLAGS_OPT} -I ${INCLUDES} ${LINKLIBS} ${CFLAGS}
20 CFLAGS_RCB_DBG=${CFLAGS_OWN} ${CFLAGS_DBG} -I ${INCLUDES} ${LINKLIBS} ${CFLAGS}
22 all: debug
24 clean:
25 rm $(FNAME).rcb $(FNAME).out $(FNAME).o
27 optimized-heavy:
28 CFLAGS="${CFLAGS_RCB_OPTH}" $(RCB) ${RCBFLAGS} ${MAINFILE}
29 strip --remove-section .comment $(FNAME).out
30 strip --remove-section .comment.SUSE.OPTs $(FNAME).out
32 optimized:
33 CFLAGS="${CFLAGS_RCB_OPT}" $(RCB) ${RCBFLAGS} ${MAINFILE}
34 strip --remove-section .comment $(FNAME).out
36 debug:
37 CFLAGS="${CFLAGS_RCB_DBG}" $(RCB) ${RCBFLAGS} ${MAINFILE}
40 .PHONY: all optimized debug