#!/bin/bash
TARGET=osx-darwin
export CFLAGS="-DTARGET_MAC -arch i386 -I/usr/local/include"
export LDFLAGS="-arch i386 -framework Cocoa"
echo "### CFLAGS and LDFLAGS env ###"
echo $CFLAGS;
echo $LDFLAGS;
echo "### Building BennuGD Core ###"
cd core
chmod a+x configure
# Patch Makefile.in's to build .dylib's instead of .so's
FILES="bgdrtm/src/Makefile.in bgdrtm/src/Makefile.am"
for i in $FILES; do
echo $i
sed -i -e 's/-module/-shared/g' $i
done
# Patch BGDI (main executable) OSX SDLmain init
# Fixing multiple relinking :)
FILES="bgdi/src/Makefile.in bgdi/src/Makefile.am"
for i in $FILES; do
echo $i
sed -i -e 's/.libs -lbgdrtm/.libs -lSDLmain -lSDL -lbgdrtm/g' $i
sed -i -e 's/bgdi_LDFLAGS =/bgdi_LDFLAGS := -arch i386 -framework Cocoa/g' $i
done
case $1 in
release)
./configure && make clean && make
;;
*)
make
;;
esac
if [ $? -ne 0 ]; then
echo "*** ABORT ***"
exit 1
fi
cd -
echo "### Building BennuGD Modules ###"
cd modules
chmod a+x configure
# Patch Makefile.in's to build .dylib's instead of .so's
for i in *; do
if [ -d $i ]; then
sed -i -e 's/-module/-shared/g' $i/Makefile.in;
sed -i -e 's/-module/-shared/g' $i/Makefile.am;
fi;
done
case $1 in
release)
./configure && make clean && make
;;
*)
make
;;
esac
if [ $? -ne 0 ]; then
echo "*** ABORT ***"
exit 1
fi
cd -
echo "### Building BennuGD Tools ###"
cd tools/moddesc
chmod a+x configure
case $1 in
release)
./configure && make clean && make
;;
*)
make
;;
esac
if [ $? -ne 0 ]; then
echo "*** ABORT ***"
exit 1
fi
cd -
echo "### Copying files to bin folder ###"
mkdir -p bin/$TARGET 2>/dev/null
#cp 3rdparty/des-4.04b/libdes.so bin/$TARGET
cp core/bgdi/src/.libs/bgdi bin/$TARGET
cp core/bgdc/src/bgdc bin/$TARGET
cp core/bgdrtm/src/.libs/libbgdrtm.dylib bin/$TARGET
cp $(find modules -name '*.dylib') bin/$TARGET
cp tools/moddesc/moddesc bin/$TARGET
echo "### Build done! ###"
exit 0
>> cd bennugd
>>./build-osx.sh release
SUBDIRS = \
[...]
mod_ttf \
[...]
AC_OUTPUT([
Makefile
mod_ttf/Makefile
[...]
## Process this file with automake to produce Makefile.in
#AUTOMAKE_OPTIONS = no-dependencies foreign
lib_LTLIBRARIES = libmod_ttf.la
libmod_ttf_la_SOURCES = ttf.c
libmod_ttf_la_CFLAGS = $(COMMON_CFLAGS) $(SDL_CFLAGS) -I$(BGD_PATH)/include -I$(BGD_PATH)/bgdrtm/include -I../libfont/ -I../libgrbase/ -I/usr/local/include/freetype2
libmod_ttf_la_LDFLAGS = -s -shared -no-undefined -avoid-version
libmod_ttf_la_LIBADD = $(COMMON_LDFLAGS) $(SDL_LIBS) -L$(BGD_PATH)/bgdrtm/src/.libs -lbgdrtm -lfreetype -L$(BGD_PATH)/../modules/libgrbase/.libs -lgrbase -L$(BGD_PATH)/../modules/libfont/.libs -lfont
## Make sure these will be cleaned even when they're not built by
## default.
CLEANFILES = libmod_ttf.la
>> autoreconf -i
>> automake
>> ./configure
>> sudo apt-get install build-essential subversion mingw-w64 mingw-w64-tools
>> apt-get source zlib1g
>> cd zlib-1.2.8.dfsg
>> CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar RANLIB=i686-w64-mingw32-ranlib CFLAGS="-DNO_FSEEKO" ./configure --prefix=/usr/i686-w64-mingw32/
>> make
>> sudo make install
>> wget http://www.openssl.org/source/openssl-1.0.1p.tar.gz
>> tar -zxf openssl-1.0.1p.tar.gz
>> cd openssl-1.0.1p
>> PATH=/usr/i686-w64-mingw32/bin/:$PATH ./Configure no-shared disable-capieng --prefix=/usr/i686-w64-mingw32/ mingw
>> PATH=/usr/i686-w64-mingw32/bin/:$PATH make CC=i686-w64-mingw32-gcc RANLIB=i686-w64-mingw32-ranlib
>> sudo make install
>> wget http://kent.dl.sourceforge.net/project/libpng/libpng16/1.6.18/libpng-1.6.18.tar.gz
>> tar -zxf libpng-1.6.18.tar.gz
>> cd libpng-1.6.18
>> ./configure --prefix=/usr/i686-w64-mingw32/ --host=i686-w64-mingw32
>> make
>> sudo make install
>> wget http://www.libsdl.org/release/SDL-1.2.14.tar.gz
>> tar -zxf SDL-1.2.14.tar.gz
>> cd SDL-1.2.14
>> ./configure --prefix=/usr/i686-w64-mingw32/ --host=i686-w64-mingw32 --disable-directx
>> make
>> sudo make install
# Libraries that this one depends upon.
dependency_libs =
>> wget http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.12.tar.gz
>> tar -zxf SDL_mixer-1.2.12.tar.gz
>> cd SDL_mixer-1.2.12
>> ./configure --prefix=/usr/i686-w64-mingw32/ --host=i686-w64-mingw32
>> make
>> sudo make install
PKG_CONFIG_PATH=/usr/i686-w64-mingw32/lib/pkgconfig
CFLAGS ="-O2 -I${WIN32CROSS}/include -I${WIN32CROSS}/include/[b]openssl[/b] -I${WIN32CROSS}/include/SDL"
Cambiad los 3 "make" que están en core, modules y tools por esto: make SDL_LIBS='-lSDL'
Cita
Fuseki ha escrito:
Sounds great! Yes… the Dreamcast port of Bennu has been neglected. I have asked for help on the official forum, but no one answers. I have the engine for my next game finished (the game just needs new graphics and some tuning), and am considering porting it over to Bennu for the Dreamcast, as I'd like to have VMU saving support. I'll keep checking the page to see how you're doing with OGG support. I'm using s3m songs right now.
if (os_id == 5); // Dreamcast
load_fpg("/cd/shit.fpg");
else // PC
load_fpg("shit.fpg");
end