summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-11-07 15:53:20 +0000
committertron <tron@openttd.org>2006-11-07 15:53:20 +0000
commitb92ccb7a9834eed4bf4fdc561766f0c5fb28c8a8 (patch)
treea98951c1f3df21c239fee4fd6d9c300e8661be30
parentc6b4834e10f75b5f4c9e8abedb7af109308b2b6a (diff)
downloadopenttd-b92ccb7a9834eed4bf4fdc561766f0c5fb28c8a8.tar.xz
(svn r7100) Evaluate the necessary flags for SDL once per make run, not every time the CFLAGS/LIBS variables are used
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index c97f73d60..6b3f95a0c 100644
--- a/Makefile
+++ b/Makefile
@@ -441,12 +441,14 @@ endif
# SDL config
ifdef WITH_SDL
CDEFS += -DWITH_SDL
-CFLAGS += $(shell $(SDL_CONFIG) --cflags)
+CCFLAGS_SDL := $(shell $(SDL_CONFIG) --cflags)
+CFLAGS += $(CCFLAGS_SDL)
ifdef STATIC
-LIBS += $(shell $(SDL_CONFIG) --static-libs)
+LDFLAGS_SDL := $(shell $(SDL_CONFIG) --static-libs)
else
-LIBS += $(shell $(SDL_CONFIG) --libs)
+LDFLAGS_SDL := $(shell $(SDL_CONFIG) --libs)
endif
+LIBS += $(LDFLAGS_SDL)
endif
# zlib config