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
This commit is contained in:
Ozkan Sezer 2011-12-27 10:10:51 +00:00
parent ca4124194f
commit b9d2d0aea1
4 changed files with 12 additions and 12 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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