fixed DJGPP test-suite

This commit is contained in:
dborca
2003-05-06 12:55:17 +00:00
parent 3e642e03c4
commit ba980646b9
5 changed files with 129 additions and 4 deletions

View File

@@ -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:
# <file.exe> 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 <filename.exe> to build)

View File

@@ -1636,6 +1636,13 @@ tlErrorMessage( char *err) {
fprintf(stderr, err);
} /* tlErrorMessage */
/* [dBorca] */
FxU32
tlGethWnd(void)
{
return 1;
}
#elif __WIN32__

View File

@@ -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:
# <file.exe> 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 <filename.exe> to build)

View File

@@ -48,6 +48,9 @@ unsigned long hWndMain;
#endif
#ifdef __DJGPP__
/* [dBorca] */
#include <conio.h>
#include <pc.h>
#include <crt0.h>
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

View File

@@ -48,6 +48,9 @@ unsigned long hWndMain;
#endif
#ifdef __DJGPP__
/* [dBorca] */
#include <conio.h>
#include <pc.h>
#include <crt0.h>
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