From 2357325e56fbd87ab375f0aecba2e76e4f92abdf Mon Sep 17 00:00:00 2001 From: sezero Date: Wed, 30 May 2012 09:47:45 +0000 Subject: [PATCH] Makefiles: defined new variable LINKER. for linkage we no longer use $(CC), but $(LINKER) git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@679 af15c1b1-3010-417e-b628-4374ebc0bcbd --- quakespasm/Quake/Makefile | 7 ++++--- quakespasm/Quake/Makefile.darwin | 8 ++++---- quakespasm/Quake/Makefile.w32 | 8 +++++--- quakespasm/Quake/Makefile.w64 | 8 +++++--- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/quakespasm/Quake/Makefile b/quakespasm/Quake/Makefile index 457aaa93..664ec1bf 100644 --- a/quakespasm/Quake/Makefile +++ b/quakespasm/Quake/Makefile @@ -1,5 +1,4 @@ -### GNU Makefile for QuakeSpasm unix targets, March 09, 2012 -# +# GNU Makefile for QuakeSpasm unix targets, May 30, 2012 # You need the SDL library fully installed. # "make DEBUG=1" to build a debug client. # "make SDL_CONFIG=/path/to/sdl-config" for unusual SDL installations. @@ -40,6 +39,8 @@ CC ?= gcc WINDRES ?= windres STRIP ?= strip +LINKER = $(CC) + #CPUFLAGS= -mtune=i686 #CPUFLAGS= -march=pentium4 #CPUFLAGS= -mtune=k8 @@ -255,7 +256,7 @@ OBJS := strlcat.o \ # ------------------------ quakespasm: $(OBJS) - $(CC) $(OBJS) $(X11_LFLAGS) $(LIBS) $(SDL_LIBS) -o $@ + $(LINKER) $(OBJS) $(X11_LFLAGS) $(LIBS) $(SDL_LIBS) -o $@ $(call do_strip,$@) release: quakespasm diff --git a/quakespasm/Quake/Makefile.darwin b/quakespasm/Quake/Makefile.darwin index a69fba78..4f486092 100644 --- a/quakespasm/Quake/Makefile.darwin +++ b/quakespasm/Quake/Makefile.darwin @@ -1,7 +1,5 @@ -### GNU Makefile for QuakeSpasm for Darwin, March 09, 2012 - +# GNU Makefile for QuakeSpasm for Darwin, May 30, 2012 # Usage: "make -f Makefile.darwin" -# # You need the SDL library fully installed. # "make DEBUG=1" to build a debug client. # "make SDL_CONFIG=/path/to/sdl-config" for unusual SDL installations. @@ -58,6 +56,8 @@ CC ?= gcc WINDRES ?= windres STRIP ?= strip +LINKER = $(CC) + #CPUFLAGS= -mtune=i686 #CPUFLAGS= -march=pentium4 #CPUFLAGS= -mtune=k8 @@ -274,7 +274,7 @@ OBJS := strlcat.o \ # ------------------------ quakespasm: $(OBJS) - $(CC) $(OBJS) $(X11_LFLAGS) -L../MacOSX $(LIBS) $(SDL_LIBS) -o $@ + $(LINKER) $(OBJS) $(X11_LFLAGS) -L../MacOSX $(LIBS) $(SDL_LIBS) -o $@ $(call do_strip,$@) release: quakespasm diff --git a/quakespasm/Quake/Makefile.w32 b/quakespasm/Quake/Makefile.w32 index 948f4bf4..821d43fe 100644 --- a/quakespasm/Quake/Makefile.w32 +++ b/quakespasm/Quake/Makefile.w32 @@ -1,5 +1,5 @@ -# GNU Makefile for cross-compiling quakespasm.exe (Win32 : MinGW) -# using cross-toolchains on a linux host / March 09, 2012 +# GNU Makefile for cross-compiling quakespasm.exe (Win32: MinGW) +# using cross-toolchains on a linux host, May 30, 2012 # "make DEBUG=1" to build a debug client. # "make SDL_CONFIG=/path/to/sdl-config" for unusual SDL installations. # "make WINSOCK2=1" to use WinSock2 api instead of old WinSock 1.1. @@ -49,6 +49,8 @@ CC = $(TOOLCHAIN_PREFIX)gcc WINDRES = $(TOOLCHAIN_PREFIX)windres STRIP = $(TOOLCHAIN_PREFIX)strip +LINKER = $(CC) + #CPUFLAGS= -mtune=i686 #CPUFLAGS= -march=pentium4 CPUFLAGS= @@ -256,7 +258,7 @@ OBJS := strlcat.o \ # ------------------------ quakespasm.exe: $(OBJS) - $(CC) $(OBJS) $(LIBS) $(SDL_LIBS) -o $@ + $(LINKER) $(OBJS) $(LIBS) $(SDL_LIBS) -o $@ $(call do_strip,$@) release: quakespasm.exe diff --git a/quakespasm/Quake/Makefile.w64 b/quakespasm/Quake/Makefile.w64 index 67e0b04f..e798196b 100644 --- a/quakespasm/Quake/Makefile.w64 +++ b/quakespasm/Quake/Makefile.w64 @@ -1,5 +1,5 @@ -# GNU Makefile for cross-compiling quakespasm.exe (Win64 : MinGW-w64) -# using cross-toolchains on a linux host / March 09, 2012 +# GNU Makefile for cross-compiling quakespasm.exe (Win64: MinGW-w64) +# using cross-toolchains on a linux host, May 30, 2012 # "make DEBUG=1" to build a debug client. # "make SDL_CONFIG=/path/to/sdl-config" for unusual SDL installations. # "make WINSOCK2=0" to use the old WinSock 1.1 api (NOT recommended). @@ -49,6 +49,8 @@ CC = $(TOOLCHAIN_PREFIX)gcc WINDRES = $(TOOLCHAIN_PREFIX)windres STRIP = $(TOOLCHAIN_PREFIX)strip +LINKER = $(CC) + #CPUFLAGS= -mtune=k8 #CPUFLAGS= -march=atom CPUFLAGS= @@ -256,7 +258,7 @@ OBJS := strlcat.o \ # ------------------------ quakespasm.exe: $(OBJS) - $(CC) $(OBJS) $(LIBS) $(SDL_LIBS) -o $@ + $(LINKER) $(OBJS) $(LIBS) $(SDL_LIBS) -o $@ $(call do_strip,$@) release: quakespasm.exe