From b9d2d0aea15c51b88a9b6ea1dd41632733674bde Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Tue, 27 Dec 2011 10:10:51 +0000 Subject: [PATCH] Makefiles update: Passing the libraries to the linker before passing the object list is a bad idea. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@556 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/Makefile | 6 +++--- Quake/Makefile.darwin | 6 +++--- Quake/Makefile.w32 | 6 +++--- Quake/Makefile.w64 | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Quake/Makefile b/Quake/Makefile index 9f010417..8ba682d4 100644 --- a/Quake/Makefile +++ b/Quake/Makefile @@ -1,4 +1,4 @@ -### GNU Makefile for QuakeSpasm unix targets, Aug. 27, 2011 +### GNU Makefile for QuakeSpasm unix targets, Dec. 27, 2011 # # You need the SDL library fully installed. # "make DEBUG=1" to build a debug client. @@ -108,7 +108,7 @@ endif SDL_CONFIG ?= sdl-config SDL_CFLAGS := $(shell $(SDL_CONFIG) --cflags) -SDL_LFLAGS := $(shell $(SDL_CONFIG) --libs) +SDL_LIBS := $(shell $(SDL_CONFIG) --libs) ifeq ($(SDLNET),1) NET_LIBS :=-lSDL_net @@ -271,7 +271,7 @@ OBJS := \ # ------------------------ quakespasm: $(OBJS) - $(CC) $(CFLAGS) -o quakespasm $(OBJS) $(X11_LFLAGS) $(SDL_LFLAGS) $(LIBS) + $(CC) $(OBJS) $(X11_LFLAGS) $(LIBS) $(SDL_LIBS) -o $@ $(call do_strip,$@) release: quakespasm diff --git a/Quake/Makefile.darwin b/Quake/Makefile.darwin index a3ffb1ab..276b3af5 100644 --- a/Quake/Makefile.darwin +++ b/Quake/Makefile.darwin @@ -1,4 +1,4 @@ -### GNU Makefile for QuakeSpasm for Darwin, Aug. 27, 2011 +### GNU Makefile for QuakeSpasm for Darwin, Dec. 27, 2011 # Usage: "make -f Makefile.darwin" # @@ -130,7 +130,7 @@ endif #SDL_CONFIG ?= sdl-config SDL_CONFIG=/usr/local/bin/sdl-config SDL_CFLAGS := $(shell $(SDL_CONFIG) --cflags) -SDL_LFLAGS := $(shell $(SDL_CONFIG) --libs) +SDL_LIBS := $(shell $(SDL_CONFIG) --libs) ifeq ($(SDLNET),1) NET_LIBS :=-L/usr/local/lib -l SDL_net @@ -297,7 +297,7 @@ OBJS := \ # ------------------------ quakespasm: $(OBJS) - $(CC) $(CFLAGS) -o quakespasm $(OBJS) $(X11_LFLAGS) $(SDL_LFLAGS) -L../MacOSX $(LIBS) + $(CC) $(OBJS) $(X11_LFLAGS) -L../MacOSX $(LIBS) $(SDL_LIBS) -o $@ $(call do_strip,$@) release: quakespasm diff --git a/Quake/Makefile.w32 b/Quake/Makefile.w32 index 0d23e20e..df3172d2 100644 --- a/Quake/Makefile.w32 +++ b/Quake/Makefile.w32 @@ -1,5 +1,5 @@ # GNU Makefile for cross-compiling quakespasm.exe (Win32 : MinGW) -# using cross-toolchains on a linux host / Aug. 27, 2011. +# using cross-toolchains on a linux host / Dec. 27, 2011. # "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. @@ -76,7 +76,7 @@ endif SDL_CONFIG ?= sdl-config SDL_CFLAGS := $(shell $(SDL_CONFIG) --cflags) -SDL_LFLAGS := $(shell $(SDL_CONFIG) --libs) +SDL_LIBS := $(shell $(SDL_CONFIG) --libs) ifeq ($(WINSOCK2),1) DEFWINSOCK :=-D_USE_WINSOCK2 @@ -257,7 +257,7 @@ OBJS := \ # ------------------------ quakespasm.exe: $(OBJS) - $(CC) $(CFLAGS) -o quakespasm.exe $(OBJS) $(SDL_LFLAGS) $(LIBS) + $(CC) $(OBJS) $(LIBS) $(SDL_LIBS) -o $@ $(call do_strip,$@) release: quakespasm.exe diff --git a/Quake/Makefile.w64 b/Quake/Makefile.w64 index ede1f78a..1be966b8 100644 --- a/Quake/Makefile.w64 +++ b/Quake/Makefile.w64 @@ -1,5 +1,5 @@ # GNU Makefile for cross-compiling quakespasm.exe (Win64 : MinGW-w64) -# using cross-toolchains on a linux host / Aug. 27, 2011. +# using cross-toolchains on a linux host / Dec. 27, 2011. # "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). @@ -76,7 +76,7 @@ endif SDL_CONFIG ?= sdl-config SDL_CFLAGS := $(shell $(SDL_CONFIG) --cflags) -SDL_LFLAGS := $(shell $(SDL_CONFIG) --libs) +SDL_LIBS := $(shell $(SDL_CONFIG) --libs) ifeq ($(WINSOCK2),1) DEFWINSOCK :=-D_USE_WINSOCK2 @@ -257,7 +257,7 @@ OBJS := \ # ------------------------ quakespasm.exe: $(OBJS) - $(CC) $(CFLAGS) -o quakespasm.exe $(OBJS) $(SDL_LFLAGS) $(LIBS) + $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(SDL_LIBS) -o $@ $(call do_strip,$@) release: quakespasm.exe