Some updates. Still needs work.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@642 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
meep-eep
2003-02-03 01:48:13 +00:00
parent e38e04270d
commit 16b72cb7fb
6 changed files with 88 additions and 44 deletions
+11
View File
@@ -1,6 +1,13 @@
default: default:
./build sc2 ./build sc2
%.rc.o:
@DIR=$(dir $@); \
if [ ! -d $$DIR ]; then \
mkdir -p "$$DIR"; \
fi
$(WINDRES) -o $@ $<
%.o: %.o:
@DIR=$(dir $@); \ @DIR=$(dir $@); \
if [ ! -d $$DIR ]; then \ if [ ! -d $$DIR ]; then \
@@ -13,3 +20,7 @@ target-%:
-include $(DEPEND_FILE) -include $(DEPEND_FILE)
# Temporary:
obj/release/./src/res/UrQuanMasters.rc.o: ./src/res/UrQuanMasters.rc
obj/debug/./src/res/UrQuanMasters.rc.o: ./src/res/UrQuanMasters.rc
+6
View File
@@ -10,6 +10,12 @@
have_program gcc || exit 1 have_program gcc || exit 1
COMPILE="$PROG_gcc_FILE" COMPILE="$PROG_gcc_FILE"
case "$OSNAME" in
MINGW32*)
have_program windres
;;
esac
# Define WORDS_BIGENDIAN on bigendian machines # Define WORDS_BIGENDIAN on bigendian machines
check_endianness check_endianness
+3
View File
@@ -51,6 +51,9 @@ done
TOPDIR="$PWD" TOPDIR="$PWD"
export TOPDIR export TOPDIR
OSNAME=`uname -s`
export OSNAME
if [ $# -lt 1 ]; then if [ $# -lt 1 ]; then
usage 1>&2 usage 1>&2
exit 1; exit 1;
+19 -3
View File
@@ -69,15 +69,21 @@ build_dependancies() {
# Recursively build dependancy information # Recursively build dependancy information
build_rec_dependancies() { build_rec_dependancies() {
local DEPEND_FILE local DEPEND_FILE EXTRA_OFILES
echo "Building dependancy information..." 1>&2 echo "Building dependancy information..." 1>&2
BUILD_FILES_VAR=${BUILD_PROJECT}_CFILES
BUILD_FILES_VAR=${BUILD_PROJECT}_EXTRA_OFILES
export BUILD_FILES_VAR export BUILD_FILES_VAR
EXTRA_OFILES=`build_do_recursive build_collect_extra_o_files :`
BUILD_FILES_VAR=${BUILD_PROJECT}_CFILES
OFILES=`build_do_recursive build_collect_o_files :` OFILES=`build_do_recursive build_collect_o_files :`
eval DEPEND_FILE=".depend.\${${BUILD_PROJECT}_NAME}" eval DEPEND_FILE=".depend.\${${BUILD_PROJECT}_NAME}"
{ {
eval echo -n "target-\${${BUILD_PROJECT}_NAME}:" eval echo -n "target-\${${BUILD_PROJECT}_NAME}:"
for OFILE in $OFILES; do for OFILE in $OFILES $EXTRA_OFILES; do
echo -n " $OFILE" echo -n " $OFILE"
done done
echo echo
@@ -90,11 +96,21 @@ build_collect_o_files() {
eval echo "\${${BUILD_PROJECT}_OBJS}\${1%.c}.o" eval echo "\${${BUILD_PROJECT}_OBJS}\${1%.c}.o"
} }
# Output the extra .o file with the complete path
build_collect_extra_o_files() {
eval echo "\${${BUILD_PROJECT}_OBJS}\$1"
}
# Recursively collect .o-files # Recursively collect .o-files
build_rec_collect_o_files() { build_rec_collect_o_files() {
local EXTRA_OFILES
BUILD_FILES_VAR=${BUILD_PROJECT}_CFILES BUILD_FILES_VAR=${BUILD_PROJECT}_CFILES
export BUILD_FILES_VAR export BUILD_FILES_VAR
build_do_recursive build_collect_o_files : build_do_recursive build_collect_o_files :
BUILD_FILES_VAR=${BUILD_PROJECT}_EXTRA_OFILES
build_do_recursive build_collect_extra_o_files :
} }
# Start the configure program. # Start the configure program.
+38 -30
View File
@@ -40,25 +40,29 @@ PROG_tr_FILE="tr"
PROG_tr_ACTION="" PROG_tr_ACTION=""
PROG_tr_VERSION='' PROG_tr_VERSION=''
PROG_windres_NAME=windres
PROG_windres_FILE=windres
PROG_windres_ACTION=""
PROG_windres_VERSION='windres --version'
# Describe the libaries (possibly) used: # Describe the libaries (possibly) used:
LIB_SDL_NAME="Simple DirectMedia Layer" LIB_SDL_NAME="Simple DirectMedia Layer"
if [ `uname` = 'FreeBSD' ]; then OSNAME=`uname -s`
LIB_SDL_CFLAGS='$(sdl11-config --cflags)';
else case "$OSNAME" in
LIB_SDL_CFLAGS='$(sdl-config --cflags)'; FreeBSD) LIB_SDL_CFLAGS='$(sdl11-config --cflags)' ;;
fi *) LIB_SDL_CFLAGS='$(sdl-config --cflags)' ;;
if [ `uname` = 'FreeBSD' ]; then esac
LIB_SDL_LDFLAGS='$(sdl11-config --libs)'; case "$OSNAME" in
else FreeBSD) LIB_SDL_LDFLAGS='$(sdl11-config --libs)' ;;
LIB_SDL_LDFLAGS='$(sdl-config --libs)'; *) LIB_SDL_LDFLAGS='$(sdl-config --libs)' ;;
fi esac
if [ `uname` = 'FreeBSD' ]; then case "$OSNAME" in
LIB_SDL_VERSION='$(sdl11-config --version)'; FreeBSD) LIB_SDL_VERSION='$(sdl11-config --version)' ;;
else *) LIB_SDL_VERSION='$(sdl-config --version)' ;;
LIB_SDL_VERSION='$(sdl-config --version)'; esac
fi
LIB_SDL_mixer_NAME="SDL_mixer" LIB_SDL_mixer_NAME="SDL_mixer"
LIB_SDL_mixer_CFLAGS="$LIB_SDL_CFLAGS" LIB_SDL_mixer_CFLAGS="$LIB_SDL_CFLAGS"
@@ -72,27 +76,28 @@ LIB_SDL_image_VERSION=""
LIB_openal_NAME="OpenAL" LIB_openal_NAME="OpenAL"
LIB_openal_CFLAGS="" LIB_openal_CFLAGS=""
if [ `uname` = 'FreeBSD' ]; then case "$OSNAME" in
LIB_openal_LDFLAGS="-L/usr/local/lib -pthread -lopenal" FreeBSD) LIB_openal_LDFLAGS="-L/usr/local/lib -pthread -lopenal" ;;
elif [ `uname | $PROG_sed_FILE s/^MINGW32.*$/MINGW32/` = 'MINGW32' ]; then MINGW32*) LIB_openal_LDFLAGS="-lopenal32" ;;
LIB_openal_LDFLAGS="-lopenal32" *) LIB_openal_LDFLAGS="-lopenal" ;;
else esac
LIB_openal_LDFLAGS="-lopenal"
fi
LIB_openal_VERSION="" LIB_openal_VERSION=""
LIB_opengl_NAME="OpenGL" LIB_opengl_NAME="OpenGL"
if [ `uname` = 'FreeBSD' ]; then case "$OSNAME" in
FreeBSD)
LIB_opengl_CFLAGS="-I/usr/X11R6/include -D_THREAD_SAFE" LIB_opengl_CFLAGS="-I/usr/X11R6/include -D_THREAD_SAFE"
LIB_opengl_LDFLAGS="-L/usr/X11R6/lib -lX11 -lXext -pthread -lGL" LIB_opengl_LDFLAGS="-L/usr/X11R6/lib -lX11 -lXext -pthread -lGL"
elif [ `uname | $PROG_sed_FILE s/^MINGW32.*$/MINGW32/` = 'MINGW32' ]; then ;;
MINGW32*)
LIB_opengl_CFLAGS="" LIB_opengl_CFLAGS=""
LIB_opengl_LDFLAGS="-lopengl32" LIB_opengl_LDFLAGS="-lopengl32"
else ;;
*)
LIB_opengl_CFLAGS="" LIB_opengl_CFLAGS=""
LIB_opengl_LDFLAGS="-lGL" LIB_opengl_LDFLAGS="-lGL"
fi ;;
esac
LIB_opengl_VERSION="" LIB_opengl_VERSION=""
LIB_vorbis_NAME="Vorbis" LIB_vorbis_NAME="Vorbis"
@@ -101,12 +106,15 @@ LIB_vorbis_LDFLAGS="-lvorbis"
LIB_vorbis_VERSION="" LIB_vorbis_VERSION=""
LIB_vorbisfile_NAME="Vorbisfile" LIB_vorbisfile_NAME="Vorbisfile"
if [ `uname` = 'FreeBSD' ]; then case "$OSNAME" in
FreeBSD)
LIB_vorbisfile_CFLAGS="-I/usr/local/include" LIB_vorbisfile_CFLAGS="-I/usr/local/include"
LIB_vorbisfile_LDFLAGS="-L/usr/local/lib -lvorbisfile -lvorbis" LIB_vorbisfile_LDFLAGS="-L/usr/local/lib -lvorbisfile -lvorbis"
else ;;
*)
LIB_vorbisfile_CFLAGS="" LIB_vorbisfile_CFLAGS=""
LIB_vorbisfile_LDFLAGS="-lvorbisfile -lvorbis" LIB_vorbisfile_LDFLAGS="-lvorbisfile -lvorbis"
fi ;;
esac
LIB_vorbisfile_VERSION="" LIB_vorbisfile_VERSION=""
+1 -1
View File
@@ -1,4 +1,4 @@
uqm_SUBDIRS="sc2code getopt" uqm_SUBDIRS="sc2code getopt res"
uqm_CFILES="options.c port.c starcon2.c" uqm_CFILES="options.c port.c starcon2.c"
test_CFILES=test.c test_CFILES=test.c