mirror of https://github.com/stella-emu/stella.git
Removed more unused cruft from the UNIX build scripts, and reorganized
things a little (I hope I didn't break the recent GP2X changes). Removed more PSP stuff, since that port is no longer maintained in this codebase, but by someone else externally. Building the 'win32dist' target is now tailored to a Linux environment, and now properly converts text files and zips up the result automatically. So automated building just became that much closer ... git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1422 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
8e76c31e4c
commit
2cc674a0f7
|
@ -13,7 +13,7 @@
|
||||||
## See the file "license" for information on usage and redistribution of
|
## See the file "license" for information on usage and redistribution of
|
||||||
## this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
## this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
##
|
##
|
||||||
## $Id: Makefile,v 1.33 2008-03-09 14:17:03 stephena Exp $
|
## $Id: Makefile,v 1.34 2008-03-09 15:30:27 stephena Exp $
|
||||||
##
|
##
|
||||||
## Based on code from ScummVM - Scumm Interpreter
|
## Based on code from ScummVM - Scumm Interpreter
|
||||||
## Copyright (C) 2002-2004 The ScummVM project
|
## Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -151,12 +151,6 @@ else
|
||||||
$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
|
$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
|
||||||
endif
|
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
|
# 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
|
# of the list to avoid a warning/error if no .d file exist
|
||||||
-include $(wildcard $(addsuffix /*.d,$(DEPDIRS))) /dev/null
|
-include $(wildcard $(addsuffix /*.d,$(DEPDIRS))) /dev/null
|
||||||
|
@ -184,7 +178,7 @@ install: all
|
||||||
$(INSTALL) -c -m 644 "$(srcdir)/src/common/stella.png" "$(DESTDIR)$(DATADIR)/icons/large"
|
$(INSTALL) -c -m 644 "$(srcdir)/src/common/stella.png" "$(DESTDIR)$(DATADIR)/icons/large"
|
||||||
|
|
||||||
install-strip: install
|
install-strip: install
|
||||||
strip stella$(EXEEXT)
|
$(STRIP) stella$(EXEEXT)
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f "$(DESTDIR)$(BINDIR)/stella$(EXEEXT)"
|
rm -f "$(DESTDIR)$(BINDIR)/stella$(EXEEXT)"
|
||||||
|
@ -202,52 +196,12 @@ src/win32/stella_icon.o: src/win32/stella.ico src/win32/stella.rc
|
||||||
win32dist: stella$(EXEEXT)
|
win32dist: stella$(EXEEXT)
|
||||||
rm -rf $(DISTNAME)
|
rm -rf $(DISTNAME)
|
||||||
mkdir -p $(DISTNAME)/docs/graphics
|
mkdir -p $(DISTNAME)/docs/graphics
|
||||||
strip stella$(EXEEXT) -o $(DISTNAME)/stella$(EXEEXT)
|
$(STRIP) stella$(EXEEXT) -o $(DISTNAME)/stella$(EXEEXT)
|
||||||
cp Announce.txt Changes.txt Copyright.txt License.txt README-SDL.txt Readme.txt Todo.txt $(DISTNAME)/docs
|
cp Announce.txt Changes.txt Copyright.txt License.txt README-SDL.txt Readme.txt Todo.txt $(DISTNAME)/docs
|
||||||
cp -r docs/*.html $(DISTNAME)/docs
|
cp -r docs/*.html $(DISTNAME)/docs
|
||||||
cp -r docs/graphics/*.png $(DISTNAME)/docs/graphics
|
cp -r docs/graphics/*.png $(DISTNAME)/docs/graphics
|
||||||
cp /mingw/bin/SDL.dll /mingw/bin/zlib1.dll $(DISTNAME)
|
flip -m $(DISTNAME)/docs/*.txt
|
||||||
# u2d $(DISTNAME)/*.txt
|
zip -r $(DISTNAME)-win32.zip $(DISTNAME)
|
||||||
# zip $(DISTNAME)-win32.zip $(DISTNAME)
|
|
||||||
|
|
||||||
# Special target to create psp stuff
|
|
||||||
psp-package: $(EXECUTABLE)
|
|
||||||
$(MKSFO) 'Stella' PARAM.SFO
|
|
||||||
mkdir -p "psp/stella"
|
|
||||||
$(PSP-FIX) stella.elf
|
|
||||||
$(PSP-STRIP) stella.elf -o psp/stella/EBOOT.PBP
|
|
||||||
mkdir -p "psp/stella%"
|
|
||||||
$(PACK-PBP) "psp/stella%/EBOOT.PBP" PARAM.SFO src/psp/data/ICON0.PNG NULL NULL src/psp/data/PIC1.PNG NULL NULL NULL
|
|
||||||
rm -f PARAM.SFO
|
|
||||||
|
|
||||||
psp-upload: psp-package
|
|
||||||
mount | grep $(PSP-MOUNTPOINT) || mount $(PSP-MOUNTPOINT)
|
|
||||||
cp -rv "psp/stella" "psp/stella%" $(PSP-MOUNTPOINT)/psp/game/
|
|
||||||
umount $(PSP-MOUNTPOINT)
|
|
||||||
|
|
||||||
psp-debug:
|
|
||||||
mount | grep \$(PSP-MOUNTPOINT) || mount $(PSP-MOUNTPOINT)
|
|
||||||
@cat $(PSP-MOUNTPOINT)/stderr.txt
|
|
||||||
@echo -e "\n\n------------------------------------------------------------"
|
|
||||||
@cat $(PSP-MOUNTPOINT)/stdout.txt
|
|
||||||
umount $(PSP-MOUNTPOINT)
|
|
||||||
|
|
||||||
psp-cleanup:
|
|
||||||
rm -rf psp
|
|
||||||
mount | grep $(PSP-MOUNTPOINT) || mount $(PSP-MOUNTPOINT)
|
|
||||||
rm -rf $(PSP-MOUNTPOINT)/std*
|
|
||||||
umount $(PSP-MOUNTPOINT)
|
|
||||||
|
|
||||||
psp-layout:
|
|
||||||
mount | grep $(PSP-MOUNTPOINT) || mount $(PSP-MOUNTPOINT)
|
|
||||||
mkdir -p $(PSP-MOUNTPOINT)/stella/roms
|
|
||||||
mkdir -p $(PSP-MOUNTPOINT)/stella/snapshots
|
|
||||||
cp -v src/psp/data/stellarc.psp $(PSP-MOUNTPOINT)/stella/stellarc
|
|
||||||
umount $(PSP-MOUNTPOINT)
|
|
||||||
|
|
||||||
# GP2X exec needs strip
|
|
||||||
gp2x-strip: $(EXECUTABLE)
|
|
||||||
$(GP2X-STRIP) stella
|
|
||||||
|
|
||||||
# GP2X organize: groups necessary files into a gp2x folder for easy access.
|
# GP2X organize: groups necessary files into a gp2x folder for easy access.
|
||||||
gp2x-organize:
|
gp2x-organize:
|
||||||
|
@ -257,7 +211,8 @@ gp2x-organize:
|
||||||
cp -v $(srcdir)/src/gp2x/stella.gpe $(srcdir)/gp2x
|
cp -v $(srcdir)/src/gp2x/stella.gpe $(srcdir)/gp2x
|
||||||
cp -v $(srcdir)/README-GP2X.txt $(srcdir)/gp2x
|
cp -v $(srcdir)/README-GP2X.txt $(srcdir)/gp2x
|
||||||
cp -v -r $(srcdir)/docs/* $(srcdir)/gp2x/docs
|
cp -v -r $(srcdir)/docs/* $(srcdir)/gp2x/docs
|
||||||
|
$(STRIP) $(srcdir)/gp2x/stella
|
||||||
|
|
||||||
.PHONY: deb bundle test win32dist install uninstall
|
.PHONY: deb bundle test win32dist install uninstall
|
||||||
|
|
||||||
# Use Exuberant ctags (the one from Slackware's vim package, for instance),
|
# Use Exuberant ctags (the one from Slackware's vim package, for instance),
|
||||||
|
|
|
@ -42,11 +42,10 @@ _rm_rec="$_rm -r"
|
||||||
_zip="zip -q"
|
_zip="zip -q"
|
||||||
_cp=cp
|
_cp=cp
|
||||||
_win32path=""
|
_win32path=""
|
||||||
_windres="windres"
|
_windres=windres
|
||||||
_sdlconfig=sdl-config
|
_sdlconfig=sdl-config
|
||||||
_sdlpath="$PATH"
|
_sdlpath="$PATH"
|
||||||
_prefix=/usr/local
|
_prefix=/usr/local
|
||||||
_have_x86=""
|
|
||||||
X_LIBS="/usr/X11R6/lib"
|
X_LIBS="/usr/X11R6/lib"
|
||||||
|
|
||||||
_srcdir=`dirname $0`
|
_srcdir=`dirname $0`
|
||||||
|
@ -62,6 +61,7 @@ _host=""
|
||||||
_host_cpu=""
|
_host_cpu=""
|
||||||
_host_vendor=""
|
_host_vendor=""
|
||||||
_host_os=""
|
_host_os=""
|
||||||
|
_host_prefix=""
|
||||||
|
|
||||||
cc_check() {
|
cc_check() {
|
||||||
echo >> "$TMPLOG"
|
echo >> "$TMPLOG"
|
||||||
|
@ -148,43 +148,6 @@ echo_n()
|
||||||
printf "$@"
|
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
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Greet user
|
# Greet user
|
||||||
#
|
#
|
||||||
|
@ -238,10 +201,8 @@ Optional Features:
|
||||||
--disable-profile
|
--disable-profile
|
||||||
|
|
||||||
Optional Libraries:
|
Optional Libraries:
|
||||||
--with-zlib-prefix=DIR Prefix where zlib is installed (optional)
|
|
||||||
|
|
||||||
--with-sdl-prefix=DIR Prefix where the sdl-config script is installed (optional)
|
--with-sdl-prefix=DIR Prefix where the sdl-config script is installed (optional)
|
||||||
|
--with-zlib-prefix=DIR Prefix where zlib is installed (optional)
|
||||||
--x-libraries Path to X11 libraries [${X_LIBS}]
|
--x-libraries Path to X11 libraries [${X_LIBS}]
|
||||||
|
|
||||||
Some influential environment variables:
|
Some influential environment variables:
|
||||||
|
@ -278,15 +239,15 @@ for ac_option in $@; do
|
||||||
--disable-static) _build_static=no ;;
|
--disable-static) _build_static=no ;;
|
||||||
--enable-profile) _build_profile=yes ;;
|
--enable-profile) _build_profile=yes ;;
|
||||||
--disable-profile) _build_profile=no ;;
|
--disable-profile) _build_profile=no ;;
|
||||||
|
--with-sdl-prefix=*)
|
||||||
|
arg=`echo $ac_option | cut -d '=' -f 2`
|
||||||
|
_sdlpath="$arg:$arg/bin"
|
||||||
|
;;
|
||||||
--with-zlib-prefix=*)
|
--with-zlib-prefix=*)
|
||||||
_prefix=`echo $ac_option | cut -d '=' -f 2`
|
_prefix=`echo $ac_option | cut -d '=' -f 2`
|
||||||
ZLIB_CFLAGS="-I$_prefix/include"
|
ZLIB_CFLAGS="-I$_prefix/include"
|
||||||
ZLIB_LIBS="-L$_prefix/lib"
|
ZLIB_LIBS="-L$_prefix/lib"
|
||||||
;;
|
;;
|
||||||
--with-sdl-prefix=*)
|
|
||||||
arg=`echo $ac_option | cut -d '=' -f 2`
|
|
||||||
_sdlpath="$arg:$arg/bin"
|
|
||||||
;;
|
|
||||||
--x-libraries=*)
|
--x-libraries=*)
|
||||||
arg=`echo $ac_option | cut -d '=' -f 2`
|
arg=`echo $ac_option | cut -d '=' -f 2`
|
||||||
X_LIBS="$arg"
|
X_LIBS="$arg"
|
||||||
|
@ -315,34 +276,27 @@ done;
|
||||||
CXXFLAGS="$CXXFLAGS $DEBFLAGS"
|
CXXFLAGS="$CXXFLAGS $DEBFLAGS"
|
||||||
|
|
||||||
case $_host in
|
case $_host in
|
||||||
linupy)
|
#linupy)
|
||||||
_host_os=linux
|
# _host_os=linux
|
||||||
_host_cpu=arm
|
# _host_cpu=arm
|
||||||
;;
|
# ;;
|
||||||
arm-riscos-aof)
|
#arm-riscos-aof)
|
||||||
_host_os=riscos
|
# _host_os=riscos
|
||||||
_host_cpu=arm
|
# _host_cpu=arm
|
||||||
;;
|
# ;;
|
||||||
ppc-amigaos)
|
#ppc-amigaos)
|
||||||
_host_os=amigaos
|
# _host_os=amigaos
|
||||||
_host_cpu=ppc
|
# _host_cpu=ppc
|
||||||
;;
|
# ;;
|
||||||
psp)
|
|
||||||
_host_os=psp
|
|
||||||
_host_cpu=mips
|
|
||||||
# force psp sdl path
|
|
||||||
_sdlpath=$(psp-config --pspdev-path)/psp/bin:$_sdlpath
|
|
||||||
PATH=$(psp-config --pspdev-path)/psp/bin:$(psp-config --pspdev-path)/bin:$PATH
|
|
||||||
;;
|
|
||||||
gp2x)
|
gp2x)
|
||||||
_host_os=gp2x
|
_host_os=gp2x
|
||||||
_host_cpu=arm
|
_host_cpu=arm
|
||||||
_alt_tools=arm-open2x-linux
|
_host_prefix=arm-open2x-linux
|
||||||
;;
|
;;
|
||||||
mingw32-cross)
|
mingw32-cross)
|
||||||
_host_os=mingw32msvc
|
_host_os=mingw32msvc
|
||||||
_host_cpu=i386
|
_host_cpu=i386
|
||||||
_windres=i386-mingw32msvc-windres
|
_host_prefix=i386-mingw32msvc
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
guessed_host=`$_srcdir/config.guess`
|
guessed_host=`$_srcdir/config.guess`
|
||||||
|
@ -391,36 +345,16 @@ esac
|
||||||
#
|
#
|
||||||
echo_n "Looking for C++ compiler... "
|
echo_n "Looking for C++ compiler... "
|
||||||
if test -n "$_host"; then
|
if test -n "$_host"; then
|
||||||
compilers="$CXX $_host_cpu-$_host_os-g++ $_host_cpu-$_host_os-c++"
|
compilers="$CXX $_host_prefix-g++ $_host_prefix-c++ $_host_cpu-$_host_os-g++ $_host_cpu-$_host_os-c++"
|
||||||
else
|
else
|
||||||
compilers="$CXX g++ c++"
|
compilers="$CXX g++ c++"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for _tool in $_alt_tools ; do
|
|
||||||
if test -n "$_prefix"; then
|
|
||||||
compilers="$_prefix/bin/$_tool-g++ $compilers"
|
|
||||||
else
|
|
||||||
compilers="$_tool-g++ $compilers"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
CXX=
|
|
||||||
if [ "$_host" = "psp" ] ; then
|
|
||||||
compilers="$CXX psp-g++ psp-c++"
|
|
||||||
CXX="psp-c++"
|
|
||||||
fi
|
|
||||||
|
|
||||||
for compiler in $compilers; do
|
for compiler in $compilers; do
|
||||||
|
echo $compiler
|
||||||
if test_compiler $compiler; then
|
if test_compiler $compiler; then
|
||||||
CXX=$compiler
|
CXX=$compiler
|
||||||
echo $CXX
|
echo $CXX
|
||||||
|
|
||||||
_toolprefix=`echo arm-open2x-linux-g++ | sed 's/.++//'`
|
|
||||||
|
|
||||||
if test -n "$_toolprefix"; then
|
|
||||||
_strip="${_toolprefix}strip"
|
|
||||||
fi
|
|
||||||
|
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -488,28 +422,26 @@ fi;
|
||||||
if test -n "$_host"; then
|
if test -n "$_host"; then
|
||||||
# Cross-compiling mode - add your target here if needed
|
# Cross-compiling mode - add your target here if needed
|
||||||
case "$_host" in
|
case "$_host" in
|
||||||
linupy|arm-riscos-aof)
|
# linupy|arm-riscos-aof)
|
||||||
echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
|
# echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
|
||||||
DEFINES="$DEFINES -DUNIX"
|
# DEFINES="$DEFINES -DUNIX"
|
||||||
_def_endianness='#define SCUMM_LITTLE_ENDIAN'
|
# _def_endianness='#define SCUMM_LITTLE_ENDIAN'
|
||||||
_def_align='#define SCUMM_NEED_ALIGNMENT'
|
# _def_align='#define SCUMM_NEED_ALIGNMENT'
|
||||||
_def_linupy="#define DLINUPY"
|
# _def_linupy="#define DLINUPY"
|
||||||
type_1_byte='char'
|
# type_1_byte='char'
|
||||||
type_2_byte='short'
|
# type_2_byte='short'
|
||||||
type_4_byte='int'
|
# type_4_byte='int'
|
||||||
;;
|
# ;;
|
||||||
ppc-amigaos)
|
# ppc-amigaos)
|
||||||
echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
|
# echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
|
||||||
_def_endianness='#define SCUMM_BIG_ENDIAN'
|
# _def_endianness='#define SCUMM_BIG_ENDIAN'
|
||||||
_def_align='#define SCUMM_NEED_ALIGNMENT'
|
# _def_align='#define SCUMM_NEED_ALIGNMENT'
|
||||||
type_1_byte='char'
|
# type_1_byte='char'
|
||||||
type_2_byte='short'
|
# type_2_byte='short'
|
||||||
type_4_byte='long'
|
# type_4_byte='long'
|
||||||
CXXFLAGS="$CFLAGS -newlib -mstrict-align -mcpu=750 -mtune=7400"
|
# CXXFLAGS="$CFLAGS -newlib -mstrict-align -mcpu=750 -mtune=7400"
|
||||||
LDFLAGS="$LDFLAGS -newlib"
|
# LDFLAGS="$LDFLAGS -newlib"
|
||||||
;;
|
# ;;
|
||||||
psp)
|
|
||||||
;;
|
|
||||||
gp2x)
|
gp2x)
|
||||||
echo "Cross-compiling to $_host, forcing static build, and disabling OpenGL."
|
echo "Cross-compiling to $_host, forcing static build, and disabling OpenGL."
|
||||||
_build_static=yes
|
_build_static=yes
|
||||||
|
@ -544,14 +476,6 @@ else
|
||||||
_ranlib=:
|
_ranlib=:
|
||||||
_host_os=unix
|
_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*)
|
mingw*)
|
||||||
DEFINES="$DEFINES -DWIN32"
|
DEFINES="$DEFINES -DWIN32"
|
||||||
_host_os=win32
|
_host_os=win32
|
||||||
|
@ -574,25 +498,11 @@ else
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
# Cross-compilers use their own commands for the following functions
|
||||||
# Check whether we can use x86 asm routines
|
if test -n "$_host_prefix"; then
|
||||||
#
|
_strip="$_host_prefix-$_strip"
|
||||||
echo_n "Running on x86... "
|
_windres="$_host_prefix-$_windres"
|
||||||
case $_host_cpu in
|
|
||||||
i386|i486|i586|i686)
|
|
||||||
_have_x86=yes
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
_have_x86=no
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if test "$_have_x86" = yes ; then
|
|
||||||
_def_x86='#define HAVE_X86'
|
|
||||||
else
|
|
||||||
_def_x86='#undef HAVE_X86'
|
|
||||||
fi
|
fi
|
||||||
echo "$_have_x86"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check for ZLib
|
# Check for ZLib
|
||||||
|
@ -768,33 +678,6 @@ case $_host_os in
|
||||||
INCLUDES="$INCLUDES -I$SRC/win32"
|
INCLUDES="$INCLUDES -I$SRC/win32"
|
||||||
LIBS="$LIBS -lmingw32 -lwinmm"
|
LIBS="$LIBS -lmingw32 -lwinmm"
|
||||||
;;
|
;;
|
||||||
psp)
|
|
||||||
# -O3 is need for speed
|
|
||||||
# -G0 to avoid c++ link problems
|
|
||||||
CXXFLAGS="-G0 -O2 -fno-rtti"
|
|
||||||
# 2 times -lc to avoid link problems. psp-gcc seems to to forget the first -lc wiile stdc++ linking
|
|
||||||
LIBS="-L `psp-config --pspsdk-path`/lib -L`psp-config --pspsdk-path`/../lib "
|
|
||||||
LIBS="$LIBS -lSDLmain -lSDL -lGL -lm -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpspkernel -lpsppower -lz -lm -lg -lstdc++ -lc -lpsputility"
|
|
||||||
# psp compiler
|
|
||||||
CC="psp-gcc"
|
|
||||||
LD="psp-gcc"
|
|
||||||
_ranlib="psp-ranlib"
|
|
||||||
_ar="psp-ar cru"
|
|
||||||
|
|
||||||
MODULES="$MODULES src/psp"
|
|
||||||
|
|
||||||
# psp specific tool
|
|
||||||
PSP_STRIP=`psp-config --pspdev-path`"/bin/psp-strip"
|
|
||||||
PSP_FIX=`psp-config --pspdev-path`"/bin/psp-fixup-imports"
|
|
||||||
PACK_PBP=`psp-config --pspdev-path`"/bin/pack-pbp"
|
|
||||||
MKSFO="`psp-config --pspdev-path`/bin/mksfo"
|
|
||||||
|
|
||||||
# mount point of psp
|
|
||||||
PSP_MOUNTPOINT="/mnt/psp"
|
|
||||||
|
|
||||||
INCLUDES="$INCLUDES -Isrc/psp -I`psp-config --pspsdk-path`/include"
|
|
||||||
DEFINES="$DEFINES -Dmain=SDL_main -DPSP -DBSPF_PSP -DPSP_DEBUG"
|
|
||||||
;;
|
|
||||||
gp2x)
|
gp2x)
|
||||||
# -O3 hangs the GP2X, do not use.
|
# -O3 hangs the GP2X, do not use.
|
||||||
CXXFLAGS="-O2 -finline-functions -mtune=arm920t"
|
CXXFLAGS="-O2 -finline-functions -mtune=arm920t"
|
||||||
|
@ -804,9 +687,6 @@ case $_host_os in
|
||||||
|
|
||||||
_ranlib="arm-linux-ranlib"
|
_ranlib="arm-linux-ranlib"
|
||||||
_ar="arm-linux-ar cru"
|
_ar="arm-linux-ar cru"
|
||||||
|
|
||||||
# GP2X ARM Linux Specific strip
|
|
||||||
GP2X_STRIP="$_strip"
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "WARNING: host system not currenty supported"
|
echo "WARNING: host system not currenty supported"
|
||||||
|
@ -876,7 +756,8 @@ RM_REC := $_rm_rec
|
||||||
ZIP := $_zip
|
ZIP := $_zip
|
||||||
CP := $_cp
|
CP := $_cp
|
||||||
WIN32PATH=$_win32path
|
WIN32PATH=$_win32path
|
||||||
WINDRES=$_windres
|
STRIP := $_strip
|
||||||
|
WINDRES := $_windres
|
||||||
|
|
||||||
MODULES += $MODULES
|
MODULES += $MODULES
|
||||||
MODULE_DIRS += $MODULE_DIRS
|
MODULE_DIRS += $MODULE_DIRS
|
||||||
|
@ -896,23 +777,5 @@ DEFINES += $DEFINES
|
||||||
LDFLAGS += $LDFLAGS
|
LDFLAGS += $LDFLAGS
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if test $_host_os = "psp" ; then
|
|
||||||
cat >> config.mak << EOF
|
|
||||||
|
|
||||||
PSP-STRIP := $PSP_STRIP
|
|
||||||
PSP-FIX := $PSP_FIX
|
|
||||||
PACK-PBP := $PACK_PBP
|
|
||||||
MKSFO := $MKSFO
|
|
||||||
PSP-MOUNTPOINT := $PSP_MOUNTPOINT
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $_host_os = "gp2x" ; then
|
|
||||||
cat >> config.mak << EOF
|
|
||||||
|
|
||||||
GP2X-STRIP := \$(PREFIX)/bin/$GP2X_STRIP
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
# This should be taken care of elsewhere, but I'm not sure where
|
# This should be taken care of elsewhere, but I'm not sure where
|
||||||
rm -f stella-conf*
|
rm -f stella-conf*
|
||||||
|
|
Loading…
Reference in New Issue