Script.c: remove C99 for loop var declaration
[rofl0r-agsutils.git] / Makefile.binary
blob6bc789b5ba5b1b6a649cbf87d08c2cf3343e1a7c
1 LINKLIBS="-lpthread"
3 MAINFILE=$(FNAME).c
4 OUTFILE=$(FNAME).out
6 CFLAGS_OWN=-Wall -Wextra -static -std=c99
7 CFLAGS_DBG=-g -O0
8 CFLAGS_OPT=-Os -s
9 CFLAGS_OPT_AGGRESSIVE=-O3 -s -flto -fwhole-program
11 -include config.mak
13 CFLAGS_RCB_OPT_AGGRESSIVE=$(DB_FLAGS) ${CFLAGS_OWN} ${CFLAGS_OPT_AGGRESSIVE} ${CFLAGS}
14 CFLAGS_RCB_OPT=$(DB_FLAGS) ${CFLAGS_OWN} ${CFLAGS_OPT} ${CFLAGS}
15 CFLAGS_RCB_DBG=$(DB_FLAGS) ${CFLAGS_OWN} ${CFLAGS_DBG} ${CFLAGS}
17 RCB=rcb2
19 all: debug
21 clean:
22         rm -f $(OUTFILE)
23         rm -f *.o
24         rm -f $(FNAME).rcb
26 optimized:
27         CFLAGS="${CFLAGS_RCB_OPT} -s" $(RCB) $(RCBFLAGS) ${MAINFILE} $(LINKLIBS)
28         strip --remove-section .comment ${OUTFILE}
30 optimized-aggressive:
31         CFLAGS="${CFLAGS_RCB_OPT_AGGRESSIVE} -s" $(RCB) $(RCBFLAGS) ${MAINFILE} $(LINKLIBS)
32         strip --remove-section .comment ${OUTFILE}
34 odebug:
35         CFLAGS="${CFLAGS_RCB_OPT} -g" $(RCB) $(RCBFLAGS) ${MAINFILE} $(LINKLIBS)
36         debug-stripper.sh $(OUTFILE)
38 debug:
39         CFLAGS="${CFLAGS_RCB_DBG}" $(RCB) $(RCBFLAGS) ${MAINFILE} $(LINKLIBS)
42 .PHONY: all optimized optimized-aggressive debug odebug