diff --git a/glide3x/h3/glide3/tests/Makefile.DJ b/glide3x/h3/glide3/tests/Makefile.DJ new file mode 100644 index 0000000..f2a3f23 --- /dev/null +++ b/glide3x/h3/glide3/tests/Makefile.DJ @@ -0,0 +1,51 @@ +# DOS/DJGPP tests makefile v1.0 for Glide3 +# +# Copyright (c) 2002 - Borca Daniel +# Email : dborca@yahoo.com +# Web : http://www.geocities.com/dborca + + +# +# Available options: +# +# Environment variables: +# CPU optimize for the given processor. +# default = k6 +# DXE=1 use DXE modules. +# default = no +# +# Targets: +# build a specific file +# + + +.PHONY: all +.SUFFIXES: .c .o .exe +.SECONDARY: tlib.o + +FX_GLIDE_HW = h3 +TOP = ../../.. +CPU ?= k6 + +CC = gcc +CFLAGS = -Wall -O2 -ffast-math -mcpu=k6 +CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide3/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc +CFLAGS += -I$(TOP)/swlibs/fxmisc +CFLAGS += -D__DOS__ -DH3 +CFLAGS += -D__DOS32__ + +LDFLAGS = -s -L$(TOP)/$(FX_GLIDE_HW)/lib + +ifdef DXE +LDLIBS = -lg3i +else +LDLIBS = -lglid3 +endif + +.c.o: + $(CC) -o $@ $(CFLAGS) -c $< +%.exe: tlib.o %.o + $(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS) + +all: + $(error Must specify to build) diff --git a/glide3x/h3/glide3/tests/tlib.c b/glide3x/h3/glide3/tests/tlib.c index ceeb56f..66f645b 100644 --- a/glide3x/h3/glide3/tests/tlib.c +++ b/glide3x/h3/glide3/tests/tlib.c @@ -1636,6 +1636,13 @@ tlErrorMessage( char *err) { fprintf(stderr, err); } /* tlErrorMessage */ +/* [dBorca] */ +FxU32 +tlGethWnd(void) +{ + return 1; +} + #elif __WIN32__ diff --git a/glide3x/h5/glide3/tests/Makefile.DJ b/glide3x/h5/glide3/tests/Makefile.DJ new file mode 100644 index 0000000..2e5856e --- /dev/null +++ b/glide3x/h5/glide3/tests/Makefile.DJ @@ -0,0 +1,51 @@ +# DOS/DJGPP tests makefile v1.0 for Glide3 +# +# Copyright (c) 2002 - Borca Daniel +# Email : dborca@yahoo.com +# Web : http://www.geocities.com/dborca + + +# +# Available options: +# +# Environment variables: +# CPU optimize for the given processor. +# default = k6 +# DXE=1 use DXE modules. +# default = no +# +# Targets: +# build a specific file +# + + +.PHONY: all +.SUFFIXES: .c .o .exe +.SECONDARY: tlib.o + +FX_GLIDE_HW = h5 +TOP = ../../.. +CPU ?= k6 + +CC = gcc +CFLAGS = -Wall -O2 -ffast-math -mcpu=k6 +CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide3/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc +CFLAGS += -I$(TOP)/swlibs/fxmisc +CFLAGS += -D__DOS__ -DH3 +CFLAGS += -D__DOS32__ + +LDFLAGS = -s -L$(TOP)/$(FX_GLIDE_HW)/lib + +ifdef DXE +LDLIBS = -lg3i +else +LDLIBS = -lglid3 +endif + +.c.o: + $(CC) -o $@ $(CFLAGS) -c $< +%.exe: tlib.o %.o + $(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS) + +all: + $(error Must specify to build) diff --git a/glide3x/h5/glide3/tests/tlib.c b/glide3x/h5/glide3/tests/tlib.c index 96d5936..846e1cc 100644 --- a/glide3x/h5/glide3/tests/tlib.c +++ b/glide3x/h5/glide3/tests/tlib.c @@ -48,6 +48,9 @@ unsigned long hWndMain; #endif #ifdef __DJGPP__ +/* [dBorca] */ +#include +#include #include int crt0_startup_flags = _CRT0_FLAG_NONMOVE_SBRK; #endif @@ -65,7 +68,7 @@ int crt0_startup_flags = _CRT0_FLAG_NONMOVE_SBRK; #ifndef GR_TEXFMT_P_8_6666 #define GR_TEXFMT_P_8_6666 GR_TEXFMT_RSVD0 -#else if GR_TEXFMT_P_8_6666 != GR_TEXFMT_RSVD0 +#elif GR_TEXFMT_P_8_6666 != GR_TEXFMT_RSVD0 # warning GR_TEXFMT_P_8_6666 is not defined as expected #endif @@ -2180,7 +2183,7 @@ tlScreenDump return FXTRUE; } -#ifdef __unix__ +#if defined(__unix__) && !defined(__DJGPP__) /* [dBorca] */ /*------------------------------------------------------------------- Function: tlKbHit @@ -2294,7 +2297,12 @@ tlErrorMessage( char *err) } /* tlErrorMessage */ FxU32 tlGethWnd( void ) { +/* [dBorca] */ +#ifdef __DJGPP__ + return 1; +#else return (FxU32)FrontWindow(); +#endif } #if macintosh diff --git a/glide3x/h5/glide3/tests/tlibmerged.c b/glide3x/h5/glide3/tests/tlibmerged.c index 96d5936..846e1cc 100644 --- a/glide3x/h5/glide3/tests/tlibmerged.c +++ b/glide3x/h5/glide3/tests/tlibmerged.c @@ -48,6 +48,9 @@ unsigned long hWndMain; #endif #ifdef __DJGPP__ +/* [dBorca] */ +#include +#include #include int crt0_startup_flags = _CRT0_FLAG_NONMOVE_SBRK; #endif @@ -65,7 +68,7 @@ int crt0_startup_flags = _CRT0_FLAG_NONMOVE_SBRK; #ifndef GR_TEXFMT_P_8_6666 #define GR_TEXFMT_P_8_6666 GR_TEXFMT_RSVD0 -#else if GR_TEXFMT_P_8_6666 != GR_TEXFMT_RSVD0 +#elif GR_TEXFMT_P_8_6666 != GR_TEXFMT_RSVD0 # warning GR_TEXFMT_P_8_6666 is not defined as expected #endif @@ -2180,7 +2183,7 @@ tlScreenDump return FXTRUE; } -#ifdef __unix__ +#if defined(__unix__) && !defined(__DJGPP__) /* [dBorca] */ /*------------------------------------------------------------------- Function: tlKbHit @@ -2294,7 +2297,12 @@ tlErrorMessage( char *err) } /* tlErrorMessage */ FxU32 tlGethWnd( void ) { +/* [dBorca] */ +#ifdef __DJGPP__ + return 1; +#else return (FxU32)FrontWindow(); +#endif } #if macintosh