Makefiles: do not rely on /bin/true. define do_strip as a macro for debug and

non-debug cases and use it, instead. (adapted from tyrquake makefile.)


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@141 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2010-04-24 14:50:18 +00:00
parent 0a16b3bcca
commit f057a48130
4 changed files with 24 additions and 16 deletions

View File

@ -63,14 +63,16 @@ CFLAGS += $(CPUFLAGS)
ifneq ($(DEBUG),0)
DFLAGS += -DDEBUG
CFLAGS += -g
#STRIP_CMD := @echo "not stripping"
STRIP_CMD := @/bin/true
do_strip=
else
DFLAGS += -DNDEBUG
CFLAGS += -O2
CFLAGS += $(call check_gcc,-fweb,)
CFLAGS += $(call check_gcc,-frename-registers,)
STRIP_CMD := $(STRIP)
cmd_strip=$(STRIP) $(1)
define do_strip
$(call cmd_strip,$(1));
endef
endif
### X11BASE only gets used if its in an unusual place
@ -139,7 +141,7 @@ common.o gl_rlight.o host_cmd.o net_loop.o r_brush.o sv_main.o conb
quakespasm: $(OBJS)
$(CC) $(CFLAGS) -o quakespasm $(OBJS) $(X11_LFLAGS) $(SDL_LFLAGS) $(LIBS)
$(STRIP_CMD) $@
$(call do_strip,$@)
release: quakespasm
debug:

View File

@ -69,14 +69,16 @@ CFLAGS += $(CPUFLAGS)
ifneq ($(DEBUG),0)
DFLAGS += -DDEBUG
CFLAGS += -g
#STRIP_CMD := @echo "not stripping"
STRIP_CMD := @/bin/true
do_strip=
else
DFLAGS += -DNDEBUG
CFLAGS += -O2
CFLAGS += $(call check_gcc,-fweb,)
CFLAGS += $(call check_gcc,-frename-registers,)
STRIP_CMD := $(STRIP)
cmd_strip=$(STRIP) $(1)
define do_strip
$(call cmd_strip,$(1));
endef
endif
### X11BASE only gets used if its in an unusual place
@ -147,7 +149,7 @@ common.o gl_rlight.o host_cmd.o net_loop.o r_brush.o sv_main.o conb
quakespasm: $(OBJS)
$(CC) $(CFLAGS) -o quakespasm $(OBJS) $(X11_LFLAGS) $(SDL_LFLAGS) $(LIBS)
$(STRIP_CMD) $@
$(call do_strip,$@)
release: quakespasm
debug:

View File

@ -34,14 +34,16 @@ CFLAGS += $(CPUFLAGS)
ifneq ($(DEBUG),0)
DFLAGS += -DDEBUG
CFLAGS += -g
#STRIP_CMD := @echo "not stripping"
STRIP_CMD := @/bin/true
do_strip=
else
DFLAGS += -DNDEBUG
CFLAGS += -O2
CFLAGS += $(call check_gcc,-fweb,)
CFLAGS += $(call check_gcc,-frename-registers,)
STRIP_CMD := $(STRIP)
cmd_strip=$(STRIP) $(1)
define do_strip
$(call cmd_strip,$(1));
endef
endif
SDL_CONFIG ?= sdl-config
@ -93,7 +95,7 @@ QuakeSpasm.res
quakespasm.exe: $(OBJS)
$(CC) $(CFLAGS) -o quakespasm.exe $(OBJS) $(SDL_LFLAGS) $(LIBS)
$(STRIP_CMD) quakespasm.exe
$(call do_strip,$@)
release: quakespasm.exe
debug:

View File

@ -34,14 +34,16 @@ CFLAGS += $(CPUFLAGS)
ifneq ($(DEBUG),0)
DFLAGS += -DDEBUG
CFLAGS += -g
#STRIP_CMD := @echo "not stripping"
STRIP_CMD := @/bin/true
do_strip=
else
DFLAGS += -DNDEBUG
CFLAGS += -O2
CFLAGS += $(call check_gcc,-fweb,)
CFLAGS += $(call check_gcc,-frename-registers,)
STRIP_CMD := $(STRIP)
cmd_strip=$(STRIP) $(1)
define do_strip
$(call cmd_strip,$(1));
endef
endif
SDL_CONFIG ?= sdl-config
@ -93,7 +95,7 @@ QuakeSpasm.res
quakespasm.exe: $(OBJS)
$(CC) $(CFLAGS) -o quakespasm.exe $(OBJS) $(SDL_LFLAGS) $(LIBS)
$(STRIP_CMD) quakespasm.exe
$(call do_strip,$@)
release: quakespasm.exe
debug: