Make SYSTEMWIDE options in Makefile configurable from Console

With the WITH_SYSTEMWIDE (yes/no) and WITH_SYSTEMDIR (actual path) options
This commit is contained in:
Daniel Gibson 2012-04-29 15:54:15 +02:00
parent ebccfc63df
commit 8612950e0a

View file

@ -30,8 +30,8 @@ WITH_CDA:=yes
# dependencies to libogg, libvorbis and libvorbisfile.
WITH_OGG:=yes
# Enables the optional OpenAL sound systems. Adds
# a dependencx to libopenal
# Enables the optional OpenAL sound system.
# To use it your system needs libopenal.so.1 installed
WITH_OPENAL:=yes
# Enables retexturing support. Adds a dependency to
@ -47,6 +47,11 @@ WITH_X11GAMMA:=no
# Adds a dependency to libz
WITH_ZIP:=yes
# Enable systemwide installation of game assets
WITH_SYSTEMWIDE:=no
# this will set the default SYSTEMDIR, a non-empty string would actually be used
WITH_SYSTEMDIR:=""
# ====================================================== #
# !!! DO NOT ALTER ANYTHING BELOW THIS LINE !!! #
# ====================================================== #
@ -95,6 +100,16 @@ CFLAGS := -O2 -fno-strict-aliasing -fomit-frame-pointer \
# ----------
# Systemwide installation
ifeq ($(WITH_SYSTEMWIDE),yes)
CFLAGS += -DSYSTEMWIDE
ifneq ($(WITH_SYSTEMDIR),"")
CFLAGS += -DSYSTEMDIR=\"$(WITH_SYSTEMDIR)\"
endif
endif
# ----------
# Extra CFLAGS for SDL
SDLCFLAGS := $(shell sdl-config --cflags)