Separate config files for MinGW/Cygwin.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1921 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -38,9 +38,9 @@ library dirs in LDFLAGS.
|
|||||||
|
|
||||||
Run configure:
|
Run configure:
|
||||||
./build.sh uqm config
|
./build.sh uqm config
|
||||||
This will produce the file 'build.vars' and 'config_unix.h'. If there
|
This will produce the file 'build.vars' and 'config_unix.h' (or config_win.h
|
||||||
are any problems during the build, you can usually easilly solve them
|
on MinGW or Cygwin). If there are any problems during the build, you can
|
||||||
by editing these files manually.
|
usually easilly solve them by editing these files manually.
|
||||||
|
|
||||||
Start the compilation:
|
Start the compilation:
|
||||||
./build.sh uqm
|
./build.sh uqm
|
||||||
|
|||||||
@@ -236,9 +236,16 @@ uqm_process_config() {
|
|||||||
CFLAGS="$CFLAGS -I \"$BUILD_WORK\""
|
CFLAGS="$CFLAGS -I \"$BUILD_WORK\""
|
||||||
|
|
||||||
# Export the HAVE_ symbols to config_unix.h, using config_unix.h.in
|
# Export the HAVE_ symbols to config_unix.h, using config_unix.h.in
|
||||||
# as template.
|
# as template (or config_win.h/config_win.h.in).
|
||||||
SUBSTITUTE_VARS="$HAVE_SYMBOLS CONTENTDIR"
|
SUBSTITUTE_VARS="$HAVE_SYMBOLS CONTENTDIR"
|
||||||
|
case "$HOST_SYSTEM" in
|
||||||
|
MINGW32*|CYGWIN*)
|
||||||
|
SUBSTITUTE_FILES="config_win.h"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
SUBSTITUTE_FILES="config_unix.h"
|
SUBSTITUTE_FILES="config_unix.h"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
substitute_vars SUBSTITUTE_VARS SUBSTITUTE_FILES src "$BUILD_WORK"
|
substitute_vars SUBSTITUTE_VARS SUBSTITUTE_FILES src "$BUILD_WORK"
|
||||||
|
|
||||||
# Make build.vars from build.vars.in, substituting variables.
|
# Make build.vars from build.vars.in, substituting variables.
|
||||||
@@ -379,4 +386,15 @@ uqm_install_osx() {
|
|||||||
cp $uqm_NAME "$INSTROOT/MacOS/The Ur-Quan Masters"
|
cp $uqm_NAME "$INSTROOT/MacOS/The Ur-Quan Masters"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uqm_clean() {
|
||||||
|
case "$HOST_SYSTEM" in
|
||||||
|
MINGW32*|CYGWIN*)
|
||||||
|
rm -f "$BUILD_WORK/config_win.h"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
rm -f "$BUILD_WORK/config_unix.h"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,8 @@ build_clean() {
|
|||||||
|
|
||||||
eval DEPEND_FILE="\$BUILD_WORK/\${${BUILD_PROJECT}_OBJS}${DEPEND_NAME}"
|
eval DEPEND_FILE="\$BUILD_WORK/\${${BUILD_PROJECT}_OBJS}${DEPEND_NAME}"
|
||||||
rm -f "$DEPEND_FILE" "$BUILD_WORK/build.vars" \
|
rm -f "$DEPEND_FILE" "$BUILD_WORK/build.vars" \
|
||||||
"$BUILD_WORK/config.state" "$BUILD_WORK/config_unix.h"
|
"$BUILD_WORK/config.state"
|
||||||
|
eval "${TARGET}_clean"
|
||||||
}
|
}
|
||||||
|
|
||||||
build_cleanall() {
|
build_cleanall() {
|
||||||
|
|||||||
@@ -7,6 +7,10 @@
|
|||||||
* If you want anything else than the defaults, you'll have to edit
|
* If you want anything else than the defaults, you'll have to edit
|
||||||
* that file manually. */
|
* that file manually. */
|
||||||
# include "msvc++/config.h"
|
# include "msvc++/config.h"
|
||||||
|
#elif defined (__MINGW32__) || defined (__CYGWIN__)
|
||||||
|
/* If we're compiling on MS Windows using build.sh, use
|
||||||
|
* config_win.h, generated from * src/config_win.h.in. */
|
||||||
|
# include "config_win.h"
|
||||||
#else
|
#else
|
||||||
/* If we're compiling in unix, use config_unix.h, generated from
|
/* If we're compiling in unix, use config_unix.h, generated from
|
||||||
* src/config_unix.h.in by build.sh. */
|
* src/config_unix.h.in by build.sh. */
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
/* This file contains some compile-time configuration options for *nix
|
/* This file contains some compile-time configuration options for *nix
|
||||||
* systems.
|
* systems.
|
||||||
* config_unix.h is generated from config_unix.h.in by build.sh
|
* config_unix.h is generated from config_unix.h.in by build.sh
|
||||||
* For windows, you'll have to edit src/msvc++/config.h manually
|
* When building on MS Windows using build.sh (MinGW, Cygwin),
|
||||||
* if you want anything else than the defaults.
|
* config_win.h is generated from src/config_win.h.in.
|
||||||
|
* When using MSVC on MS Windows, you'll have to edit src/msvc++/config.h
|
||||||
|
* manually if you want anything else than the defaults.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _CONFIG_UNIX_H
|
#ifndef _CONFIG_UNIX_H
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
/* This file contains some compile-time configuration options for MS Windows
|
||||||
|
* systems when building using build.sh (MinGW, Cygwin).
|
||||||
|
* config_win.h is generated from src/config_win.h.in by build.sh
|
||||||
|
* For building using MSVC, you'll have to edit src/msvc++/config.h manually
|
||||||
|
* if you want anything else than the defaults.
|
||||||
|
* For *nix systems, config_unix.h is used, which is generated by build.sh
|
||||||
|
* from src/config_unix.h.in.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _CONFIG_WIN_H
|
||||||
|
#define _CONFIG_WIN_H
|
||||||
|
|
||||||
|
/* Directory where the UQM game data is located */
|
||||||
|
#define CONTENTDIR "@CONTENTDIR@"
|
||||||
|
|
||||||
|
/* Directory where game data will be stored */
|
||||||
|
//#define USERDIR "../userdata/"
|
||||||
|
#define USERDIR "%APPDATA%/uqm/"
|
||||||
|
|
||||||
|
/* Directory where config files will be stored */
|
||||||
|
#define CONFIGDIR USERDIR
|
||||||
|
|
||||||
|
/* Directory where supermelee teams will be stored */
|
||||||
|
#define MELEEDIR "%UQM_CONFIG_DIR%teams/"
|
||||||
|
|
||||||
|
/* Directory where save games will be stored */
|
||||||
|
#define SAVEDIR "%UQM_CONFIG_DIR%save/"
|
||||||
|
|
||||||
|
/* Defined if words are stored with the most significant byte first */
|
||||||
|
@WORDS_BIGENDIAN@
|
||||||
|
|
||||||
|
/* Defined if your system has readdir_r of its own */
|
||||||
|
@HAVE_READDIR_R@
|
||||||
|
|
||||||
|
/* Defined if your system has setenv of its own */
|
||||||
|
@HAVE_SETENV@
|
||||||
|
|
||||||
|
/* Defined if your system has strupr of its own */
|
||||||
|
@HAVE_STRUPR@
|
||||||
|
|
||||||
|
/* Defined if your system has stricmp of its own */
|
||||||
|
@HAVE_STRICMP@
|
||||||
|
|
||||||
|
/* Defined if your system has getopt.h */
|
||||||
|
@HAVE_GETOPT_H@
|
||||||
|
|
||||||
|
/* Defined if your system has iswgraph of its own*/
|
||||||
|
@HAVE_ISWGRAPH@
|
||||||
|
|
||||||
|
/* Defined if your system has wchar_t of its own */
|
||||||
|
@HAVE_WCHAR_T@
|
||||||
|
|
||||||
|
/* Defined if your system has wint_t of its own */
|
||||||
|
@HAVE_WINT_T@
|
||||||
|
|
||||||
|
#endif /* _CONFIG_WIN_H */
|
||||||
|
|
||||||
|
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
/* This file contains some compile-time configuration options for MS Windows
|
/* This file contains some compile-time configuration options for MS Windows
|
||||||
* systems.
|
* systems when building using MSVC.
|
||||||
* Change the values below if you want anything other than the defaults.
|
* Change the values below if you want anything other than the defaults.
|
||||||
* For *nix systems, src/config.h is used, which is generated by
|
* For *nix systems, config_unix.h is used, which is generated by build.sh
|
||||||
* build.sh from src/config.h.in.
|
* from src/config_unix.h.in.
|
||||||
|
* When building on MS Windows using build.sh (MinGW, Cygwin),
|
||||||
|
* config_win.h is generated from src/config_win.h.in.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _CONFIG_H
|
#ifndef _CONFIG_H
|
||||||
|
|||||||
Reference in New Issue
Block a user