palpic2png.c: improve, make usable with ppic binary files
[rofl0r-openDOW.git] / Makefile
blobfaa2bf8d07962268122f86ab11227fd461e30059
1 LINKLIBS="-lpthread -lm"
3 FNAME=spriteview
5 MAINFILE=$(FNAME).c
6 OUTFILE=$(FNAME).out
8 CFLAGS_OWN=-Wall -Wextra -DFLOD_NO_SOUNDBLASTER -DPALPIC_SDL -I.
9 CFLAGS_DBG=-g3 -O0
10 CFLAGS_OPT=-Os -s
11 CFLAGS_OPT_AGGRESSIVE=-O3 -s -flto -fwhole-program
13 -include config.mak
15 CFLAGS_RCB_OPT_AGGRESSIVE=$(DB_FLAGS) ${CFLAGS_OWN} ${CFLAGS_OPT_AGGRESSIVE} ${CFLAGS}
16 CFLAGS_RCB_OPT=$(DB_FLAGS) ${CFLAGS_OWN} ${CFLAGS_OPT} ${CFLAGS}
17 CFLAGS_RCB_DBG=$(DB_FLAGS) ${CFLAGS_OWN} ${CFLAGS_DBG} ${CFLAGS}
19 RCB=rcb2
21 all: debug
23 clean:
24 rm -f $(OUTFILE)
25 rm -f *.o
26 rm -f $(FNAME).rcb
28 optimized:
29 CFLAGS="${CFLAGS_RCB_OPT} -s" $(RCB) $(RCBFLAGS) ${MAINFILE} $(LINKLIBS)
30 strip --remove-section .comment ${OUTFILE}
32 optimized-aggressive:
33 CFLAGS="${CFLAGS_RCB_OPT_AGGRESSIVE} -s" $(RCB) $(RCBFLAGS) ${MAINFILE} $(LINKLIBS)
34 strip --remove-section .comment ${OUTFILE}
36 odebug:
37 CFLAGS="${CFLAGS_RCB_OPT} -g" $(RCB) $(RCBFLAGS) ${MAINFILE} $(LINKLIBS)
38 debug-stripper.sh $(OUTFILE)
40 debug:
41 CFLAGS="${CFLAGS_RCB_DBG}" $(RCB) $(RCBFLAGS) ${MAINFILE} $(LINKLIBS)
44 .PHONY: all optimized optimized-aggressive debug odebug