diff --git a/sc2/Makeinfo b/sc2/Makeinfo index 4eb61d122..0b73c152d 100644 --- a/sc2/Makeinfo +++ b/sc2/Makeinfo @@ -11,3 +11,15 @@ else fi uqm_CFLAGS="$uqm_CFLAGS -I src -I src/sc2code -I src/sc2code/libs" +# Stuff to install under the directory for libraries, as specified during +# config. +uqm_INSTALL_LIBS=content +uqm_INSTALL_LIB_content_SRC=content +uqm_INSTALL_LIB_content_DEST=uqm/ + +# Stuff to install under the directory for binaries, as specified during +# config. +uqm_INSTALL_BINS=uqm +uqm_INSTALL_BIN_uqm_SRC="$uqm_NAME" +uqm_INSTALL_BIN_uqm_dest="" + diff --git a/sc2/build.vars.in b/sc2/build.vars.in index ccd788baa..ab0a4a22a 100644 --- a/sc2/build.vars.in +++ b/sc2/build.vars.in @@ -21,6 +21,8 @@ MAKE="@MAKE@" uqm_CFLAGS="@CFLAGS@" uqm_LDFLAGS="@LDFLAGS@" DEBUG="@DEBUG@" +uqm_INSTALL_BINDIR="@INSTALL_BINDIR@" +uqm_INSTALL_LIBDIR="@INSTALL_LIBDIR@" # Exported variables are available from all the Makeinfo files # Non-exported files only where build.vars is explicitely included. diff --git a/sc2/build/build.config b/sc2/build/build.config index a4695258e..1d1987871 100644 --- a/sc2/build/build.config +++ b/sc2/build/build.config @@ -46,7 +46,7 @@ debug_action() { DEBUG=1 } CHOICE_debug_OPTION_nodebug_TITLE="No debugging information" -CHOICE_debug_OPTION_nodebug_ACTION='debug_action' +CHOICE_debug_OPTION_nodebug_ACTION='nodebug_action' nodebug_action() { CFLAGS="$CFLAGS -O3" DEBUG=0 @@ -134,14 +134,15 @@ prefix="$INPUT_install_prefix_VALUE" \ CONTENTDIR="${INSTALL_LIBDIR}uqm/content" +# Export the HAVE_ symbols to config.h, using config.h.in as template +SUBSTITUTE_VARS="$HAVE_SYMBOLS CONTENTDIR" +SUBSTITUTE_FILES="src/config.h" +substitute_vars SUBSTITUTE_VARS SUBSTITUTE_FILES +CFLAGS="$CFLAGS -DHAVE_CONFIG_H" + # Make build.vars from build.vars.in, substituting variables. SUBSTITUTE_VARS="CFLAGS LDFLAGS MAKE DEBUG SOUNDMODULE HAVE_OPENGL \ INSTALL_LIBDIR INSTALL_BINDIR" SUBSTITUTE_FILES="build.vars" substitute_vars SUBSTITUTE_VARS SUBSTITUTE_FILES -# Export the HAVE_ symbols to config.h, using config.h.in as template -SUBSTITUTE_VARS="$HAVE_SYMBOLS CONTENTDIR" -SUBSTITUTE_FILES="src/config.h" -substitute_vars SUBSTITUTE_VARS SUBSTITUTE_FILES - diff --git a/sc2/src/sc2code/libs/sound/Makeinfo b/sc2/src/sc2code/libs/sound/Makeinfo index 7736b605e..fe2071d52 100644 --- a/sc2/src/sc2code/libs/sound/Makeinfo +++ b/sc2/src/sc2code/libs/sound/Makeinfo @@ -1,7 +1,9 @@ if [ "$uqm_SOUNDMODULE" = openal ]; then uqm_SUBDIRS="openal" + uqm_CFLAGS="$uqm_CFLAGS -DSOUNDMODULE_OPENAL" else uqm_SUBDIRS="sdl" + uqm_CFLAGS="$uqm_CFLAGS -DSOUNDMODULE_SDL" fi uqm_CFILES="fileinst.c resinst.c sound_common.c"