From 986fd86c796f686696eb9b4ce1d5fa1c1c2d6c43 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Sat, 24 Apr 2010 14:50:18 +0000 Subject: [PATCH] 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@141 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/Makefile | 10 ++++++---- Quake/Makefile.darwin | 10 ++++++---- Quake/Makefile.w32 | 10 ++++++---- Quake/Makefile.w64 | 10 ++++++---- 4 files changed, 24 insertions(+), 16 deletions(-) diff --git a/Quake/Makefile b/Quake/Makefile index e72f4ece..22b71e72 100644 --- a/Quake/Makefile +++ b/Quake/Makefile @@ -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: diff --git a/Quake/Makefile.darwin b/Quake/Makefile.darwin index a0f14da4..cdce0e71 100644 --- a/Quake/Makefile.darwin +++ b/Quake/Makefile.darwin @@ -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: diff --git a/Quake/Makefile.w32 b/Quake/Makefile.w32 index ecca0cba..ccedb6fb 100644 --- a/Quake/Makefile.w32 +++ b/Quake/Makefile.w32 @@ -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: diff --git a/Quake/Makefile.w64 b/Quake/Makefile.w64 index cc5a01c6..00f38907 100644 --- a/Quake/Makefile.w64 +++ b/Quake/Makefile.w64 @@ -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: