Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • fabiao/cookbook
  • redox-os/cookbook
  • stratact/cookbook
  • carrot93/cookbook
  • microcolonel/cookbook
  • feliwir/cookbook
  • xTibor/cookbook
  • jD91mZM2/cookbook
  • mpajkowski/cookbook
  • rw_van/cookbook
  • athei/cookbook
  • kblobr/cookbook
  • VitalyAnkh/cookbook
  • sajattack/cookbook
  • sainath14/cookbook
  • ackxolotl/cookbook
  • AdminXVII/cookbook
  • coolreader18/cookbook
  • deepaksirone/cookbook
  • smckay/cookbook
  • 4lDO2/cookbook
  • tomasritter/cookbook
  • alfredoyang/cookbook
  • samuela/cookbook
  • andrewdavidmackenzie/cookbook
  • uuuvn/cookbook
  • josh_williams/cookbook
  • bjorn3/cookbook
  • ids1024/cookbook
  • Chocimier/cookbook
  • bpisch/cookbook
  • willnode/cookbook
  • grnmeira/cookbook
  • andrey.turkin/cookbook
  • cameronbraid/cookbook
  • kamirr/cookbook
  • freewilll/cookbook
  • kivimango/cookbook
  • rukai/cookbook
  • mattmadeofpasta/cookbook
  • jordan_mccallum/cookbook
  • dahc/cookbook
  • Forest0923/cookbook
  • LLeny/cookbook
  • doriancodes/cookbook
  • ashton/cookbook
  • gmacd/cookbook
  • mojo/cookbook
  • wt/cookbook
  • red15/cookbook
  • hasheddan/cookbook
  • dimymark/cookbook
  • andypython/cookbook
  • enygmator/cookbook
  • Ivan/cookbook
  • argslc/cookbook
  • adi-g15/cookbook
  • tfinnegan937/cookbook
  • raffaeleragni/cookbook
  • Lekkit/cookbook
  • bitstr0m/cookbook
  • josh/cookbook
  • zhaozhao/cookbook
  • blueskyson/cookbook
  • Xunjin/cookbook
  • StaringAtEditor/cookbook
  • monk_programmer/cookbook
  • DimitarGj/cookbook
  • njskalski/cookbook
  • DLC/cookbook
