Beginning ST development.
This commit is contained in:
parent
44712241fb
commit
7565c30b2a
5 changed files with 122 additions and 34 deletions
|
@ -1,7 +1,5 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
#***TODO*** Move "installed" into SDKs folders
|
||||
|
||||
# Amiga
|
||||
# https://github.com/bebbo/amiga-gcc
|
||||
# m68k-amigaos-gcc -idirafter /home/scott/joey/sdks/amiga/m68k-amigaos/sys-include/machine -c ../src/joey.c
|
||||
|
@ -137,7 +135,7 @@ function doPCBuild() {
|
|||
createBuildAndDist
|
||||
|
||||
pushd "${BUILD}"
|
||||
"${CC}" ${CFLAGS} ${G_CFLAGS} -o jPC.o "${SRC}/jPC.c"
|
||||
"${CC}" ${CFLAGS} ${G_CFLAGS} -o jSDL2.o "${SRC}/jSDL2.c"
|
||||
"${CC}" ${CFLAGS} ${G_CFLAGS} -o joey.o "${SRC}/joey.c"
|
||||
ar x "${INSTALLED}/lib/libSDL2.a"
|
||||
ar x "${INSTALLED}/lib/libSDL2_mixer.a"
|
||||
|
@ -228,6 +226,9 @@ if [[ "${ARCH}x" == "allx" || "${ARCH}x" == "stx" ]]; then
|
|||
pushd "${BUILD}"
|
||||
m68k-atari-mint-gcc -c "${SRC}/joey.c"
|
||||
m68k-atari-mint-gcc -c "${SRC}/jST.c"
|
||||
m68k-atari-mint-ar x "${DEPS}/st/lib/libSDL.a"
|
||||
m68k-atari-mint-ar x "${DEPS}/st/lib/libSDL_mixer.a"
|
||||
m68k-atari-mint-ar x "${DEPS}/st/lib/libmikmod.a"
|
||||
m68k-atari-mint-ar rcs "${DIST}/libjoeylib.a" *.o
|
||||
popd
|
||||
clearBuild
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
JOEY = /home/scott/joey
|
||||
CONFIG += SDL12
|
||||
#CONFIG += SDL2
|
||||
|
||||
|
||||
TEMPLATE = app
|
||||
CONFIG += console
|
||||
CONFIG -= \
|
||||
app_bundle \
|
||||
qt
|
||||
|
||||
JOEY = /home/scott/joey
|
||||
|
||||
QMAKE_CFLAGS += \
|
||||
-I$$PWD/src \
|
||||
-D_REENTRANT
|
||||
|
@ -16,22 +19,26 @@ HEADERS += \
|
|||
|
||||
SOURCES += \
|
||||
src/joey.c \
|
||||
src/jPC.c \
|
||||
src/test.c
|
||||
|
||||
OTHER_FILES += \
|
||||
src/jBlank.c \
|
||||
src/jST.c \
|
||||
src/jAmiga.c \
|
||||
src/jIIgs.c \
|
||||
src/jIIgs.asm \
|
||||
src/jIIgs.macro \
|
||||
build-IIgs.sh \
|
||||
build-IIgs.helper.sh \
|
||||
build-PC.sh
|
||||
SDL12 {
|
||||
SOURCES += src/jSDL12.c
|
||||
|
||||
SDL_LIBS = \
|
||||
-L$$JOEY/SDL2/installed/linux/x64/lib \
|
||||
LIBS += \
|
||||
-L$$JOEY/sdks/linux/x64/lib \
|
||||
-lSDL \
|
||||
-lSDL_mixer \
|
||||
-lmikmod \
|
||||
-lm \
|
||||
-ldl \
|
||||
-lsndio
|
||||
}
|
||||
|
||||
SDL2 {
|
||||
SOURCES += src/jSDL2.c
|
||||
|
||||
LIBS += \
|
||||
-L$$JOEY/sdks/linux/x64/lib \
|
||||
-Wl,--enable-new-dtags \
|
||||
-lSDL2 \
|
||||
-lSDL2_mixer \
|
||||
|
@ -41,9 +48,12 @@ SDL_LIBS = \
|
|||
-ldl \
|
||||
-lpthread \
|
||||
-lrt
|
||||
}
|
||||
|
||||
LIBS += \
|
||||
$$SDL_LIBS
|
||||
|
||||
DISTFILES += \
|
||||
OTHER_FILES += \
|
||||
src/jBlankcd ..c \
|
||||
src/jAmiga.c \
|
||||
src/jIIgs.c \
|
||||
src/jIIgs.asm \
|
||||
src/jIIgs.macro \
|
||||
joey.pri
|
||||
|
|
|
@ -116,7 +116,7 @@ function buildPCDeps() {
|
|||
hg clone http://hg.libsdl.org/SDL
|
||||
fi
|
||||
if [[ ! -e "${PREFIX}/lib/libSDL2.a" ]]; then
|
||||
clearPCDepsBuild
|
||||
clearDepsBuild
|
||||
pushd build &> /dev/null
|
||||
../SDL/configure \
|
||||
--target="${CROSS}" \
|
||||
|
@ -145,7 +145,7 @@ function buildPCDeps() {
|
|||
popd &> /dev/null
|
||||
fi
|
||||
if [[ ! -e "${PREFIX}/lib/libmodplug.a" ]]; then
|
||||
clearPCDepsBuild
|
||||
clearDepsBuild
|
||||
pushd build &> /dev/null
|
||||
../libmodplug/configure \
|
||||
--target="${CROSS}" \
|
||||
|
@ -165,7 +165,7 @@ function buildPCDeps() {
|
|||
hg clone http://hg.libsdl.org/SDL_mixer
|
||||
fi
|
||||
if [[ ! -e "${PREFIX}/lib/libSDL2_mixer.a" ]]; then
|
||||
clearPCDepsBuild
|
||||
clearDepsBuild
|
||||
pushd build &> /dev/null
|
||||
MODPLUG_CFLAGS="-I${PREFIX}/include -DMODPLUG_STATIC" \
|
||||
MODPLUG_LIBS="-L${PREFIX}/lib -lmodplug -lstdc++ -lm" \
|
||||
|
@ -204,7 +204,80 @@ function buildPCDeps() {
|
|||
}
|
||||
|
||||
|
||||
function clearPCDepsBuild() {
|
||||
function buildSDL12() {
|
||||
local CROSS=$1
|
||||
local PREFIX=$2
|
||||
|
||||
mkdir -p deps
|
||||
pushd deps &> /dev/null
|
||||
|
||||
purple "Building SDL"
|
||||
if [[ ! -d SDL-1.2 ]]; then
|
||||
hg clone http://hg.libsdl.org/SDL SDL-1.2 -r SDL-1.2
|
||||
fi
|
||||
if [[ ! -e "${PREFIX}/lib/libSDL.a" ]]; then
|
||||
clearDepsBuild
|
||||
pushd build &> /dev/null
|
||||
CC="${CROSS}-gcc" \
|
||||
../SDL-1.2/configure \
|
||||
--target="${CROSS}" \
|
||||
--host="${CROSS}" \
|
||||
--build=x86_64-linux \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
--disable-threads \
|
||||
--disable-video-opengl \
|
||||
--prefix="${PREFIX}"
|
||||
make
|
||||
make install
|
||||
popd &> /dev/null # build
|
||||
fi
|
||||
|
||||
purple "Building SDL_mixer and libMikMod"
|
||||
if [[ ! -d SDL_mixer-1.2 ]]; then
|
||||
hg clone http://hg.libsdl.org/SDL_mixer SDL_mixer-1.2 -r SDL-1.2
|
||||
fi
|
||||
if [[ ! -e "${PREFIX}/lib/libmikmod.a" ]]; then
|
||||
clearDepsBuild
|
||||
pushd build &> /dev/null
|
||||
unzip ../SDL_mixer-1.2/libmikmod-*.zip
|
||||
mv libmikmod-* libmikmod
|
||||
CC="${CROSS}-gcc" \
|
||||
libmikmod/configure \
|
||||
--target="${CROSS}" \
|
||||
--host="${CROSS}" \
|
||||
--build=x86_64-linux \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
--prefix="${PREFIX}"
|
||||
make
|
||||
make install
|
||||
popd &> /dev/null # build
|
||||
fi
|
||||
if [[ ! -e "${PREFIX}/lib/libSDL_mixer.a" ]]; then
|
||||
clearDepsBuild
|
||||
pushd build &> /dev/null
|
||||
SDL_CONFIG="${PREFIX}/bin/sdl-config" \
|
||||
LIBMIKMOD_CONFIG="${PREFIX}/bin/libmikmod-config" \
|
||||
CC="${CROSS}-gcc" \
|
||||
../SDL_mixer-1.2/configure \
|
||||
--target="${CROSS}" \
|
||||
--host="${CROSS}" \
|
||||
--build=x86_64-linux \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
--disable-music-midi \
|
||||
--enable-music-mod \
|
||||
--disable-music-mod-shared \
|
||||
--prefix="${PREFIX}"
|
||||
make
|
||||
make install
|
||||
popd &> /dev/null # build
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function clearDepsBuild() {
|
||||
if [[ -d $(pwd)/build ]]; then
|
||||
rm -rf $(pwd)/build
|
||||
fi
|
||||
|
@ -573,6 +646,7 @@ function installLinux64() {
|
|||
"x86_64-linux-gnu-gcc" \
|
||||
"x86_64-linux-gnu-g++" \
|
||||
""
|
||||
buildSDL12 "x86_64-linux-gnu" "${JOEY}/sdks/linux/x64"
|
||||
}
|
||||
|
||||
|
||||
|
@ -680,7 +754,7 @@ function installST() {
|
|||
popd &> /dev/null
|
||||
fi
|
||||
|
||||
#***TODO*** SDL & Friends
|
||||
buildSDL12 "m68k-atari-mint" "${ST}"
|
||||
|
||||
purple "Building JoeyLib"
|
||||
"${G_PARENT}/joeylib/joeylib/build.sh" st &> /dev/null
|
||||
|
@ -898,6 +972,7 @@ function start() {
|
|||
sed \
|
||||
tar \
|
||||
texinfo \
|
||||
unzip \
|
||||
uuid-dev \
|
||||
wget \
|
||||
xcftools \
|
||||
|
@ -936,6 +1011,7 @@ function start() {
|
|||
echo ""
|
||||
tBoldBox tBLUE "Downloading JoeyLib source..."
|
||||
git clone https://skunkworks.kangaroopunch.com/skunkworks/joeylib.git ${G_PARENT}/joeylib &> /dev/null
|
||||
#***TODO*** Swap the manually downloaded install script for the one in the archive with a symlink.
|
||||
fi
|
||||
|
||||
mainMenu
|
||||
|
@ -954,6 +1030,7 @@ function start() {
|
|||
G_PARENT=$(pwd)
|
||||
G_SCRIPT=$(basename -- "$0")
|
||||
|
||||
# Set this in case we don't have a config file yet.
|
||||
export JOEY=${G_PARENT}
|
||||
|
||||
# Is SUDO after us?
|
||||
|
|
Loading…
Add table
Reference in a new issue