1
Article Discussions / Re: Games with older SDL and FSLIB
« on: Today at 07:31:08 am »
Here's sdl-config, I put in h:\tmp\SDL\bin and did "set PATH=h:\tmp\SDL\bin;%PATH%
You need to adjust the prefix to reflect where you installed Valerie's SDL package, rename some of the libs as mentioned, and I had to patch h/SDL/SDL_config_os2.h like so,
Perhaps all the typedef's should be wrapped in the #if defined (__EMX__).
With these changes to the SDL package, rockdodger compiles fine with the original makefile. Changes could still be made, EXENAME=rockdodger.exe so make clean cleans it and trying make pkg failed looking for /usr/bin/install, should be /@unixroot/usr/bin/install, like similar changes can be made.
Many a SDL game should compile for you with these.
sdl-config
You need to adjust the prefix to reflect where you installed Valerie's SDL package, rename some of the libs as mentioned, and I had to patch h/SDL/SDL_config_os2.h like so,
Code: [Select]
H:\tmp\SDL\h\SDL>diff -u SDL_config_os2.h.orig SDL_config_os2.h
--- SDL_config_os2.h.orig 2025-06-23 22:24:50.000000000 -0700
+++ SDL_config_os2.h 2025-06-23 22:17:58.000000000 -0700
@@ -34,7 +34,9 @@
typedef signed int int32_t;
typedef unsigned int uint32_t;
typedef unsigned int size_t;
+#if !defined (__EMX__)
typedef unsigned long uintptr_t;
+#endif
typedef signed long long int64_t;
typedef unsigned long long uint64_t;
Perhaps all the typedef's should be wrapped in the #if defined (__EMX__).
With these changes to the SDL package, rockdodger compiles fine with the original makefile. Changes could still be made, EXENAME=rockdodger.exe so make clean cleans it and trying make pkg failed looking for /usr/bin/install, should be /@unixroot/usr/bin/install, like similar changes can be made.
Many a SDL game should compile for you with these.
sdl-config
Code: [Select]
#!/bin/sh
# Edit the prefix below to reflect your environment
prefix=h:/tmp/SDL
exec_prefix=$prefix
exec_prefix_set=no
libdir=$prefix/lib
usage="\
Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
#usage="\
#Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"
if test $# -eq 0; then
echo "${usage}" 1>&2
exit 1
fi
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | LC_ALL="C" sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
--prefix)
echo $prefix
;;
--exec-prefix=*)
exec_prefix=$optarg
exec_prefix_set=yes
;;
--exec-prefix)
echo $exec_prefix
;;
--version)
echo 1.2.15
;;
--cflags)
echo -I$prefix/h
;;
--libs)
echo -L$prefix/lib -Zomf -lsdl12
;;
# --static-libs)
## --libs|--static-libs)
# echo -L/@unixroot/usr/lib -lSDL -lm
# ;;
*)
echo "${usage}" 1>&2
exit 1
;;
esac
shift
done