70 results
Show changes
Showing
with 509 additions and 49 deletions
VERSION=1.6.0
TAR="https://neverball.org/neverball-${VERSION}.tar.gz"
BUILD_DEPENDS=(freetype libjpeg libogg liborbital libpng libvorbis llvm mesa sdl2 sdl2_ttf zlib)
BUILD_DEPENDS=(freetype2 libjpeg libogg liborbital libpng libvorbis llvm18 mesa sdl2 sdl2-ttf zlib)
function recipe_version {
echo "$VERSION"
skip=1
}
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
env -i PATH=/usr/bin:/bin PKG_CONFIG=pkg-config \
set -x
env -i \
LDFLAGS="-static -ljpeg -lpng16 -lz" \
PATH="/usr/bin:/bin" \
PKG_CONFIG="pkg-config" \
"$REDOX_MAKE" -j"$($NPROC)" ENABLE_FS=stdio mapc sols
sysroot="$(realpath ../sysroot)"
export CPPFLAGS="-I$sysroot/include"
export LDFLAGS="-L$sysroot/lib -static"
export LDFLAGS="-L$sysroot/lib -static -z noexecstack"
"$REDOX_MAKE" -j"$($NPROC)" ENABLE_FS=stdio ENABLE_NLS=0 clean-src
"$REDOX_MAKE" -j"$($NPROC)" ENABLE_FS=stdio ENABLE_NLS=0 neverball neverputt
skip=1
}
function recipe_test {
echo "skipping test"
set +x
skip=1
}
......@@ -35,11 +30,25 @@ function recipe_clean {
function recipe_stage {
dest="$(realpath $1)"
mkdir -p "${dest}/games/neverball"
# Create install directories
mkdir -pv "${dest}/usr/games/neverball" "${dest}/ui/apps" "${dest}/ui/icons/apps"
# Copy assets
cp -rv data "${dest}/usr/games/neverball"
# For each game
for bin in neverball neverputt
do
"${STRIP}" -v "$bin" -o "${dest}/games/neverball/$bin"
# Install binary
"${STRIP}" -v "${bin}" -o "${dest}/usr/games/neverball/${bin}"
# Install manifest
cp -v "${COOKBOOK_RECIPE}/manifest-${bin}" "${dest}/ui/apps/${bin}"
# Install icon
cp -v "dist/${bin}_64.png" "${dest}/ui/icons/apps/${bin}.png"
done
cp -rv data "${dest}/games/neverball"
skip=1
}
diff -ruwN source/Makefile source-new/Makefile
--- source/Makefile 2019-08-07 22:16:07.630185664 -0600
+++ source-new/Makefile 2019-08-09 21:41:20.296942596 -0600
diff -ruwN neverball-1.6.0/Makefile source/Makefile
--- neverball-1.6.0/Makefile 2014-05-21 07:21:43.000000000 -0600
+++ source/Makefile 2023-09-09 20:03:22.113348963 -0600
@@ -38,11 +38,11 @@
ifeq ($(DEBUG),1)
CFLAGS := -g
......@@ -73,3 +73,15 @@ diff -ruwN source/Makefile source-new/Makefile
$(BALL_TARG) : $(BALL_OBJS)
$(LINK) -o $(BALL_TARG) $(BALL_OBJS) $(LDFLAGS) $(ALL_LIBS)
diff -ruwN neverball-1.6.0/share/text.h source/share/text.h
--- neverball-1.6.0/share/text.h 2014-05-21 07:21:43.000000000 -0600
+++ source/share/text.h 2023-09-09 20:02:10.117248865 -0600
@@ -15,7 +15,7 @@
/*---------------------------------------------------------------------------*/
-char text_input[MAXSTR];
+extern char text_input[MAXSTR];
void text_input_start(void (*cb)(int typing));
void text_input_stop(void);
[source]
tar = "https://github.com/AlisterT/openjazz/archive/refs/tags/20240919.tar.gz"
blake3 = "c419066dd7bf50510c5ef0746fc47450ab8f5a17a0010a1bc0ad67d0e63538da"
[build]
template = "custom"
dependencies = [
"liborbital",
"libiconv",
"sdl1",
"zlib",
]
script = """
export CFLAGS="${CFLAGS} -I${COOKBOOK_SYSROOT}/include"
export CXXFLAGS="${CXXFLAGS} -I${COOKBOOK_SYSROOT}/include"
export DATAPATH="/usr/share/games/openjazz/"
COOKBOOK_CONFIGURE="cmake"
COOKBOOK_CONFIGURE_FLAGS=(
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CROSSCOMPILING=ON
-DCMAKE_CXX_COMPILER="${TARGET}-g++"
-DCMAKE_C_COMPILER="${TARGET}-gcc"
-DCMAKE_INSTALL_PREFIX="/"
-DCMAKE_VERBOSE_MAKEFILE=ON
-DLEGACY_SDL=ON
-DSDL_LIBRARY="-lSDL -lorbital"
-DNETWORK=ON
"${COOKBOOK_SOURCE}"
)
cookbook_configure
ASSETS_DIR="${COOKBOOK_STAGE}${DATAPATH}"
INSTALL_DIR="${COOKBOOK_STAGE}/usr/games"
ICON_DIR="${COOKBOOK_STAGE}/ui/icons/apps"
MAN_ROOT="${COOKBOOK_STAGE}/usr/share/man"
mkdir -p "${ASSETS_DIR}" "${INSTALL_DIR}" "${ICON_DIR}" "${MAN_ROOT}"
cp -v "${COOKBOOK_SOURCE}/res/unix/OpenJazz.png" "${ICON_DIR}"
# TODO: Man pages need to be compiled
# cp -v "${COOKBOOK_SOURCE}/res/unix/OpenJazz.6" "${MAN_ROOT}/man6"
mv OpenJazz "${INSTALL_DIR}"
"""
[source]
git = "https://github.com/jackpot51/OpenJK"
upstream = "https://github.com/JACoders/OpenJK.git"
[build]
template = "custom"
dependencies = [
"libjpeg",
"liborbital",
"libpng",
"llvm18",
"mesa",
"sdl2",
"zlib",
]
script = """
export CFLAGS="${CFLAGS} -I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/SDL2"
export CXXFLAGS="${CXXFLAGS} -I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/SDL2"
cat > redox.cmake <<EOF
# the name of the target operating system
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_PROCESSOR "${TARGET%%-*}")
# which compilers to use for C and C++
set(CMAKE_C_COMPILER "${TARGET}-gcc")
set(CMAKE_CXX_COMPILER "${TARGET}-g++")
# where is the target environment located
set(CMAKE_FIND_ROOT_PATH "${COOKBOOK_SYSROOT}")
# adjust the default behavior of the FIND_XXX() commands:
# search programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# search headers, libraries, and packages in the target environment
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
EOF
COOKBOOK_CONFIGURE="cmake"
COOKBOOK_CONFIGURE_FLAGS=(
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX="/"
-DCMAKE_TOOLCHAIN_FILE=redox.cmake
-DCMAKE_VERBOSE_MAKEFILE=On
-DJPEG_INCLUDE_DIR="${COOKBOOK_SYSROOT}/include"
-DJPEG_LIBRARY="-ljpeg"
-DPNG_PNG_INCLUDE_DIR="${COOKBOOK_SYSROOT}/include"
-DPNG_LIBRARY="-lpng"
-DSDL2_LIBRARIES="-lSDL2 -lorbital $("${TARGET}-pkg-config" --libs osmesa)"
-DZLIB_INCLUDE_DIR="${COOKBOOK_SYSROOT}/include"
-DZLIB_LIBRARY="-lz"
"${COOKBOOK_SOURCE}"
)
"${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}"
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}" openjk_sp.x86_64
mkdir -pv "${COOKBOOK_STAGE}/home/user/JediAcademy"
cp -v openjk_sp.x86_64 "${COOKBOOK_STAGE}/home/user/JediAcademy"
"""
......@@ -5,21 +5,11 @@ function recipe_version {
skip=1
}
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
echo "skipping build"
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
echo "skipping clean"
skip=1
......
......@@ -5,21 +5,11 @@ function recipe_version {
skip=1
}
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
echo "skipping build"
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
echo "skipping clean"
skip=1
......@@ -30,5 +20,3 @@ function recipe_stage {
cp -Rv ./* "$1/share/games/openttd/baseset/openmsx"
skip=1
}
......@@ -5,21 +5,11 @@ function recipe_version {
skip=1
}
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
echo "skipping build"
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
echo "skipping clean"
skip=1
......@@ -30,5 +20,3 @@ function recipe_stage {
cp -Rv ./* "$1/share/games/openttd/baseset/opensfx"
skip=1
}
VERSION=1.8
GIT=https://github.com/OpenTTD/OpenTTD.git
BRANCH=release/$VERSION
BUILD_DEPENDS=(freetype liborbital libpng sdl xz zlib)
BUILD_DEPENDS=(freetype2 liborbital libpng sdl1 xz zlib)
function recipe_version {
echo "$VERSION"
skip=1
}
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
sysroot="$(realpath ../sysroot)"
export CFLAGS="-I$sysroot/include"
......@@ -29,11 +24,6 @@ function recipe_build {
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
"$REDOX_MAKE" clean
skip=1
......@@ -43,7 +33,8 @@ function recipe_stage {
dest="$(realpath $1)"
bundledir="$dest/bundle"
"$REDOX_MAKE" VERBOSE=1 ROOT_DIR="$dest/../build/" BUNDLE_DIR="$bundledir" INSTALL_DIR="$dest" install
"$REDOX_MAKE" VERBOSE=1 ROOT_DIR="$dest/../build/" BUNDLE_DIR="$bundledir" INSTALL_DIR="$dest/usr" install
rm -rf "$bundledir"
skip=1
}
name=OpenTyrian
category=Games
binary=/usr/games/opentyrian
icon=/ui/icons/apps/opentyrian.png
# Version date: 02-August-2024
#
# Notes:
# As Tyrian is an ancient, sprite based game, the code isn't updated
# super frequently. So instead of just pinning the version to the last
# official release in 2022, I'm pulling from main because it's unlikely
# anything will break. The last two commits were small fixes, one in 2023
# and one in 2024.
[source]
git = "https://github.com/opentyrian/opentyrian"
patches = [ "redox.patch" ]
[build]
template = "custom"
dependencies = [
"llvm18",
"liborbital",
"mesa",
"sdl2",
"zlib",
# "sdl2-net"
]
script = """
# Build system is only a standalone Makefile
COOKBOOK_CONFIGURE="true"
COOKBOOK_CONFIGURE_FLAGS=""
# See Makefile for variables to override
export PKG_CONFIG="${TARGET}-pkg-config"
ASSETSDIR="${COOKBOOK_STAGE}/usr/share/games/tyrian"
export WITH_NETWORK=false
export REDOX_OVERRIDE=true
export prefix="/usr"
export bindir="${prefix}/games"
export icondir="/ui/icons/apps"
export gamesdir="${prefix}/share/games"
# Prepare the sources and download Tyrian (freeware)
rsync -av --delete "${COOKBOOK_SOURCE}/" "${COOKBOOK_RECIPE}/tyrian21.zip.sha" ./
mkdir -p "${ASSETSDIR}"
curl -OL https://camanis.net/tyrian/tyrian21.zip
sha256sum -c tyrian21.zip.sha
unzip -jd "${ASSETSDIR}" tyrian21.zip
cookbook_configure
"""
Binary files source/.git/index and source-new/.git/index differ
diff '--color=auto' -rupwN source/Makefile source-new/Makefile
--- source/Makefile 2024-10-21 02:46:06.720225834 -0400
+++ source-new/Makefile 2024-10-25 01:03:37.283351544 -0400
@@ -5,10 +5,11 @@ ifneq ($(filter Msys Cygwin, $(shell una
TYRIAN_DIR = C:\\TYRIAN
else
PLATFORM := UNIX
- TYRIAN_DIR = $(gamesdir)/tyrian
+ TYRIAN_DIR ?= $(gamesdir)/tyrian
endif
-WITH_NETWORK := true
+WITH_NETWORK ?= true
+REDOX_OVERRIDE ?= false
################################################################################
@@ -114,11 +115,15 @@ installdirs :
mkdir -p $(DESTDIR)$(docdir)
mkdir -p $(DESTDIR)$(man6dir)
mkdir -p $(DESTDIR)$(desktopdir)
- mkdir -p $(DESTDIR)$(icondir)/hicolor/22x22/apps
- mkdir -p $(DESTDIR)$(icondir)/hicolor/24x24/apps
- mkdir -p $(DESTDIR)$(icondir)/hicolor/32x32/apps
- mkdir -p $(DESTDIR)$(icondir)/hicolor/48x48/apps
- mkdir -p $(DESTDIR)$(icondir)/hicolor/128x128/apps
+ if [ "$(REDOX_OVERRIDE)" = "true" ]; then\
+ mkdir -p $(DESTDIR)$(icondir);\
+ else\
+ mkdir -p $(DESTDIR)$(icondir)/hicolor/22x22/apps;\
+ mkdir -p $(DESTDIR)$(icondir)/hicolor/24x24/apps;\
+ mkdir -p $(DESTDIR)$(icondir)/hicolor/32x32/apps;\
+ mkdir -p $(DESTDIR)$(icondir)/hicolor/48x48/apps;\
+ mkdir -p $(DESTDIR)$(icondir)/hicolor/128x128/apps;\
+ fi;\
.PHONY : install
install : $(TARGET) installdirs
@@ -126,11 +131,15 @@ install : $(TARGET) installdirs
$(INSTALL_DATA) NEWS README $(DESTDIR)$(docdir)/
$(INSTALL_DATA) linux/man/opentyrian.6 $(DESTDIR)$(man6dir)/opentyrian$(man6ext)
$(INSTALL_DATA) linux/opentyrian.desktop $(DESTDIR)$(desktopdir)/
- $(INSTALL_DATA) linux/icons/tyrian-22.png $(DESTDIR)$(icondir)/hicolor/22x22/apps/opentyrian.png
- $(INSTALL_DATA) linux/icons/tyrian-24.png $(DESTDIR)$(icondir)/hicolor/24x24/apps/opentyrian.png
- $(INSTALL_DATA) linux/icons/tyrian-32.png $(DESTDIR)$(icondir)/hicolor/32x32/apps/opentyrian.png
- $(INSTALL_DATA) linux/icons/tyrian-48.png $(DESTDIR)$(icondir)/hicolor/48x48/apps/opentyrian.png
- $(INSTALL_DATA) linux/icons/tyrian-128.png $(DESTDIR)$(icondir)/hicolor/128x128/apps/opentyrian.png
+ if [ "$(REDOX_OVERRIDE)" = "true" ]; then\
+ $(INSTALL_DATA) linux/icons/tyrian-32.png $(DESTDIR)$(icondir)/opentyrian.png;\
+ else\
+ $(INSTALL_DATA) linux/icons/tyrian-22.png $(DESTDIR)$(icondir)/hicolor/22x22/apps/opentyrian.png;\
+ $(INSTALL_DATA) linux/icons/tyrian-24.png $(DESTDIR)$(icondir)/hicolor/24x24/apps/opentyrian.png;\
+ $(INSTALL_DATA) linux/icons/tyrian-32.png $(DESTDIR)$(icondir)/hicolor/32x32/apps/opentyrian.png;\
+ $(INSTALL_DATA) linux/icons/tyrian-48.png $(DESTDIR)$(icondir)/hicolor/48x48/apps/opentyrian.png;\
+ $(INSTALL_DATA) linux/icons/tyrian-128.png $(DESTDIR)$(icondir)/hicolor/128x128/apps/opentyrian.png;\
+ fi;\
.PHONY : uninstall
uninstall :
7790d09a2a3addcd33c66ef063d5900eb81cc9c342f4807eb8356364dd1d9277 tyrian21.zip
diff -burpN source-original/configure.ac source/configure.ac
--- source-original/configure.ac 2008-11-09 20:12:37.000000000 +0100
+++ source/configure.ac 2018-04-22 23:41:16.945896818 +0200
--- source-original/configure.ac 2008-11-09 12:12:37.000000000 -0700
+++ source/configure.ac 2024-09-07 10:06:36.540104562 -0600
@@ -85,8 +85,6 @@ if test "$cross_compiling" != "yes"; the
fi
......@@ -10,3 +10,19 @@ diff -burpN source-original/configure.ac source/configure.ac
AC_DECL_SYS_SIGLIST
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(unistd.h asm/byteorder.h sched.h)
diff -burpN source-original/src/m_misc.c source/src/m_misc.c
--- source-original/src/m_misc.c 2008-11-09 10:13:04.000000000 -0700
+++ source/src/m_misc.c 2024-09-07 10:09:06.890301682 -0600
@@ -954,6 +954,12 @@ void M_LoadDefaults (void)
// read the file in, overriding any set defaults
f = fopen (defaultfile, "r");
+#if defined(__redox__)
+ if (f) {
+ printf("disabling load of config file on redox\n");
+ f = NULL;
+ }
+#endif
if (f)
{
while (!feof(f))
[source]
tar = "https://downloads.sourceforge.net/project/prboom/prboom%20stable/2.5.0/prboom-2.5.0.tar.gz"
blake3 = "24c1b9b5aa15fd73e59162055f2c6d8faa82759b76ddfca9828cd2a5c8dc6b2a"
script = """
DYNAMIC_INIT
autotools_recursive_regenerate
wget -O autotools/config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
"""
[build]
template = "custom"
dependencies = [
"sdl1",
"liborbital",
"sdl1-mixer",
"libogg",
"libvorbis"
]
script = """
DYNAMIC_INIT
export MIXER_LIBS="-lSDL_mixer -lvorbisfile -lvorbis -logg"
COOKBOOK_CONFIGURE_FLAGS+=(
--disable-cpu-opt
--disable-i386-asm
--disable-gl
--disable-sdltest
--without-net
--with-sdl-prefix="${COOKBOOK_SYSROOT}"
ac_cv_lib_SDL_mixer_Mix_OpenAudio=yes
)
cookbook_configure
"""
name=QuakeSpasm
category=Games
binary=/usr/games/quakespasm
icon=/ui/icons/apps/quakespasm.png
# TODO: Promote
# Version: 0.96.3
# Version date: 31-July-2024
[source]
git = "https://github.com/sezero/quakespasm"
rev = "cc32abe09ed417ce3be10af300d2dc2f686349ba"
[build]
template = "custom"
dependencies = [
"llvm18",
"libiconv",
"libogg",
"liborbital",
"libvorbis",
"mesa",
# "sdl1",
"sdl2",
"zlib",
]
script = """
# Skip configuring because QuakeSpasm uses a custom build system
COOKBOOK_CONFIGURE="true"
COOKBOOK_CONFIGURE_FLAGS=""
# Ensure the build system is aware of Redox
# The build system uses sdl-config for Unix, but SDL recommends using pkg-config
export HOST_OS="redox"
export PKG_CONFIG="${TARGET}-pkg-config"
# Config options for the Makefile. Set as necessary (see Makefile).
# MP3 is disabled because libmad doesn't compile at the moment
# Other options weren't tested, but SDL and SDL2 both compile fine
export USE_SDL2=1
export USE_CODEC_MP3=0
export DO_USERDIRS=1
# Source is in Quake/ and icons are in Misc/
rsync -av --delete "${COOKBOOK_SOURCE}/Quake/" "${COOKBOOK_SOURCE}/Misc" ./
# According to frantic grepping, the Redox build system doesn't apply patches to git
git apply "${COOKBOOK_RECIPE}/redox.patch"
cookbook_configure
"""
diff '--color=auto' -rupwN source/Makefile source-new/Makefile
--- source/Makefile 2024-10-15 21:21:14.824589882 -0400
+++ source-new/Makefile 2024-10-16 00:42:27.651948743 -0400
@@ -4,28 +4,34 @@
# "make SDL_CONFIG=/path/to/sdl-config" for unusual SDL installations.
# "make DO_USERDIRS=1" to enable user directories support
+# Base install directory
+DESTDIR ?= "/"
+INSTALLDIR = "${DESTDIR}/usr/games/"
+DATADIR = "${DESTDIR}/usr/share/games/quake1/id1/"
+ICODIR = "${DESTDIR}/ui/icons/apps/"
+
# Enable/Disable user directories support
-DO_USERDIRS=0
+DO_USERDIRS ?= 0
### Enable/Disable SDL2
-USE_SDL2=0
+USE_SDL2 ?= 0
### Enable/Disable codecs for streaming music support
-USE_CODEC_WAVE=1
-USE_CODEC_FLAC=0
-USE_CODEC_MP3=1
-USE_CODEC_VORBIS=1
-USE_CODEC_OPUS=0
+USE_CODEC_WAVE ?= 1
+USE_CODEC_FLAC ?= 0
+USE_CODEC_MP3 ?= 1
+USE_CODEC_VORBIS ?= 1
+USE_CODEC_OPUS ?= 0
# either xmp or mikmod (or modplug)
-USE_CODEC_MIKMOD=0
-USE_CODEC_XMP=0
-USE_CODEC_MODPLUG=0
-USE_CODEC_UMX=0
+USE_CODEC_MIKMOD ?= 0
+USE_CODEC_XMP ?= 0
+USE_CODEC_MODPLUG ?= 0
+USE_CODEC_UMX ?= 0
# which library to use for mp3 decoding: mad or mpg123
-MP3LIB=mad
+MP3LIB ?= mad
# which library to use for ogg decoding: vorbis or tremor
-VORBISLIB=vorbis
+VORBISLIB ?= vorbis
# ---------------------------
# Helper functions
@@ -35,7 +41,7 @@ check_gcc = $(shell if echo | $(CC) $(1)
# ---------------------------
-HOST_OS = $(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]')
+HOST_OS ?= $(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]')
DEBUG ?= 0
@@ -49,7 +55,7 @@ LINKER = $(CC)
STRIP ?= strip
PKG_CONFIG ?= pkg-config
-CPUFLAGS=
+CPUFLAGS ?=
LDFLAGS?=
DFLAGS ?=
CFLAGS ?= -Wall -Wno-trigraphs -MMD
@@ -81,11 +87,19 @@ endif
ifeq ($(USE_SDL2),1)
SDL_CONFIG ?= sdl2-config
+SDL_VERSION = sdl2
else
SDL_CONFIG ?= sdl-config
+SDL_VERSION = sdl
endif
+
+ifeq ($(HOST_OS),redox)
+SDL_CFLAGS = $(shell $(PKG_CONFIG) --cflags $(SDL_VERSION))
+SDL_LIBS = $(shell $(PKG_CONFIG) --libs $(SDL_VERSION))
+else
SDL_CFLAGS = $(shell $(SDL_CONFIG) --cflags)
SDL_LIBS = $(shell $(SDL_CONFIG) --libs)
+endif
NET_LIBS =
ifeq ($(HOST_OS),sunos)
@@ -164,6 +178,8 @@ endif
ifeq ($(HOST_OS),haiku)
COMMON_LIBS= -lGL
+else ifeq ($(HOST_OS),redox)
+COMMON_LIBS= -lorbital $(shell $(PKG_CONFIG) --libs osmesa zlib)
else
COMMON_LIBS= -lGL -lm
endif
@@ -290,7 +306,10 @@ install: quakespasm
cp quakespasm.pak $(QS_APP_DIR)
else
install: quakespasm
- cp quakespasm /usr/local/games/quake
+ mkdir -p "${INSTALLDIR}" "${DATADIR}" "${ICODIR}"
+ cp quakespasm "${INSTALLDIR}/quakespasm"
+ # xxx Probably requires resizing
+ cp Misc/QuakeSpasm_512.png "${ICODIR}/quakespasm.png"
endif
sinclude $(OBJS:.o=.d)