First pass at configure support (no more editing makefiles). This is

adapted from the ScummVM build process, and isn't as big and nasty as
full autoconf support.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@578 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2005-06-28 18:56:49 +00:00
parent 6283d35618
commit d12f199847
6 changed files with 2313 additions and 0 deletions

125
stella/Makefile Normal file
View File

@ -0,0 +1,125 @@
# $Header: /home/stephena/STELLA_CVS-to-SVN/stella/Makefile,v 1.1 2005-06-28 18:56:48 stephena Exp $
#######################################################################
# Default compilation parameters. Normally don't edit these #
#######################################################################
srcdir ?= .
DEFINES :=
LDFLAGS :=
INCLUDES :=
LIBS :=
OBJS :=
MODULES :=
MODULE_DIRS :=
# Load the make rules generated by configure
include config.mak
# Uncomment this for stricter compile time code verification
# CXXFLAGS+= -Werror
CXXFLAGS:= $(CXXFLAGS)
CXXFLAGS+= -Wall -Wno-multichar -Wno-unused
# Even more warnings...
#CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wconversion
#CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor
#CXXFLAGS+= -Wno-reorder -Wwrite-strings -fcheck-new -Wctor-dtor-privacy
#######################################################################
# Misc stuff - you should never have to edit this #
#######################################################################
EXECUTABLE := stella$(EXEEXT)
include $(srcdir)/Makefile.common
# check if configure has been run or has been changed since last run
config.mak: $(srcdir)/configure
@echo "You need to run ./configure before you can run make"
@echo "Either you haven't run it before or it has changed."
@exit 1
install: all
$(INSTALL) -d "$(DESTDIR)$(BINDIR)"
$(INSTALL) -c -s -m 755 "$(srcdir)/scummvm$(EXEEXT)" "$(DESTDIR)$(BINDIR)/scummvm$(EXEEXT)"
$(INSTALL) -d "$(DESTDIR)$(MANDIR)/man6/"
$(INSTALL) -c -m 644 "$(srcdir)/scummvm.6" "$(DESTDIR)$(MANDIR)/man6/scummvm.6"
$(INSTALL) -d "$(DESTDIR)$(PREFIX)/share/pixmaps/"
$(INSTALL) -c -m 644 "$(srcdir)/scummvm.xpm" "$(DESTDIR)$(PREFIX)/share/pixmaps/scummvm.xpm"
$(INSTALL) -d "$(DESTDIR)$(PREFIX)/share/doc/scummvm/"
$(INSTALL) -c -m 644 "$(srcdir)/AUTHORS" "$(srcdir)/COPYING" "$(srcdir)/NEWS" "$(srcdir)/README" "$(DESTDIR)$(PREFIX)/share/doc/scummvm/"
uninstall:
rm -f "$(DESTDIR)$(BINDIR)/scummvm$(EXEEXT)"
rm -f "$(DESTDIR)$(MANDIR)/man6/scummvm.6"
rm -f "$(DESTDIR)$(PREFIX)/share/pixmaps/scummvm.xpm"
rm -rf "$(DESTDIR)$(PREFIX)/share/doc/scummvm/"
scummvmico.o: scummvm.ico
windres scummvm.rc scummvmico.o
dist:
$(RM) $(ZIPFILE)
$(ZIP) $(ZIPFILE) $(DISTFILES)
deb:
ln -sf dists/debian;
debian/prepare
fakeroot debian/rules binary
# Special target to create a application wrapper for Mac OS X
bundle_name = ScummVM.app
bundle: scummvm-static
mkdir -p $(bundle_name)/Contents/MacOS
mkdir -p $(bundle_name)/Contents/Resources
echo "APPL????" > $(bundle_name)/Contents/PkgInfo
cp $(srcdir)/Info.plist $(bundle_name)/Contents/
cp $(srcdir)/scummvm.icns $(bundle_name)/Contents/Resources/
cp scummvm-static $(bundle_name)/Contents/MacOS/scummvm
$(srcdir)/tools/credits.pl --rtf > $(bundle_name)/Contents/Resources/Credits.rtf
strip $(bundle_name)/Contents/MacOS/scummvm
# location of additional libs for OS X usually /sw/ for fink or
# /opt/local/ for darwinports
OSXOPT=/sw
# Special target to create a static linked binary for Mac OS X
scummvm-static: $(OBJS)
$(CXX) $(LDFLAGS) -o scummvm-static $(OBJS) \
`sdl-config --static-libs` \
$(OSXOPT)/lib/libmad.a \
$(OSXOPT)/lib/libvorbisfile.a \
$(OSXOPT)/lib/libvorbis.a \
$(OSXOPT)/lib/libogg.a \
$(OSXOPT)/lib/libmpeg2.a \
$(OSXOPT)/lib/libFLAC.a \
-lz
# Special target to create a snapshot disk image for Mac OS X
osxsnap: bundle
mkdir ScummVM-snapshot
cp AUTHORS ./ScummVM-snapshot/ScummVM\ Authors
cp COPYING ./ScummVM-snapshot/License
cp NEWS ./ScummVM-snapshot/News
cp README ./ScummVM-snapshot/ScummVM\ ReadMe
/Developer/Tools/SetFile -t TEXT -c ttxt ./ScummVM-snapshot/*
/Developer/Tools/CpMac -r $(bundle_name) ./ScummVM-snapshot/
hdiutil create -ov -format UDZO -srcfolder ScummVM-snapshot ScummVM-snapshot.dmg
rm -rf ScummVM-snapshot
# Special target to create a win32 snapshot binary
win32dist: scummvm$(EXEEXT)
mkdir -p $(WIN32PATH)
strip scummvm.exe -o $(WIN32PATH)/scummvm$(EXEEXT)
cp AUTHORS $(WIN32PATH)/AUTHORS.txt
cp COPYING $(WIN32PATH)/COPYING.txt
cp NEWS $(WIN32PATH)/NEWS.txt
cp README $(WIN32PATH)/README.txt
cp /usr/local/README-SDL.txt $(WIN32PATH)
cp /usr/local/bin/SDL.dll $(WIN32PATH)
u2d $(WIN32PATH)/*.txt
.PHONY: deb bundle test osxsnap win32dist dist install uninstall

88
stella/Makefile.common Normal file
View File

@ -0,0 +1,88 @@
# $Header: /home/stephena/STELLA_CVS-to-SVN/stella/Makefile.common,v 1.1 2005-06-28 18:56:48 stephena Exp $
# This file is used by Makefile and declares common build rules,
# a list of common object files etc.
######################################################################
# The defaul build target: just build the scummvm executable
######################################################################
all: $(EXECUTABLE)
######################################################################
# Various minor settings
######################################################################
# Files that are to be included in the archive built by "make dist"
DISTFILES := \
Makefile Makefile.common \
AUTHORS NEWS README COPYING stella.6
# scumm.dsp scummvm.dsp scummvm.dsw scummvm.icns scummvm.ico \
# scummvm.proj scummvm.rc scummvm.spec scummvm.xpm simon.dsp sky.dsp \
# scummvm.vcproj scumm.vcproj simon.vcproj sky.vcproj scummvm.sln
# The dist file name
ZIPFILE := stella-`date '+%Y-%m-%d'`.zip
# The name for the directory used for dependency tracking
DEPDIR := .deps
######################################################################
# Module settings
######################################################################
MODULES := $(MODULES)
# After the game specific modules follow the shared modules
MODULES += \
src/emucore \
gui \
graphics \
sound \
backends \
common
######################################################################
# The build rules follow - normally you should have no need to
# touch whatever comes after here.
######################################################################
# Concat DEFINES and INCLUDES to form the CPPFLAGS
CPPFLAGS:= $(DEFINES) $(INCLUDES) $(LDFLAGS)
# Include the build instructions for all modules
-include $(addprefix $(srcdir)/, $(addsuffix /module.mk,$(MODULES)))
# Depdir information
DEPDIRS = $(addsuffix /$(DEPDIR),$(MODULE_DIRS))
DEPFILES =
# The build rule for the ScummVM executable
$(EXECUTABLE): $(OBJS)
$(CXX) $(LDFLAGS) $(PRE_OBJS_FLAGS) $+ $(POST_OBJS_FLAGS) $(LIBS) -o $@
distclean: clean
$(RM_REC) $(DEPDIRS)
$(RM) build.rules config.h config.mak config.log
clean:
$(RM) $(OBJS) $(EXECUTABLE)
.PHONY: all clean dist distclean
.SUFFIXES: .cxx
#.cxx.o:
# $(MKDIR) $(*D)/$(DEPDIR)
# $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d2" $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
# $(ECHO) "$(*D)/" > $(*D)/$(DEPDIR)/$(*F).d
# $(CAT) "$(*D)/$(DEPDIR)/$(*F).d2" >> "$(*D)/$(DEPDIR)/$(*F).d"
# $(RM) "$(*D)/$(DEPDIR)/$(*F).d2"
.cxx.o:
$(MKDIR) $(*D)/$(DEPDIR)
$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
# Include the dependency tracking files. We add /dev/null at the end
# of the list to avoid a warning/error if no .d file exist
-include $(wildcard $(addsuffix /*.d,$(DEPDIRS))) /dev/null

49
stella/common.rules Normal file
View File

@ -0,0 +1,49 @@
# Common build rules, used by the sub modules and their module.mk files
# Copy the list of objects to a new variable. The name of the new variable
# contains the module name, a trick we use so we can keep multiple different
# module object lists, one for each module.
MODULE_OBJS-$(MODULE) := $(MODULE_OBJS)
ifdef PLUGIN
# Plugin build rule
# TODO: Right now, for Mac OS X only. We either will have to generate this
# via the configure script, or put in some 'if' statements to choose from
# one of several build rules
PLUGIN-$(MODULE) := plugins/$(PLUGIN_PREFIX)$(MODULE)$(PLUGIN_SUFFIX)
$(PLUGIN-$(MODULE)): $(MODULE_OBJS) $(PLUGIN_EXTRA_DEPS)
$(MKDIR) plugins
$(CXX) $(PLUGIN_LDFLAGS) $(filter-out $(PLUGIN_EXTRA_DEPS),$+) -o $@
PLUGIN:=
plugins: $(PLUGIN-$(MODULE))
# Pseudo target for comfort, allows for "make common", "make gui" etc.
$(MODULE): $(PLUGIN-$(MODULE))
else
MODULE_LIB-$(MODULE) := $(MODULE)/lib$(notdir $(MODULE)).a
# If not building as a plugin, add the object files to the main OBJS list
OBJS += $(MODULE_LIB-$(MODULE))
# Convenience library target
$(MODULE_LIB-$(MODULE)): $(MODULE_OBJS)
-$(RM) $@
$(AR) $@ $+
$(RANLIB) $@
# Pseudo target for comfort, allows for "make common", "make gui" etc.
$(MODULE): $(MODULE_LIB-$(MODULE))
endif
# Clean target, removes all object files. This looks a bit hackish, as we have to
# copy the content of MODULE_OBJS to another unique variable (the next module.mk
# will overwrite it after all). The same for the libMODULE.a library file.
clean: clean-$(MODULE)
clean-$(MODULE): clean-% :
-$(RM) $(MODULE_OBJS-$*) $(MODULE_LIB-$*) $(PLUGIN-$*)
.PHONY: clean-$(MODULE) $(MODULE)

1435
stella/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

558
stella/configure vendored Executable file
View File

@ -0,0 +1,558 @@
#!/bin/sh
#
# Some things this script could/should do when finished
#
# * detect whether it's a GNU compiler or not (for compiler settings)
# * command line options to...
# - override the host settings (for cross compiles
# - whether to do a debug build (with -g) or an optimized build (-O3 etc.)
# * detect whether the chosen backend is available (e.g. call sdl-config)
# * ....
# use environment vars if set
CXXFLAGS="$CXXFLAGS $CPPFLAGS"
# default lib behaviour yes/no/auto
_zlib=auto
_png=auto
_opengl=auto
# default option behaviour yes/no
_build_gl=yes
_build_sound=yes
_build_developer=yes
_build_snapshot=yes
_build_joystick=yes
# more defaults
_ranlib=ranlib
_install=install
_ar="ar cru"
_mkdir="mkdir -p"
_echo=printf
_cat=cat
_rm="rm -f"
_rm_rec="$_rm -r"
_zip="zip -q"
_cp=cp
_sdlconfig=sdl-config
_sdlpath="$PATH"
_prefix=/usr/local
_have_x86=""
_srcdir=`dirname $0`
# TODO: We should really use mktemp(1) to determine a random tmp file name.
# However, that tool might not be available everywhere.
TMPO=${_srcdir}/stella-conf
TMPC=${TMPO}.cpp
TMPLOG=${_srcdir}/config.log
# For cross compiling
_host=""
_host_cpu=""
_host_vendor=""
_host_os=""
cc_check() {
echo >> "$TMPLOG"
cat "$TMPC" >> "$TMPLOG"
echo >> "$TMPLOG"
echo "$CXX $TMPC -o $TMPO $@" >> "$TMPLOG"
rm -f "$TMPO$EXEEXT"
( $CXX "$TMPC" -o "$TMPO" "$@" ) >> "$TMPLOG" 2>&1
TMP="$?"
echo >> "$TMPLOG"
return "$TMP"
}
echocheck () {
echo_n "Checking for $@... "
}
#
# Check whether the given command is a working C++ compiler
#
test_compiler ()
{
cat <<EOF >tmp_cxx_compiler.cpp
class Foo {
int a;
};
int main(int argc, char **argv)
{
Foo *a = new Foo();
delete a;
return 0;
}
EOF
if test -n "$_host"; then
# In cross-compiling mode, we cannot run the result
eval "$1 -o tmp_cxx_compiler tmp_cxx_compiler.cpp 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
else
eval "$1 -o tmp_cxx_compiler tmp_cxx_compiler.cpp 2> /dev/null" && eval "./tmp_cxx_compiler 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
fi
}
#
# Determine sdl-config
#
# TODO: small bit of code to test sdl useability
find_sdlconfig()
{
echo_n "Looking for sdl-config... "
sdlconfigs="$_sdlconfig:sdl-config:sdl11-config:sdl12-config"
_sdlconfig=
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
for path_dir in $_sdlpath; do
for sdlconfig in $sdlconfigs; do
if test -x "$path_dir/$sdlconfig" ; then
_sdlconfig="$path_dir/$sdlconfig"
echo $_sdlconfig
break
fi
done
done
IFS="$ac_save_ifs"
if test -z "$_sdlconfig"; then
echo "none found!"
exit 1
fi
}
#
# Function to provide echo -n for bourne shells that don't have it
#
echo_n()
{
printf "$@"
}
#
# Greet user
#
echo "Running Stella configure..."
echo "Configure run on" `date` > $TMPLOG
#
# Check any parameters we received
#
# TODO:
# * Change --disable-mad / --enable-mad to the way it's done in autoconf:
# That is, --without-mad / --with-mad=/prefix/to/mad. Useful for people
# who have Mad/Vorbis/ALSA installed in a non-standard locations.
#
for parm in "$@" ; do
if test "$parm" = "--help" || test "$parm" = "-help" || test "$parm" = "-h" ; then
cat << EOF
Usage: $0 [OPTIONS]...
Configuration:
-h, --help display this help and exit
Installation directories:
--prefix=DIR use this prefix for installing Stella [/usr/local]
--bindir=DIR directory to install the stella binary in [PREFIX/bin]
--mandir=DIR directory to install the manpage in [PREFIX/man]
Optional Features:
--disable-gl disable OpenGL rendering support
--disable-sound disable sound support
--disable-developer disable all developer options (including debugger)
--disable-snapshot disable snapshot support
--disable-joystick disable joystick support
Some influential environment variables:
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
CXX C++ compiler command
CXXFLAGS C++ compiler flags
CPPFLAGS C++ preprocessor flags, e.g. -I<include dir> if you have
headers in a nonstandard directory <include dir>
EOF
exit 0
fi
done # for parm in ...
DEBFLAGS="-g"
for ac_option in $@; do
case "$ac_option" in
--disable-gl) _build_gl=no ;;
--disable-sound) _build_sound=no ;;
--disable-developer) _build_developer=no ;;
--disable-snapshot) _build_snapshot=no ;;
--disable-joystick) _build_joystick=no ;;
--prefix=*)
_prefix=`echo $ac_option | cut -d '=' -f 2`
;;
--bindir=*)
_bindir=`echo $ac_option | cut -d '=' -f 2`
;;
--mandir=*)
_mandir=`echo $ac_option | cut -d '=' -f 2`
;;
*)
echo "error: unrecognised option: $ac_option
Try \`$0 --help' for more information." >&2
exit 1
;;
esac;
done;
CXXFLAGS="$CXXFLAGS $DEBFLAGS"
case $_host in
*)
guessed_host=`$_srcdir/config.guess`
_host_cpu=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
_host_os=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
_host_vendor=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
;;
esac
#
# Determine extension used for executables
#
case $_host_os in
mingw* | cygwin*)
EXEEXT=".exe"
;;
arm-riscos-aof)
EXEEXT=",ff8"
;;
*)
EXEEXT=""
;;
esac
#
# Determine the C++ compiler
#
echo_n "Looking for C++ compiler... "
if test -n "$_host"; then
compilers="$CXX $_host_cpu-$_host_os-g++ $_host_cpu-$_host_os-c++"
else
compilers="$CXX g++ c++"
fi
CXX=
for compiler in $compilers; do
if test_compiler $compiler; then
CXX=$compiler
echo $CXX
break
fi
done
if test -z $CXX; then
echo "none found!"
exit 1
fi
#
# Determine the compiler version
echocheck "compiler version"
cxx_name=`( $cc -v ) 2>&1 | tail -1 | cut -d ' ' -f 1`
cxx_version=`( $CXX -dumpversion ) 2>&1`
if test "$?" -gt 0; then
cxx_version="not found"
fi
case $cxx_version in
2.95.[2-9]|2.95.[2-9][-.]*|3.[0-9]|3.[0-9].[0-9]|3.[0-9].[0-9][-.]*|4.[0-9].[0-9]|4.[0-9].[0-9][-.]*)
_cxx_major=`echo $cxx_version | cut -d '.' -f 1`
_cxx_minor=`echo $cxx_version | cut -d '.' -f 2`
cxx_version="$cxx_version, ok"
cxx_verc_fail=no
;;
# whacky beos version strings
2.9-beos-991026*|2.9-beos-000224*)
_cxx_major=2
_cxx_minor=95
cxx_version="$cxx_version, ok"
cxx_verc_fail=no
;;
3_4)
_cxx_major=3
_mxx_minor=4
;;
'not found')
cxx_verc_fail=yes
;;
*)
cxx_version="$cxx_version, bad"
cxx_verc_fail=yes
;;
esac
echo "$cxx_version"
if test "$cxx_verc_fail" = yes ; then
echo
echo "The version of your compiler is not supported at this time"
echo "Please ensure you are using GCC 2.95.x or GCC 3.x"
exit 1
fi
#
# Do CXXFLAGS now we know the compiler version
#
if test "$_cxx_major" -ge "3" ; then
CXXFLAGS="$CXXFLAGS -W"
_make_def_HAVE_GCC3='HAVE_GCC3 = 1'
fi;
if test -n "$_host"; then
# Cross-compiling mode - add your target here if needed
case "$_host" in
*)
echo "Cross-compiling to unknown target, please add your target to configure."
exit 1
;;
esac
else
#
# Determine build settings
#
# TODO - also add an command line option to override this?!?
echo_n "Checking hosttype... "
echo $_host_os
case $_host_os in
linux* | openbsd* | freebsd* | netbsd* | bsd* | sunos* | hpux* | beos*)
DEFINES="$DEFINES -DUNIX"
_host_os=unix
;;
mingw*)
DEFINES="$DEFINES -DWIN32"
_host_os=win32
;;
# given this is a shell script assume some type of unix
*)
echo "WARNING: could not establish system type, assuming unix like"
DEFINES="$DEFINES -DUNIX"
;;
esac
fi
#
# Check for ZLib
#
echocheck "zlib"
if test "$_zlib" = auto ; then
_zlib=no
cat > $TMPC << EOF
#include <string.h>
#include <zlib.h>
int main(void) { return 0; }
EOF
cc_check $LDFLAGS $CXXFLAGS && _zlib=yes
fi
echo "$_zlib"
#
# Check for PNG
#
echocheck "png"
if test "$_png" = auto ; then
_png=no
cat > $TMPC << EOF
#include <string.h>
#include <png.h>
int main(void) { return 0; }
EOF
cc_check $LDFLAGS $CXXFLAGS && _png=yes
fi
echo "$_png"
#
# Check for GL
#
echocheck "opengl"
if test "$_opengl" = auto ; then
_opengl=no
cat > $TMPC << EOF
#include <string.h>
#include <GL/gl.h>
int main(void) { return 0; }
EOF
cc_check $LDFLAGS $CXXFLAGS && _opengl=yes
fi
echo "$_opengl"
#
# figure out installation directories
#
test -z "$_bindir" && _bindir="$_prefix/bin"
test -z "$_mandir" && _mandir="$_prefix/man"
echo
echo_n "Summary:"
echo
if test "$_build_gl" = "yes" ; then
if test "$_opengl" = "yes" ; then
echo_n " OpenGL rendering enabled"
echo
else
echo_n " OpenGL rendering disabled (missing OpenGL library)"
echo
_build_gl=no
fi
else
echo_n " OpenGL rendering disabled"
echo
fi
if test "$_build_sound" = "yes" ; then
echo_n " Sound support enabled"
echo
else
echo_n " Sound support disabled"
echo
fi
if test "$_build_developer" = "yes" ; then
echo_n " Developer/debugger support enabled"
echo
else
echo_n " Developer/debugger support disabled"
echo
fi
if test "$_build_snapshot" = "yes" ; then
if test "$_png" = "yes" ; then
echo_n " Snapshot support enabled"
echo
else
echo_n " Snapshot support disabled (missing PNG library)"
echo
_build_snapshot=no
fi
else
echo_n " Snapshot support disabled"
echo
fi
if test "$_build_joystick" = yes ; then
echo_n " Joystick support enabled"
echo
else
echo_n " Joystick support disabled"
echo
fi
#
# Now, add the appropriate defines/libraries/headers
#
echo
find_sdlconfig
LDFLAGS="$LDFLAGS `$_sdlconfig --cflags`"
LIBS="$LIBS `$_sdlconfig --libs` -lz"
OBJECTS="src/common/mainSDL.o src/common/FrameBufferSoft.o"
SRC="src"
CORE="$SRC/emucore"
COMMON="$SRC/common"
GUI="$SRC/gui"
DBG="$SRC/debugger"
INCLUDES="-I$CORE -I$CORE/m6502/src -I$CORE/m6502/src/bspf/src -I$COMMON -I$GUI"
case $_host_os in
unix*)
DEFINES="$DEFINES -DBSPF_UNIX -DHAVE_GETTIMEOFDAY -DHAVE_INTTYPES"
MODULES="$MODULES $SRC/unix"
INCLUDES="$INCLUDES -I$SRC/unix"
# Add OpenGL stuff
if test "$_build_gl" = yes ; then
LIBS="$LIBS -L/usr/X11R6/lib -lGL"
OBJECTS="$OBJECTS FrameBufferGL.o"
fi
;;
mingw*)
DEFINES="$DEFINES -DBSPF_WIN32 -DHAVE_GETTIMEOFDAY -DHAVE_INTTYPES"
MODULES="$MODULES $SRC/win32"
INCLUDES="$INCLUDES -I$SRC/win32"
# Add OpenGL stuff
if test "$_build_gl" = yes ; then
LIBS="$LIBS -lopengl32"
OBJECTS="$OBJECTS FrameBufferGL.o"
fi
;;
*)
echo "WARNING: host system not currenty supported"
stop
;;
esac
if test "$_build_sound" = yes ; then
OBJECTS="$OBJECTS $CORE/TIASound.o $COMMON/SoundSDL.o"
DEFINES="$DEFINES -DSOUND_SUPPORT"
fi
if test "$_build_developer" = yes ; then
DEFINES="$DEFINES -DDEVELOPER_SUPPORT"
MODULES="$MODULES $DBG"
INCLUDES="$INCLUDES -I$DBG"
fi
if test "$_build_snapshot" = yes ; then
OBJECTS="$OBJECTS $COMMON/Snapshot.o"
DEFINES="$DEFINES -DSNAPSHOT_SUPPORT"
LIBS="$LIBS -lpng"
fi
if test "$_build_joystick" = yes ; then
DEFINES="$DEFINES -DJOYSTICK_SUPPORT"
fi
echo "Creating config.mak"
cat > config.mak << EOF
# -------- Generated by configure -----------
CXX := $CXX
CXXFLAGS := $CXXFLAGS
LIBS += $LIBS
RANLIB := $_ranlib
INSTALL := $_install
AR := $_ar
MKDIR := $_mkdir
ECHO := $_echo
CAT := $_cat
RM := $_rm
RM_REC := $_rm_rec
ZIP := $_zip
CP := $_cp
WIN32PATH=$_win32path
MODULES += $MODULES
MODULE_DIRS += $MODULE_DIRS
EXEEXT := $EXEEXT
PREFIX := $_prefix
BINDIR := $_bindir
MANDIR := $_mandir
INCLUDES += $INCLUDES
OBJECTS += $OBJECTS
DEFINES += $DEFINES
LDFLAGS += $LDFLAGS
EOF

View File

@ -0,0 +1,58 @@
MODULE := src/emucore
MODULE_OBJS := \
src/emucore/Booster.o \
src/emucore/Cart2K.o \
src/emucore/Cart3F.o \
src/emucore/Cart4K.o \
src/emucore/CartAR.o \
src/emucore/CartCV.o \
src/emucore/Cart.o \
src/emucore/CartDPC.o \
src/emucore/CartE0.o \
src/emucore/CartE7.o \
src/emucore/CartF4.o \
src/emucore/CartF4SC.o \
src/emucore/CartF6.o \
src/emucore/CartF6SC.o \
src/emucore/CartF8.o \
src/emucore/CartF8SC.o \
src/emucore/CartFASC.o \
src/emucore/CartFE.o \
src/emucore/CartMB.o \
src/emucore/CartMC.o \
src/emucore/CartUA.o \
src/emucore/Console.o \
src/emucore/Control.o \
src/emucore/Deserializer.o \
src/emucore/Driving.o \
src/emucore/Event.o \
src/emucore/EventHandler.o \
src/emucore/FrameBuffer.o \
src/emucore/FSNode.o \
src/emucore/Joystick.o \
src/emucore/Keyboard.o \
src/emucore/M6532.o \
src/emucore/MD5.o \
src/emucore/MediaSrc.o \
src/emucore/OSystem.o \
src/emucore/Paddles.o \
src/emucore/Props.o \
src/emucore/PropsSet.o \
src/emucore/Random.o \
src/emucore/Serializer.o \
src/emucore/Settings.o \
src/emucore/Switches.o \
src/emucore/TIA.o
MODULE_DIRS += \
backends \
backends/fs \
backends/fs/posix \
backends/fs/morphos \
backends/fs/windows \
backends/fs/amigaos4 \
backends/midi
# Include common rules
include $(srcdir)/common.rules