initial attempt at adding os2 support to autotools

This commit is contained in:
Ozkan Sezer 2021-12-01 01:55:56 +03:00
parent 3355464079
commit efa1aa9a8f
3 changed files with 106 additions and 3 deletions

View file

@ -235,14 +235,22 @@ testnative$(EXE): $(srcdir)/testnative.c \
$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @XLIB@
endif
ifeq (@ISOS2@,true)
testnative$(EXE): $(srcdir)/testnative.c \
$(srcdir)/testnativeos2.c
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
endif
#there's probably a better way of doing this
ifeq (@ISMACOSX@,false)
ifeq (@ISWINDOWS@,false)
ifeq (@ISUNIX@,false)
ifeq (@ISOS2@,false)
testnative$(EXE): ;
endif
endif
endif
endif
testoverlay2$(EXE): $(srcdir)/testoverlay2.c $(srcdir)/testyuv_cvt.c
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)

View file

@ -18,6 +18,7 @@ dnl (Haiku, for example, sets none of these.)
ISUNIX="false"
ISWINDOWS="false"
ISMACOSX="false"
ISOS2="false"
dnl Figure out which math library to use
case "$host" in
@ -32,7 +33,7 @@ case "$host" in
MATHLIB=""
SYS_GL_LIBS="-lGL"
;;
*-*-darwin* )
*-*-darwin*)
ISMACOSX="true"
EXE=""
MATHLIB=""
@ -64,17 +65,23 @@ case "$host" in
MATHLIB=""
SYS_GL_LIBS="-lGLES_CM"
;;
*-*-emscripten* )
*-*-emscripten*)
dnl This should really be .js, but we need to specify extra flags when compiling to js
EXE=".bc"
MATHLIB=""
SYS_GL_LIBS=""
;;
*-*-riscos* )
*-*-riscos*)
EXE=",e1f"
MATHLIB=""
SYS_GL_LIBS=""
;;
*-*-os2*)
ISOS2="true"
EXE=".exe"
MATHLIB=""
SYS_GL_LIBS=""
;;
*)
dnl Oh well, call it Unix...
ISUNIX="true"
@ -90,6 +97,7 @@ AC_SUBST(MATHLIB)
AC_SUBST(ISMACOSX)
AC_SUBST(ISWINDOWS)
AC_SUBST(ISUNIX)
AC_SUBST(ISOS2)
dnl Check for SDL
SDL_VERSION=2.0.18