[quake3-commits] r1535 - trunk
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun May 3 14:49:48 EDT 2009
Author: ludwig
Date: 2009-05-03 14:49:48 -0400 (Sun, 03 May 2009)
New Revision: 1535
Modified:
trunk/Makefile
Log:
set SDL CFLAGS and LIBS at central place
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2009-05-02 18:01:02 UTC (rev 1534)
+++ trunk/Makefile 2009-05-03 18:49:48 UTC (rev 1535)
@@ -187,6 +187,11 @@
# FIXME: introduce CLIENT_CFLAGS
SDL_CFLAGS=$(shell pkg-config --cflags sdl|sed 's/-Dmain=SDL_main//')
SDL_LIBS=$(shell pkg-config --libs sdl)
+else
+ ifeq ($(shell which sdl-config > /dev/null; echo $$?),0)
+ SDL_CFLAGS=$(shell sdl-config --cflags)
+ SDL_LIBS=$(shell sdl-config --libs)
+ endif
endif
# version info
@@ -238,7 +243,7 @@
endif
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
- -pipe -DUSE_ICON $(shell sdl-config --cflags)
+ -pipe -DUSE_ICON $(SDL_CFLAGS)
ifeq ($(USE_OPENAL),1)
BASE_CFLAGS += -DUSE_OPENAL
@@ -299,7 +304,7 @@
THREAD_LIBS=-lpthread
LIBS=-ldl -lm
- CLIENT_LIBS=$(shell sdl-config --libs) -lGL
+ CLIENT_LIBS=$(SDL_LIBS) -lGL
ifeq ($(USE_OPENAL),1)
ifneq ($(USE_OPENAL_DLOPEN),1)
@@ -529,7 +534,7 @@
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
- -DUSE_ICON $(shell sdl-config --cflags)
+ -DUSE_ICON $(SDL_CFLAGS)
ifeq ($(USE_OPENAL),1)
BASE_CFLAGS += -DUSE_OPENAL
@@ -570,7 +575,7 @@
CLIENT_LIBS =
- CLIENT_LIBS += $(shell sdl-config --libs) -lGL
+ CLIENT_LIBS += $(SDL_LIBS) -lGL
ifeq ($(USE_OPENAL),1)
ifneq ($(USE_OPENAL_DLOPEN),1)
@@ -595,7 +600,7 @@
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
- -DUSE_ICON $(shell sdl-config --cflags)
+ -DUSE_ICON $(SDL_CFLAGS)
ifeq ($(USE_OPENAL),1)
BASE_CFLAGS += -DUSE_OPENAL
@@ -626,7 +631,7 @@
CLIENT_LIBS =
- CLIENT_LIBS += $(shell sdl-config --libs) -lGL
+ CLIENT_LIBS += $(SDL_LIBS) -lGL
ifeq ($(USE_OPENAL),1)
ifneq ($(USE_OPENAL_DLOPEN),1)
@@ -681,7 +686,7 @@
MKDIR = mkdir -p
BASE_CFLAGS=-Dstricmp=strcasecmp -Xcpluscomm -woff 1185 \
- -I. $(shell sdl-config --cflags) -I$(ROOT)/usr/include -DNO_VM_COMPILED
+ -I. $(SDL_CFLAGS) -I$(ROOT)/usr/include -DNO_VM_COMPILED
RELEASE_CFLAGS=$(BASE_CFLAGS) -O3
DEBUG_CFLAGS=$(BASE_CFLAGS) -g
@@ -691,7 +696,7 @@
LIBS=-ldl -lm -lgen
# FIXME: The X libraries probably aren't necessary?
- CLIENT_LIBS=-L/usr/X11/$(LIB) $(shell sdl-config --libs) -lGL \
+ CLIENT_LIBS=-L/usr/X11/$(LIB) $(SDL_LIBS) -lGL \
-lX11 -lXext -lm
else # ifeq IRIX
@@ -719,9 +724,8 @@
endif
endif
-
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
- -pipe -DUSE_ICON $(shell sdl-config --cflags)
+ -pipe -DUSE_ICON $(SDL_CFLAGS)
OPTIMIZE = -O3 -ffast-math -funroll-loops
@@ -730,6 +734,7 @@
-fstrength-reduce -falign-functions=2 \
-mtune=ultrasparc3 -mv8plus -mno-faster-structs \
-funroll-loops #-mv8plus
+ HAVE_VM_COMPILED=true
else
ifeq ($(ARCH),i386)
OPTIMIZE = -O3 -march=i586 -fomit-frame-pointer -ffast-math \
@@ -759,7 +764,7 @@
BOTCFLAGS=-O0
- CLIENT_LIBS +=$(shell sdl-config --libs) -lGL
+ CLIENT_LIBS +=$(SDL_LIBS) -lGL -lX11 -lXext -liconv -lm
else # ifeq sunos
@@ -993,6 +998,12 @@
echo " $$i"; \
done
@echo ""
+ @echo " CLIENT_LIBS:"
+ - at for i in $(CLIENT_LIBS); \
+ do \
+ echo " $$i"; \
+ done
+ @echo ""
@echo " Output:"
- at for i in $(TARGETS); \
do \
More information about the quake3-commits
mailing list