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: