mirror of https://github.com/stella-emu/stella.git
Second pass at configure support; it actually seems to work this time.
I've only tested it in 32bit Linux, but I don't forsee any problems. Dependencies seem to work correctly, recompiling parts of the codebase as necessary. New files added to the codebase must be listed in the 'module.mk' file in the same directory where the new file is placed. Other then that, no configuration is required. All configurable options are by default enabled. They can be manually disabled by an appropriate command to the configure script, but the script is smart enough to test for the required libraries and disable support when one isn't found. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@579 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
d12f199847
commit
77f4c8e007
105
stella/Makefile
105
stella/Makefile
|
@ -1,4 +1,4 @@
|
|||
# $Header: /home/stephena/STELLA_CVS-to-SVN/stella/Makefile,v 1.1 2005-06-28 18:56:48 stephena Exp $
|
||||
# $Header: /home/stephena/STELLA_CVS-to-SVN/stella/Makefile,v 1.2 2005-06-28 23:17:58 stephena Exp $
|
||||
|
||||
#######################################################################
|
||||
# Default compilation parameters. Normally don't edit these #
|
||||
|
@ -22,7 +22,7 @@ include config.mak
|
|||
# CXXFLAGS+= -Werror
|
||||
|
||||
CXXFLAGS:= $(CXXFLAGS)
|
||||
CXXFLAGS+= -Wall -Wno-multichar -Wno-unused
|
||||
CXXFLAGS+= -Wall -Wuninitialized -Wno-multichar -Wunused
|
||||
# Even more warnings...
|
||||
#CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wconversion
|
||||
#CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor
|
||||
|
@ -34,7 +34,105 @@ CXXFLAGS+= -Wall -Wno-multichar -Wno-unused
|
|||
|
||||
EXECUTABLE := stella$(EXEEXT)
|
||||
|
||||
include $(srcdir)/Makefile.common
|
||||
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 scummvm.6 Info.plist \
|
||||
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 := scummvm-`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 \
|
||||
src/emucore/m6502 \
|
||||
src/gui \
|
||||
src/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)
|
||||
|
||||
# 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 Stella 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 plugins
|
||||
|
||||
# Old (dumb) compile & dependcy rules
|
||||
#INCS = scumm/scumm.h common/scummsys.h common/stdafx.h
|
||||
#.cpp.o:
|
||||
# $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
|
||||
#$(OBJS): $(INCS)
|
||||
|
||||
.SUFFIXES: .cxx
|
||||
ifndef HAVE_GCC3
|
||||
# If you use GCC, disable the above and enable this for intelligent
|
||||
# dependency tracking.
|
||||
.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"
|
||||
else
|
||||
# If you even have GCC 3.x, you can use this build rule, which is safer; the above
|
||||
# rule can get you into a bad state if you Ctrl-C at the wrong moment.
|
||||
# Also, with this GCC inserts additional dummy rules for the involved headers,
|
||||
# which ensures a smooth compilation even if said headers become obsolete.
|
||||
.cxx.o:
|
||||
$(MKDIR) $(*D)/$(DEPDIR)
|
||||
$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
|
||||
endif
|
||||
|
||||
ifdef HAVE_NASM
|
||||
.SUFFIXES: .asm
|
||||
|
||||
.asm.o:
|
||||
$(NASM) -O1 $(NASMFLAGS) -g -o $*.o $(<)
|
||||
endif
|
||||
|
||||
# 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
|
||||
|
||||
# check if configure has been run or has been changed since last run
|
||||
config.mak: $(srcdir)/configure
|
||||
|
@ -70,6 +168,7 @@ deb:
|
|||
debian/prepare
|
||||
fakeroot debian/rules binary
|
||||
|
||||
|
||||
# Special target to create a application wrapper for Mac OS X
|
||||
bundle_name = ScummVM.app
|
||||
bundle: scummvm-static
|
||||
|
|
|
@ -1,88 +0,0 @@
|
|||
# $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
|
|
@ -5,38 +5,20 @@
|
|||
# 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))
|
||||
#OBJS += $(MODULE_LIB-$(MODULE))
|
||||
OBJS += $(MODULE_OBJS)
|
||||
|
||||
# Convenience library target
|
||||
$(MODULE_LIB-$(MODULE)): $(MODULE_OBJS)
|
||||
-$(RM) $@
|
||||
$(AR) $@ $+
|
||||
$(RANLIB) $@
|
||||
#$(MODULE_LIB-$(MODULE)): $(MODULE_OBJS)
|
||||
# -$(RM) $@
|
||||
# $(AR) $@ $+
|
||||
# $(RANLIB) $@
|
||||
|
||||
# Pseudo target for comfort, allows for "make common", "make gui" etc.
|
||||
$(MODULE): $(MODULE_LIB-$(MODULE))
|
||||
|
||||
endif
|
||||
#$(MODULE): $(MODULE_LIB-$(MODULE))
|
||||
|
||||
|
||||
# Clean target, removes all object files. This looks a bit hackish, as we have to
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
CXXFLAGS="$CXXFLAGS $CPPFLAGS"
|
||||
|
||||
# default lib behaviour yes/no/auto
|
||||
_opengl=auto
|
||||
_zlib=auto
|
||||
_png=auto
|
||||
_opengl=auto
|
||||
|
||||
# default option behaviour yes/no
|
||||
_build_gl=yes
|
||||
|
@ -36,8 +36,12 @@ _rm="rm -f"
|
|||
_rm_rec="$_rm -r"
|
||||
_zip="zip -q"
|
||||
_cp=cp
|
||||
_win32path=""
|
||||
_sdlconfig=sdl-config
|
||||
_sdlpath="$PATH"
|
||||
_nasmpath="$PATH"
|
||||
NASMFLAGS=""
|
||||
NASM=""
|
||||
_prefix=/usr/local
|
||||
_have_x86=""
|
||||
|
||||
|
@ -46,7 +50,7 @@ _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
|
||||
TMPC=${TMPO}.cxx
|
||||
TMPLOG=${_srcdir}/config.log
|
||||
|
||||
# For cross compiling
|
||||
|
@ -134,6 +138,79 @@ echo_n()
|
|||
printf "$@"
|
||||
}
|
||||
|
||||
#
|
||||
# Determine a data type with the given length
|
||||
#
|
||||
find_type_with_size ()
|
||||
{
|
||||
cat <<EOF >tmp_find_type_with_size.cpp
|
||||
#include <stdio.h>
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int size = argv[1][0] - '0';
|
||||
if (size == sizeof(int))
|
||||
printf("int\n");
|
||||
else if (size == sizeof(short))
|
||||
printf("short\n");
|
||||
else if (size == sizeof(char))
|
||||
printf("char\n");
|
||||
else if (size == sizeof(long))
|
||||
printf("long\n");
|
||||
else {
|
||||
printf("unknown\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
if eval "$CXX -o tmp_find_type_with_size tmp_find_type_with_size.cpp"; then
|
||||
datatype=`./tmp_find_type_with_size $1`
|
||||
if test "$datatype" = "unknown"; then
|
||||
echo "couldn't find data type with $1 bytes"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
rm -f tmp_find_type_with_size$EXEEXT tmp_find_type_with_size.cpp
|
||||
echo $datatype
|
||||
}
|
||||
|
||||
CheckNASM()
|
||||
{
|
||||
echocheck "nasm"
|
||||
if test "$_nasm" = no ; then
|
||||
echo "disabled"
|
||||
return;
|
||||
fi
|
||||
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
||||
|
||||
for path_dir in $_nasmpath; do
|
||||
if test -x "$path_dir/nasm" ; then
|
||||
NASM="$path_dir/nasm"
|
||||
echo $NASM
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
IFS="$ac_save_ifs"
|
||||
|
||||
if test x$NASM = x -o x$NASM = x'"$NASM"'; then
|
||||
echo "not found"
|
||||
_nasm=no
|
||||
else
|
||||
case $_host_os in
|
||||
mingw* | cygwin*)
|
||||
NASMFLAGS="-f win32"
|
||||
;;
|
||||
*)
|
||||
NASMFLAGS="-f elf"
|
||||
;;
|
||||
esac
|
||||
_nasm=yes
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Greet user
|
||||
#
|
||||
|
@ -171,6 +248,18 @@ Optional Features:
|
|||
--disable-snapshot disable snapshot support
|
||||
--disable-joystick disable joystick support
|
||||
|
||||
Optional Libraries:
|
||||
--with-zlib-prefix=DIR Prefix where zlib is installed (optional)
|
||||
--disable-zlib disable zlib (compression) support [autodetect]
|
||||
|
||||
--with-png-prefix=DIR Prefix where png is installed (optional)
|
||||
--disable-png disable png support [autodetect]
|
||||
|
||||
--with-sdl-prefix=DIR Prefix where the sdl-config script is installed (optional)
|
||||
|
||||
--with-nasm-prefix=DIR Prefix where nasm executable is installed (optional)
|
||||
--disable-nasm disable assembly language optimizations [autodetect]
|
||||
|
||||
Some influential environment variables:
|
||||
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
|
||||
nonstandard directory <lib dir>
|
||||
|
@ -184,15 +273,40 @@ EOF
|
|||
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-gl) _build_gl=no ;;
|
||||
--disable-sound) _build_sound=no ;;
|
||||
--disable-developer) _build_developer=no ;;
|
||||
--disable-snapshot) _build_snapshot=no ;;
|
||||
--disable-joystick) _build_joystick=no ;;
|
||||
--disable-snapshot) _build_snapshot=no ;;
|
||||
--disable-joystick) _build_joystick=no ;;
|
||||
--enable-zlib) _zlib=yes ;;
|
||||
--disable-zlib) _zlib=no ;;
|
||||
--enable-png) _png=yes ;;
|
||||
--disable-png) _png=no ;;
|
||||
--enable-nasm) _nasm=yes ;;
|
||||
--disable-nasm) _nasm=no ;;
|
||||
--with-zlib-prefix=*)
|
||||
_prefix=`echo $ac_option | cut -d '=' -f 2`
|
||||
ZLIB_CFLAGS="-I$_prefix/include"
|
||||
ZLIB_LIBS="-L$_prefix/lib"
|
||||
;;
|
||||
--with-png-prefix=*)
|
||||
_prefix=`echo $ac_option | cut -d '=' -f 2`
|
||||
PNG_CFLAGS="-I$_prefix/include"
|
||||
PNG_LIBS="-L$_prefix/lib"
|
||||
;;
|
||||
--with-sdl-prefix=*)
|
||||
arg=`echo $ac_option | cut -d '=' -f 2`
|
||||
_sdlpath="$arg:$arg/bin"
|
||||
;;
|
||||
--with-nasm-prefix=*)
|
||||
arg=`echo $ac_option | cut -d '=' -f 2`
|
||||
_nasmpath="$arg:$arg/bin"
|
||||
;;
|
||||
--host=*)
|
||||
_host=`echo $ac_option | cut -d '=' -f 2`
|
||||
;;
|
||||
--prefix=*)
|
||||
_prefix=`echo $ac_option | cut -d '=' -f 2`
|
||||
;;
|
||||
|
@ -213,6 +327,18 @@ done;
|
|||
CXXFLAGS="$CXXFLAGS $DEBFLAGS"
|
||||
|
||||
case $_host in
|
||||
linupy)
|
||||
_host_os=linux
|
||||
_host_cpu=arm
|
||||
;;
|
||||
arm-riscos-aof)
|
||||
_host_os=riscos
|
||||
_host_cpu=arm
|
||||
;;
|
||||
ppc-amigaos)
|
||||
_host_os=amigaos
|
||||
_host_cpu=ppc
|
||||
;;
|
||||
*)
|
||||
guessed_host=`$_srcdir/config.guess`
|
||||
_host_cpu=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
|
@ -311,13 +437,33 @@ fi
|
|||
#
|
||||
|
||||
if test "$_cxx_major" -ge "3" ; then
|
||||
CXXFLAGS="$CXXFLAGS -W"
|
||||
CXXFLAGS="$CXXFLAGS"
|
||||
_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
|
||||
linupy|arm-riscos-aof)
|
||||
echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
|
||||
DEFINES="$DEFINES -DUNIX"
|
||||
_def_endianness='#define SCUMM_LITTLE_ENDIAN'
|
||||
_def_align='#define SCUMM_NEED_ALIGNMENT'
|
||||
_def_linupy="#define DLINUPY"
|
||||
type_1_byte='char'
|
||||
type_2_byte='short'
|
||||
type_4_byte='int'
|
||||
;;
|
||||
ppc-amigaos)
|
||||
echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
|
||||
_def_endianness='#define SCUMM_BIG_ENDIAN'
|
||||
_def_align='#define SCUMM_NEED_ALIGNMENT'
|
||||
type_1_byte='char'
|
||||
type_2_byte='short'
|
||||
type_4_byte='long'
|
||||
CXXFLAGS="$CFLAGS -newlib -mstrict-align -mcpu=750 -mtune=7400"
|
||||
LDFLAGS="$LDFLAGS -newlib"
|
||||
;;
|
||||
*)
|
||||
echo "Cross-compiling to unknown target, please add your target to configure."
|
||||
exit 1
|
||||
|
@ -336,10 +482,28 @@ else
|
|||
DEFINES="$DEFINES -DUNIX"
|
||||
_host_os=unix
|
||||
;;
|
||||
irix*)
|
||||
DEFINES="$DEFINES -DUNIX"
|
||||
_ranlib=:
|
||||
_host_os=unix
|
||||
;;
|
||||
darwin*)
|
||||
DEFINES="$DEFINES -DUNIX -DMACOSX"
|
||||
LIBS="$LIBS -framework QuickTime -framework AudioUnit -framework Carbon"
|
||||
# TODO: Add proper check for Altivec support in the compiler...
|
||||
DEFINES="$DEFINES -DHAS_ALTIVEC"
|
||||
CXXFLAGS="$CXXFLAGS -faltivec"
|
||||
_host_os=unix
|
||||
;;
|
||||
mingw*)
|
||||
DEFINES="$DEFINES -DWIN32"
|
||||
_host_os=win32
|
||||
;;
|
||||
cygwin*)
|
||||
DEFINES="$DEFINES -mno-cygwin -DWIN32"
|
||||
LIBS="$LIBS -mno-cygwin -lmingw32 -lwinmm"
|
||||
_host_os=win32
|
||||
;;
|
||||
# given this is a shell script assume some type of unix
|
||||
*)
|
||||
echo "WARNING: could not establish system type, assuming unix like"
|
||||
|
@ -357,9 +521,9 @@ if test "$_zlib" = auto ; then
|
|||
cat > $TMPC << EOF
|
||||
#include <string.h>
|
||||
#include <zlib.h>
|
||||
int main(void) { return 0; }
|
||||
int main(void) { return strcmp(ZLIB_VERSION, zlibVersion()); }
|
||||
EOF
|
||||
cc_check $LDFLAGS $CXXFLAGS && _zlib=yes
|
||||
cc_check $LDFLAGS $CXXFLAGS $ZLIB_CFLAGS $ZLIB_LIBS -lz && _zlib=yes
|
||||
fi
|
||||
echo "$_zlib"
|
||||
|
||||
|
@ -393,13 +557,27 @@ EOF
|
|||
fi
|
||||
echo "$_opengl"
|
||||
|
||||
#
|
||||
# Check for nasm
|
||||
#
|
||||
#if test "$_have_x86" = yes ; then
|
||||
# CheckNASM
|
||||
#fi
|
||||
#
|
||||
#if test "$_nasm" = yes ; then
|
||||
# _def_nasm='#define USE_NASM'
|
||||
# _make_def_HAVE_NASM='HAVE_NASM = 1'
|
||||
#else
|
||||
# _def_nasm='#undef USE_NASM'
|
||||
# _make_def_HAVE_NASM='# HAVE_NASM = 1'
|
||||
#fi
|
||||
|
||||
#
|
||||
# figure out installation directories
|
||||
#
|
||||
test -z "$_bindir" && _bindir="$_prefix/bin"
|
||||
test -z "$_mandir" && _mandir="$_prefix/man"
|
||||
|
||||
|
||||
echo
|
||||
echo_n "Summary:"
|
||||
echo
|
||||
|
@ -456,16 +634,13 @@ else
|
|||
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"
|
||||
|
@ -474,6 +649,9 @@ DBG="$SRC/debugger"
|
|||
|
||||
INCLUDES="-I$CORE -I$CORE/m6502/src -I$CORE/m6502/src/bspf/src -I$COMMON -I$GUI"
|
||||
|
||||
INCLUDES="$INCLUDES `$_sdlconfig --cflags`"
|
||||
LIBS="$LIBS `$_sdlconfig --libs` -lz"
|
||||
|
||||
case $_host_os in
|
||||
unix*)
|
||||
DEFINES="$DEFINES -DBSPF_UNIX -DHAVE_GETTIMEOFDAY -DHAVE_INTTYPES"
|
||||
|
@ -482,8 +660,8 @@ case $_host_os in
|
|||
|
||||
# Add OpenGL stuff
|
||||
if test "$_build_gl" = yes ; then
|
||||
DEFINES="$DEFINES -DDISPLAY_OPENGL"
|
||||
LIBS="$LIBS -L/usr/X11R6/lib -lGL"
|
||||
OBJECTS="$OBJECTS FrameBufferGL.o"
|
||||
fi
|
||||
;;
|
||||
mingw*)
|
||||
|
@ -493,8 +671,8 @@ case $_host_os in
|
|||
|
||||
# Add OpenGL stuff
|
||||
if test "$_build_gl" = yes ; then
|
||||
DEFINES="$DEFINES -DDISPLAY_OPENGL"
|
||||
LIBS="$LIBS -lopengl32"
|
||||
OBJECTS="$OBJECTS FrameBufferGL.o"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
|
@ -504,7 +682,6 @@ case $_host_os in
|
|||
esac
|
||||
|
||||
if test "$_build_sound" = yes ; then
|
||||
OBJECTS="$OBJECTS $CORE/TIASound.o $COMMON/SoundSDL.o"
|
||||
DEFINES="$DEFINES -DSOUND_SUPPORT"
|
||||
fi
|
||||
|
||||
|
@ -515,7 +692,6 @@ if test "$_build_developer" = yes ; then
|
|||
fi
|
||||
|
||||
if test "$_build_snapshot" = yes ; then
|
||||
OBJECTS="$OBJECTS $COMMON/Snapshot.o"
|
||||
DEFINES="$DEFINES -DSNAPSHOT_SUPPORT"
|
||||
LIBS="$LIBS -lpng"
|
||||
fi
|
||||
|
@ -524,6 +700,8 @@ if test "$_build_joystick" = yes ; then
|
|||
DEFINES="$DEFINES -DJOYSTICK_SUPPORT"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
echo "Creating config.mak"
|
||||
cat > config.mak << EOF
|
||||
# -------- Generated by configure -----------
|
||||
|
@ -546,13 +724,21 @@ WIN32PATH=$_win32path
|
|||
MODULES += $MODULES
|
||||
MODULE_DIRS += $MODULE_DIRS
|
||||
EXEEXT := $EXEEXT
|
||||
NASM := $NASM
|
||||
NASMFLAGS := $NASMFLAGS
|
||||
|
||||
PREFIX := $_prefix
|
||||
BINDIR := $_bindir
|
||||
MANDIR := $_mandir
|
||||
|
||||
$_make_def_HAVE_GCC3
|
||||
#$_make_def_HAVE_NASM
|
||||
|
||||
INCLUDES += $INCLUDES
|
||||
OBJECTS += $OBJECTS
|
||||
OBJS += $OBJS
|
||||
DEFINES += $DEFINES
|
||||
LDFLAGS += $LDFLAGS
|
||||
EOF
|
||||
|
||||
# This should be taken care of elsewhere, but I'm not sure where
|
||||
rm -f stella-conf*
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
## See the file "license" for information on usage and redistribution of
|
||||
## this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
##
|
||||
## $Id: makefile,v 1.107 2005-06-26 13:08:43 stephena Exp $
|
||||
## $Id: makefile,v 1.108 2005-06-28 23:18:15 stephena Exp $
|
||||
##============================================================================
|
||||
|
||||
##============================================================================
|
||||
|
@ -44,7 +44,7 @@ OPTIMIZATIONS =
|
|||
|
||||
### to build on SMP (or distcc-based) machines
|
||||
### change to number of CPU's you have
|
||||
NUMBER_CPU = 1
|
||||
NUMBER_CPU = 4
|
||||
|
||||
##============================================================================
|
||||
## All done, type make to get a list of frontends
|
||||
|
|
|
@ -13,9 +13,11 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: FrameBufferGL.cxx,v 1.32 2005-06-23 14:33:09 stephena Exp $
|
||||
// $Id: FrameBufferGL.cxx,v 1.33 2005-06-28 23:18:15 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifdef DISPLAY_OPENGL
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_syswm.h>
|
||||
#include <sstream>
|
||||
|
@ -572,3 +574,5 @@ void FrameBufferGL::setDimensions(GLdouble* orthoWidth, GLdouble* orthoHeight)
|
|||
cerr << endl;
|
||||
*/
|
||||
}
|
||||
|
||||
#endif // DISPLAY_OPENGL
|
||||
|
|
|
@ -13,12 +13,14 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: FrameBufferGL.hxx,v 1.17 2005-06-16 00:55:56 stephena Exp $
|
||||
// $Id: FrameBufferGL.hxx,v 1.18 2005-06-28 23:18:15 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef FRAMEBUFFER_GL_HXX
|
||||
#define FRAMEBUFFER_GL_HXX
|
||||
|
||||
#ifdef DISPLAY_OPENGL
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_opengl.h>
|
||||
#include <SDL_syswm.h>
|
||||
|
@ -35,7 +37,7 @@ class GUI::Font;
|
|||
This class implements an SDL OpenGL framebuffer.
|
||||
|
||||
@author Stephen Anthony
|
||||
@version $Id: FrameBufferGL.hxx,v 1.17 2005-06-16 00:55:56 stephena Exp $
|
||||
@version $Id: FrameBufferGL.hxx,v 1.18 2005-06-28 23:18:15 stephena Exp $
|
||||
*/
|
||||
class FrameBufferGL : public FrameBuffer
|
||||
{
|
||||
|
@ -237,4 +239,7 @@ class FrameBufferGL : public FrameBuffer
|
|||
float myFSScaleFactor;
|
||||
};
|
||||
|
||||
#endif // DISPLAY_OPENGL
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -13,9 +13,11 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: Snapshot.cxx,v 1.6 2005-06-16 00:55:56 stephena Exp $
|
||||
// $Id: Snapshot.cxx,v 1.7 2005-06-28 23:18:15 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifdef SNAPSHOT_SUPPORT
|
||||
|
||||
#include <png.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
@ -122,3 +124,5 @@ string Snapshot::savePNG(string filename)
|
|||
|
||||
return "Snapshot saved";
|
||||
}
|
||||
|
||||
#endif // SNAPSHOT_SUPPORT
|
||||
|
|
|
@ -13,12 +13,14 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: Snapshot.hxx,v 1.4 2005-06-16 00:55:56 stephena Exp $
|
||||
// $Id: Snapshot.hxx,v 1.5 2005-06-28 23:18:15 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef SNAPSHOT_HXX
|
||||
#define SNAPSHOT_HXX
|
||||
|
||||
#ifdef SNAPSHOT_SUPPORT
|
||||
|
||||
class FrameBuffer;
|
||||
|
||||
#include <png.h>
|
||||
|
@ -62,4 +64,6 @@ class Snapshot
|
|||
FrameBuffer& myFrameBuffer;
|
||||
};
|
||||
|
||||
#endif // SNAPSHOT_SUPPORT
|
||||
|
||||
#endif
|
||||
|
|
|
@ -13,9 +13,11 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: SoundSDL.cxx,v 1.18 2005-06-21 18:46:33 stephena Exp $
|
||||
// $Id: SoundSDL.cxx,v 1.19 2005-06-28 23:18:15 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifdef SOUND_SUPPORT
|
||||
|
||||
#include <sstream>
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
|
@ -538,3 +540,5 @@ void SoundSDL::RegWriteQueue::grow()
|
|||
delete[] myBuffer;
|
||||
myBuffer = buffer;
|
||||
}
|
||||
|
||||
#endif // SOUND_SUPPORT
|
||||
|
|
|
@ -13,12 +13,14 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: SoundSDL.hxx,v 1.12 2005-06-21 18:46:33 stephena Exp $
|
||||
// $Id: SoundSDL.hxx,v 1.13 2005-06-28 23:18:15 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef SOUND_SDL_HXX
|
||||
#define SOUND_SDL_HXX
|
||||
|
||||
#ifdef SOUND_SUPPORT
|
||||
|
||||
class OSystem;
|
||||
|
||||
#include <SDL.h>
|
||||
|
@ -31,7 +33,7 @@ class OSystem;
|
|||
This class implements the sound API for SDL.
|
||||
|
||||
@author Stephen Anthony and Bradford W. Mott
|
||||
@version $Id: SoundSDL.hxx,v 1.12 2005-06-21 18:46:33 stephena Exp $
|
||||
@version $Id: SoundSDL.hxx,v 1.13 2005-06-28 23:18:15 stephena Exp $
|
||||
*/
|
||||
class SoundSDL : public Sound
|
||||
{
|
||||
|
@ -261,4 +263,6 @@ class SoundSDL : public Sound
|
|||
void closeAudio();
|
||||
};
|
||||
|
||||
#endif // SOUND_SUPPORT
|
||||
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
MODULE := src/common
|
||||
|
||||
MODULE_OBJS := \
|
||||
src/common/mainSDL.o \
|
||||
src/common/SoundNull.o \
|
||||
src/common/SoundSDL.o \
|
||||
src/common/FrameBufferSoft.o \
|
||||
src/common/FrameBufferGL.o \
|
||||
src/common/Snapshot.o
|
||||
|
||||
MODULE_DIRS += \
|
||||
src/common
|
||||
|
||||
# Include common rules
|
||||
include $(srcdir)/common.rules
|
|
@ -0,0 +1,14 @@
|
|||
MODULE := src/debugger
|
||||
|
||||
MODULE_OBJS := \
|
||||
src/debugger/Debugger.o \
|
||||
src/debugger/DebuggerParser.o \
|
||||
src/debugger/EquateList.o \
|
||||
src/debugger/PackedBitArray.o \
|
||||
src/debugger/TIADebug.o
|
||||
|
||||
MODULE_DIRS += \
|
||||
src/debugger
|
||||
|
||||
# Include common rules
|
||||
include $(srcdir)/common.rules
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: Settings.cxx,v 1.52 2005-06-28 04:40:21 urchlay Exp $
|
||||
// $Id: Settings.cxx,v 1.53 2005-06-28 23:18:16 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <cassert>
|
||||
|
@ -188,7 +188,6 @@ void Settings::validate()
|
|||
{
|
||||
string s;
|
||||
int i;
|
||||
float f;
|
||||
|
||||
s = getString("video");
|
||||
if(s != "soft" && s != "gl")
|
||||
|
@ -199,7 +198,7 @@ void Settings::validate()
|
|||
if(s != "linear" && s != "nearest")
|
||||
set("gl_filter", "nearest");
|
||||
|
||||
f = getFloat("gl_aspect");
|
||||
float f = getFloat("gl_aspect");
|
||||
if(f < 1.1 || f > 2.0)
|
||||
set("gl_aspect", "2.0");
|
||||
#endif
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
#ifndef _TIASOUND_H
|
||||
#define _TIASOUND_H
|
||||
|
||||
#ifdef SOUND_SUPPORT
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -60,4 +62,6 @@ void Tia_volume (unsigned int percent);
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif // SOUND_SUPPORT
|
||||
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
MODULE := src/emucore/m6502
|
||||
|
||||
MODULE_OBJS := \
|
||||
src/emucore/m6502/src/D6502.o \
|
||||
src/emucore/m6502/src/Device.o \
|
||||
src/emucore/m6502/src/M6502.o \
|
||||
src/emucore/m6502/src/M6502Hi.o \
|
||||
src/emucore/m6502/src/NullDev.o \
|
||||
src/emucore/m6502/src/System.o
|
||||
|
||||
MODULE_DIRS += \
|
||||
src/emucore/m6502/src
|
||||
|
||||
# Include common rules
|
||||
include $(srcdir)/common.rules
|
|
@ -43,16 +43,12 @@ MODULE_OBJS := \
|
|||
src/emucore/Serializer.o \
|
||||
src/emucore/Settings.o \
|
||||
src/emucore/Switches.o \
|
||||
src/emucore/TIA.o
|
||||
src/emucore/TIA.o \
|
||||
src/emucore/TIASound.o \
|
||||
src/emucore/unzip.o
|
||||
|
||||
MODULE_DIRS += \
|
||||
backends \
|
||||
backends/fs \
|
||||
backends/fs/posix \
|
||||
backends/fs/morphos \
|
||||
backends/fs/windows \
|
||||
backends/fs/amigaos4 \
|
||||
backends/midi
|
||||
src/emucore
|
||||
|
||||
# Include common rules
|
||||
include $(srcdir)/common.rules
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
MODULE := src/gui
|
||||
|
||||
MODULE_OBJS := \
|
||||
src/gui/AboutDialog.o \
|
||||
src/gui/AddrValueWidget.o \
|
||||
src/gui/AudioDialog.o \
|
||||
src/gui/BrowserDialog.o \
|
||||
src/gui/CheatWidget.o \
|
||||
src/gui/CpuWidget.o \
|
||||
src/gui/DataGridWidget.o \
|
||||
src/gui/DebuggerDialog.o \
|
||||
src/gui/DialogContainer.o \
|
||||
src/gui/Dialog.o \
|
||||
src/gui/EditableWidget.o \
|
||||
src/gui/EditNumWidget.o \
|
||||
src/gui/EditTextWidget.o \
|
||||
src/gui/EventMappingDialog.o \
|
||||
src/gui/Font.o \
|
||||
src/gui/GameInfoDialog.o \
|
||||
src/gui/GameList.o \
|
||||
src/gui/HelpDialog.o \
|
||||
src/gui/Launcher.o \
|
||||
src/gui/LauncherDialog.o \
|
||||
src/gui/LauncherOptionsDialog.o \
|
||||
src/gui/ListWidget.o \
|
||||
src/gui/Menu.o \
|
||||
src/gui/OptionsDialog.o \
|
||||
src/gui/PopUpWidget.o \
|
||||
src/gui/ProgressDialog.o \
|
||||
src/gui/PromptWidget.o \
|
||||
src/gui/RamWidget.o \
|
||||
src/gui/ScrollBarWidget.o \
|
||||
src/gui/TabWidget.o \
|
||||
src/gui/ToggleBitWidget.o \
|
||||
src/gui/VideoDialog.o \
|
||||
src/gui/Widget.o \
|
||||
|
||||
MODULE_DIRS += \
|
||||
src/gui
|
||||
|
||||
# Include common rules
|
||||
include $(srcdir)/common.rules
|
|
@ -0,0 +1,12 @@
|
|||
MODULE := src/unix
|
||||
|
||||
MODULE_OBJS := \
|
||||
src/unix/FSNodePOSIX.o \
|
||||
src/unix/OSystemUNIX.o \
|
||||
src/unix/SettingsUNIX.o
|
||||
|
||||
MODULE_DIRS += \
|
||||
src/unix
|
||||
|
||||
# Include common rules
|
||||
include $(srcdir)/common.rules
|
Loading…
Reference in New Issue