diff --git a/glide3x/Makefile.DJ b/glide3x/Makefile.DJ index 3782bf8..9fac249 100644 --- a/glide3x/Makefile.DJ +++ b/glide3x/Makefile.DJ @@ -19,7 +19,7 @@ # default = no # OPTFLAGS pass given optimization flags to compiler # target = sst1, sst96, cvg, h3, h5 -# default = -O2 -ffast-math +# default = -O2 -ffast-math (+ -mcpu=pentium if USE_X86=1) # DEBUG=1 enable debugging checks and messages # target = sst1, sst96, cvg, h3, h5 # default = no diff --git a/glide3x/cvg/glide3/src/Makefile.DJ b/glide3x/cvg/glide3/src/Makefile.DJ index 2313a09..7edf0aa 100644 --- a/glide3x/cvg/glide3/src/Makefile.DJ +++ b/glide3x/cvg/glide3/src/Makefile.DJ @@ -12,7 +12,7 @@ # FX_GLIDE_HW build for the given ASIC (cvg). # default = cvg # OPTFLAGS pass given optimization flags to compiler -# default = -O2 -ffast-math +# default = -O2 -ffast-math (+ -mtune=pentium if USE_X86=1) # DEBUG=1 enable debugging checks and messages # default = no # USE_X86=1 use assembler triangle specializations; req by CVG @@ -43,9 +43,9 @@ # general defines (user settable?) ############################################################################### -GLIDE_LIB = libgld3x.a +GLIDE_LIB = libglide3x.a GLIDE_DXE = glide3x.dxe -GLIDE_IMP = libgld3i.a +GLIDE_IMP = libglide3i.a TEXUS_EXE = texus2.exe FX_GLIDE_HW ?= cvg @@ -58,16 +58,11 @@ TEXUS_EXEDIR = $(FX_GLIDE_SW)/bin ############################################################################### CC = gcc +HOST_CC = gcc AS = nasm AR = ar -HAVEDXE3 = $(wildcard $(DJDIR)/bin/dxe3gen.exe) - -ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),) -UNLINK = del $(subst /,\,$(1)) -else -UNLINK = $(RM) $(1) -endif +UNLINK = rm -f $(1) ############################################################################### # defines @@ -110,11 +105,11 @@ endif ARFLAGS = rus # assembler -ASFLAGS = -O6 -fcoff -D__DJGPP__ --prefix _ +ASFLAGS = -O2 -fcoff -D__DJGPP__ --prefix _ ASFLAGS += $(CDEFS) # compiler -CFLAGS = -Wall -W +CFLAGS = -Wall CFLAGS += -I. -I../../incsrc -I../../init CFLAGS += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap CFLAGS += -I$(FX_GLIDE_SW)/texus2/lib @@ -132,14 +127,15 @@ endif ifeq ($(USE_X86),1) CFLAGS += -DGL_X86 -OPTFLAGS ?= -O2 -ffast-math +OPTFLAGS ?= -O1 -ffast-math -mtune=pentium else CFLAGS += -DGLIDE_USE_C_TRISETUP -OPTFLAGS ?= -O2 -ffast-math +OPTFLAGS ?= -O1 -ffast-math endif # optflags CFLAGS += $(OPTFLAGS) +HOST_CFLAGS=$(filter-out -mcpu=% -mtune=% -march=%,$(CFLAGS)) ############################################################################### # objects @@ -176,7 +172,7 @@ GLIDE_OBJECTS += \ xdraw3_def.o ifeq ($(USE_MMX),1) GLIDE_OBJECTS += \ - xtexdl_mmx.obj + xtexdl_mmx.o endif ifeq ($(USE_3DNOW),1) GLIDE_OBJECTS += \ @@ -254,15 +250,11 @@ $(GLIDE_LIBDIR)/$(GLIDE_LIB): $(GLIDE_OBJECTS) $(AR) $(ARFLAGS) $@ $^ $(GLIDE_LIBDIR)/$(GLIDE_DXE) $(GLIDE_LIBDIR)/$(GLIDE_IMP): $(GLIDE_OBJECTS) -ifeq ($(HAVEDXE3),) - $(warning Missing DXE3 package... Skipping $(GLIDE_DXE)) -else -dxe3gen -o $(GLIDE_LIBDIR)/$(GLIDE_DXE) -Y $(GLIDE_LIBDIR)/$(GLIDE_IMP) -D "Glide3(cvg) DJGPP" -E _gr -E _gu -E _tx -U $^ -endif $(TEXUS_EXEDIR)/$(TEXUS_EXE): $(FX_GLIDE_SW)/texus2/cmd/cmd.c $(GLIDE_LIBDIR)/$(GLIDE_LIB) ifeq ($(TEXUS2),1) - $(CC) -o $@ -s $(CFLAGS) -L$(GLIDE_LIBDIR) $< -lgld3x + $(CC) -o $@ -s $(CFLAGS) -L$(GLIDE_LIBDIR) $< -lglide3x else $(warning Texus2 not enabled... Skipping $(TEXUS_EXE)) endif @@ -279,7 +271,7 @@ xdraw3_def.o: xdraw3.asm $(AS) -o $@ $(ASFLAGS) $< xtexdl_def.o: xtexdl.c $(CC) -o $@ $(CFLAGS) -c $< -xtexdl_mmx.obj: xtexdl.asm +xtexdl_mmx.o: xtexdl.asm $(AS) -o $@ $(ASFLAGS) -DGL_MMX=1 $< xdraw2_3dnow.o: xdraw2.asm $(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $< @@ -290,14 +282,21 @@ xtexdl_3dnow.o: xtexdl.asm $(GLIDE_OBJECTS): fxinline.h fxgasm.h +# cross-compile workaround: +ifneq ($(COMSPEC),) +RUN_FXGASM=fxgasm.exe +else +RUN_FXGASM=./fxgasm.exe +endif + fxinline.h: fxgasm.exe - $< -inline > $@ + $(RUN_FXGASM) -inline > $@ fxgasm.h: fxgasm.exe - $< -hex > $@ + $(RUN_FXGASM) -hex > $@ fxgasm.exe: fxgasm.c - $(CC) -o $@ $(CFLAGS) $< + $(HOST_CC) -o $@ $(HOST_CFLAGS) $< ############################################################################### # clean, realclean diff --git a/glide3x/cvg/glide3/tests/Makefile.DJ b/glide3x/cvg/glide3/tests/Makefile.DJ index 4ae83ef..223cdd8 100644 --- a/glide3x/cvg/glide3/tests/Makefile.DJ +++ b/glide3x/cvg/glide3/tests/Makefile.DJ @@ -27,8 +27,10 @@ FX_GLIDE_HW = cvg TOP = ../../.. CPU ?= pentium +UNLINK = rm -f $(1) + CC = gcc -CFLAGS = -Wall -O2 -ffast-math -mcpu=$(CPU) +CFLAGS = -Wall -O2 -ffast-math -mtune=$(CPU) CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide3/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc CFLAGS += -I$(TOP)/swlibs/fxmisc CFLAGS += -D__DOS__ -DCVG @@ -37,9 +39,9 @@ CFLAGS += -D__DOS32__ LDFLAGS = -s -L$(TOP)/$(FX_GLIDE_HW)/lib ifdef DXE -LDLIBS = -lgld3i +LDLIBS = -lglide3i else -LDLIBS = -lgld3x +LDLIBS = -lglide3x endif .c.o: @@ -49,3 +51,7 @@ endif all: $(error Must specify to build) + +clean: + -$(call UNLINK,*.o) + -$(call UNLINK,*.exe) diff --git a/glide3x/h3/glide3/src/Makefile.DJ b/glide3x/h3/glide3/src/Makefile.DJ index ffc2ef4..8275d21 100644 --- a/glide3x/h3/glide3/src/Makefile.DJ +++ b/glide3x/h3/glide3/src/Makefile.DJ @@ -41,9 +41,9 @@ # general defines (user settable?) ############################################################################### -GLIDE_LIB = libgld3x.a +GLIDE_LIB = libglide3x.a GLIDE_DXE = glide3x.dxe -GLIDE_IMP = libgld3i.a +GLIDE_IMP = libglide3i.a TEXUS_EXE = texus2.exe FX_GLIDE_HW ?= h3 @@ -56,16 +56,11 @@ TEXUS_EXEDIR = $(FX_GLIDE_SW)/bin ############################################################################### CC = gcc +HOST_CC = gcc AS = nasm AR = ar -HAVEDXE3 = $(wildcard $(DJDIR)/bin/dxe3gen.exe) - -ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),) -UNLINK = del $(subst /,\,$(1)) -else -UNLINK = $(RM) $(1) -endif +UNLINK = rm -f $(1) ############################################################################### # defines @@ -104,11 +99,11 @@ endif ARFLAGS = rus # assembler -ASFLAGS = -O6 -fcoff -D__DJGPP__ --prefix _ +ASFLAGS = -O2 -fcoff -D__DJGPP__ --prefix _ ASFLAGS += $(CDEFS) # compiler -CFLAGS = -Wall -W +CFLAGS = -Wall CFLAGS += -I. -I../../incsrc -I../../minihwc -I../../cinit CFLAGS += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap CFLAGS += -I$(FX_GLIDE_SW)/texus2/lib @@ -121,14 +116,15 @@ endif ifeq ($(USE_X86),1) CFLAGS += -DGL_X86 -OPTFLAGS ?= -O2 -ffast-math +OPTFLAGS ?= -O1 -ffast-math else CFLAGS += -DGLIDE_USE_C_TRISETUP -OPTFLAGS ?= -O2 -ffast-math +OPTFLAGS ?= -O1 -ffast-math endif # optflags CFLAGS += $(OPTFLAGS) +HOST_CFLAGS=$(filter-out -mcpu=% -mtune=% -march=%,$(CFLAGS)) ############################################################################### # objects @@ -235,15 +231,11 @@ $(GLIDE_LIBDIR)/$(GLIDE_LIB): $(GLIDE_OBJECTS) $(AR) $(ARFLAGS) $@ $^ $(GLIDE_LIBDIR)/$(GLIDE_DXE) $(GLIDE_LIBDIR)/$(GLIDE_IMP): $(GLIDE_OBJECTS) -ifeq ($(HAVEDXE3),) - $(warning Missing DXE3 package... Skipping $(GLIDE_DXE)) -else -dxe3gen -o $(GLIDE_LIBDIR)/$(GLIDE_DXE) -Y $(GLIDE_LIBDIR)/$(GLIDE_IMP) -D "Glide3(h3) DJGPP" -E _gr -E _gu -E _tx -U $^ -endif $(TEXUS_EXEDIR)/$(TEXUS_EXE): $(FX_GLIDE_SW)/texus2/cmd/cmd.c $(GLIDE_LIBDIR)/$(GLIDE_LIB) ifeq ($(TEXUS2),1) - $(CC) -o $@ -s $(CFLAGS) -L$(GLIDE_LIBDIR) $< -lgld3x + $(CC) -o $@ -s $(CFLAGS) -L$(GLIDE_LIBDIR) $< -lglide3x else $(warning Texus2 not enabled... Skipping $(TEXUS_EXE)) endif @@ -267,14 +259,21 @@ xtexdl_3dnow.o: xtexdl.asm $(GLIDE_OBJECTS): fxinline.h fxgasm.h +# cross-compile workaround: +ifneq ($(COMSPEC),) +RUN_FXGASM=fxgasm.exe +else +RUN_FXGASM=./fxgasm.exe +endif + fxinline.h: fxgasm.exe - $< -inline > $@ + $(RUN_FXGASM) -inline > $@ fxgasm.h: fxgasm.exe - $< -hex > $@ + $(RUN_FXGASM) -hex > $@ fxgasm.exe: fxgasm.c - $(CC) -o $@ $(CFLAGS) $< + $(HOST_CC) -o $@ $(HOST_CFLAGS) $< ############################################################################### # clean, realclean diff --git a/glide3x/h5/glide3/src/Makefile.DJ b/glide3x/h5/glide3/src/Makefile.DJ index 329c183..f84e0bc 100644 --- a/glide3x/h5/glide3/src/Makefile.DJ +++ b/glide3x/h5/glide3/src/Makefile.DJ @@ -14,7 +14,8 @@ # H4=1 High speed Avenger/Napalm. # default = no # OPTFLAGS pass given optimization flags to compiler -# default = -O2 -ffast-math +# default = -O1 -ffast-math +# -O2 has problems in SLI configurations and GCC3 # DEBUG=1 enable debugging checks and messages # default = no # USE_X86=1 use assembler triangle specializations! @@ -46,9 +47,9 @@ # general defines (user settable?) ############################################################################### -GLIDE_LIB = libgld3x.a +GLIDE_LIB = libglide3x.a GLIDE_DXE = glide3x.dxe -GLIDE_IMP = libgld3i.a +GLIDE_IMP = libglide3i.a TEXUS_EXE = texus2.exe FX_GLIDE_HW ?= h5 @@ -61,16 +62,11 @@ TEXUS_EXEDIR = $(FX_GLIDE_SW)/bin ############################################################################### CC = gcc +HOST_CC = gcc AS = nasm AR = ar -HAVEDXE3 = $(wildcard $(DJDIR)/bin/dxe3gen.exe) - -ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),) -UNLINK = del $(subst /,\,$(1)) -else -UNLINK = $(RM) $(1) -endif +UNLINK = rm -f $(1) ############################################################################### # defines @@ -110,11 +106,11 @@ endif ARFLAGS = rus # assembler -ASFLAGS = -O6 -fcoff -D__DJGPP__ --prefix _ +ASFLAGS = -O2 -fcoff -D__DJGPP__ --prefix _ ASFLAGS += $(CDEFS) # compiler -CFLAGS = -Wall -W +CFLAGS = -Wall -fno-strict-aliasing CFLAGS += -I. -I../../incsrc -I../../minihwc -I../../cinit CFLAGS += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap CFLAGS += -I$(FX_GLIDE_SW)/texus2/lib @@ -139,14 +135,15 @@ endif ifeq ($(USE_X86),1) CFLAGS += -DGL_X86 -OPTFLAGS ?= -O2 -ffast-math +OPTFLAGS ?= -O1 -ffast-math else CFLAGS += -DGLIDE_USE_C_TRISETUP -OPTFLAGS ?= -O2 -ffast-math +OPTFLAGS ?= -O1 -ffast-math endif # optflags CFLAGS += $(OPTFLAGS) +HOST_CFLAGS=$(filter-out -mcpu=% -mtune=% -march=%,$(CFLAGS)) ############################################################################### # objects @@ -263,15 +260,11 @@ $(GLIDE_LIBDIR)/$(GLIDE_LIB): $(GLIDE_OBJECTS) $(AR) $(ARFLAGS) $@ $^ $(GLIDE_LIBDIR)/$(GLIDE_DXE) $(GLIDE_LIBDIR)/$(GLIDE_IMP): $(GLIDE_OBJECTS) -ifeq ($(HAVEDXE3),) - $(warning Missing DXE3 package... Skipping $(GLIDE_DXE)) -else -dxe3gen -o $(GLIDE_LIBDIR)/$(GLIDE_DXE) -Y $(GLIDE_LIBDIR)/$(GLIDE_IMP) -D "Glide3(h5) DJGPP" -E _gr -E _gu -E _tx -U $^ -endif $(TEXUS_EXEDIR)/$(TEXUS_EXE): $(FX_GLIDE_SW)/texus2/cmd/cmd.c $(GLIDE_LIBDIR)/$(GLIDE_LIB) ifeq ($(TEXUS2),1) - $(CC) -o $@ -s $(CFLAGS) -L$(GLIDE_LIBDIR) $< -lgld3x + $(CC) -o $@ -s $(CFLAGS) -L$(GLIDE_LIBDIR) $< -lglide3x else $(warning Texus2 not enabled... Skipping $(TEXUS_EXE)) endif @@ -301,26 +294,37 @@ xtexdl_sse2.o: xtexdl.asm $(GLIDE_OBJECTS): fxinline.h fxgasm.h fxbldno.h +# cross-compile workaround: +ifneq ($(COMSPEC),) +RUN_FXGASM=fxgasm.exe +RUN_FXBLDNO=fxbldno.exe +RUN_GENDATE=gendate.exe +else +RUN_FXGASM=./fxgasm.exe +RUN_FXBLDNO=./fxbldno.exe +RUN_GENDATE=./gendate.exe +endif + fxinline.h: fxgasm.exe - $< -inline > $@ + $(RUN_FXGASM) -inline > $@ fxgasm.h: fxgasm.exe - $< -hex > $@ + $(RUN_FXGASM) -hex > $@ fxgasm.exe: fxgasm.c ../../incsrc/gendate.h - $(CC) -o $@ $(CFLAGS) $< + $(HOST_CC) -o $@ $(HOST_CFLAGS) $< ../../incsrc/gendate.h: gendate.exe - $< > $@ + $(RUN_GENDATE) > $@ fxbldno.h: fxbldno.exe - $< > $@ + $(RUN_FXBLDNO) > $@ gendate.exe: ../../incsrc/gendate.c - $(CC) -o $@ $(CFLAGS) $< + $(HOST_CC) -o $@ $(HOST_CFLAGS) $< fxbldno.exe: fxbldno.c - $(CC) -o $@ $(CFLAGS) $< + $(HOST_CC) -o $@ $(HOST_CFLAGS) $< ############################################################################### # clean, realclean diff --git a/glide3x/h5/glide3/tests/Makefile.DJ b/glide3x/h5/glide3/tests/Makefile.DJ index 6047fd6..ddf9848 100644 --- a/glide3x/h5/glide3/tests/Makefile.DJ +++ b/glide3x/h5/glide3/tests/Makefile.DJ @@ -27,8 +27,10 @@ FX_GLIDE_HW = h5 TOP = ../../.. CPU ?= pentium +UNLINK = rm -f $(1) + CC = gcc -CFLAGS = -Wall -O2 -ffast-math -mcpu=$(CPU) +CFLAGS = -Wall -O2 -ffast-math -mtune=$(CPU) CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide3/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc CFLAGS += -I$(TOP)/swlibs/fxmisc CFLAGS += -D__DOS__ -DH3 @@ -38,9 +40,9 @@ CFLAGS += -DFX_GLIDE_NAPALM=1 LDFLAGS = -s -L$(TOP)/$(FX_GLIDE_HW)/lib ifdef DXE -LDLIBS = -lgld3i +LDLIBS = -lglide3i else -LDLIBS = -lgld3x +LDLIBS = -lglide3x endif .c.o: @@ -50,3 +52,7 @@ endif all: $(error Must specify to build) + +clean: + -$(call UNLINK,*.o) + -$(call UNLINK,*.exe) diff --git a/glide3x/sst1/glide3/src/Makefile.DJ b/glide3x/sst1/glide3/src/Makefile.DJ index 131bd85..1b9893f 100644 --- a/glide3x/sst1/glide3/src/Makefile.DJ +++ b/glide3x/sst1/glide3/src/Makefile.DJ @@ -12,7 +12,7 @@ # FX_GLIDE_HW build for the given ASIC (sst1, sst96). # default = sst1 # OPTFLAGS pass given optimization flags to compiler -# default = -O1 -ffast-math +# default = -O1 -ffast-math (+ -mtune=pentium if USE_X86=1) # DEBUG=1 enable debugging checks and messages # default = no # USE_X86=1 use assembler triangle specializations! @@ -34,9 +34,9 @@ # general defines (user settable?) ############################################################################### -GLIDE_LIB = libgld3x.a +GLIDE_LIB = libglide3x.a GLIDE_DXE = glide3x.dxe -GLIDE_IMP = libgld3i.a +GLIDE_IMP = libglide3i.a TEXUS_EXE = texus2.exe FX_GLIDE_HW ?= sst1 @@ -49,16 +49,11 @@ TEXUS_EXEDIR = $(FX_GLIDE_SW)/bin ############################################################################### CC = gcc +HOST_CC = gcc AS = nasm AR = ar -HAVEDXE3 = $(wildcard $(DJDIR)/bin/dxe3gen.exe) - -ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),) -UNLINK = del $(subst /,\,$(1)) -else -UNLINK = $(RM) $(1) -endif +UNLINK = rm -f $(1) ############################################################################### # defines @@ -80,6 +75,7 @@ CDEFS += -DSST96_FIFO #CDEFS += -DSST96_ALT_FIFO_WRAP #CDEFS += -DINIT96VGASWAP -DINIT_ACCESS_DIRECT CDEFS += -DGLIDE_USE_ALT_REGMAP +GLIDE_LIBDIR = ../../lib/sst96 endif endif @@ -103,11 +99,11 @@ endif ARFLAGS = rus # assembler -ASFLAGS = -O6 -fcoff -D__DJGPP__ --prefix _ +ASFLAGS = -O2 -fcoff -D__DJGPP__ --prefix _ ASFLAGS += $(CDEFS) # compiler -CFLAGS = -Wall -W +CFLAGS = -Wall CFLAGS += -I. -I../../incsrc -I../../init -I../../init/initvg -I../../init/init96 CFLAGS += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap CFLAGS += -I$(FX_GLIDE_SW)/texus2/lib @@ -115,7 +111,7 @@ CFLAGS += $(CDEFS) ifeq ($(USE_X86),1) CFLAGS += -DGL_X86 -OPTFLAGS ?= -O1 -ffast-math +OPTFLAGS ?= -O1 -ffast-math -mtune=pentium else CFLAGS += -DGLIDE_USE_C_TRISETUP OPTFLAGS ?= -O1 -ffast-math @@ -123,6 +119,7 @@ endif # optflags CFLAGS += $(OPTFLAGS) +HOST_CFLAGS=$(filter-out -mcpu=% -mtune=% -march=%,$(CFLAGS)) ############################################################################### # objects @@ -238,15 +235,11 @@ $(GLIDE_LIBDIR)/$(GLIDE_LIB): $(GLIDE_OBJECTS) $(AR) $(ARFLAGS) $@ $^ $(GLIDE_LIBDIR)/$(GLIDE_DXE) $(GLIDE_LIBDIR)/$(GLIDE_IMP): $(GLIDE_OBJECTS) -ifeq ($(HAVEDXE3),) - $(warning Missing DXE3 package... Skipping $(GLIDE_DXE)) -else -dxe3gen -o $(GLIDE_LIBDIR)/$(GLIDE_DXE) -Y $(GLIDE_LIBDIR)/$(GLIDE_IMP) -D "Glide3($(FX_GLIDE_HW)) DJGPP" -E _gr -E _gu -E _tx -U $^ -endif $(TEXUS_EXEDIR)/$(TEXUS_EXE): $(FX_GLIDE_SW)/texus2/cmd/cmd.c $(GLIDE_LIBDIR)/$(GLIDE_LIB) ifeq ($(TEXUS2),1) - $(CC) -o $@ -s $(CFLAGS) -L$(GLIDE_LIBDIR) $< -lgld3x + $(CC) -o $@ -s $(CFLAGS) -L$(GLIDE_LIBDIR) $< -lglide3x else $(warning Texus2 not enabled... Skipping $(TEXUS_EXE)) endif @@ -287,14 +280,21 @@ endif $(GLIDE_OBJECTS): fxinline.h fxgasm.h +# cross-compile workaround: +ifneq ($(COMSPEC),) +RUN_FXGASM=fxgasm.exe +else +RUN_FXGASM=./fxgasm.exe +endif + fxinline.h: fxgasm.exe - $< -inline > $@ + $(RUN_FXGASM) -inline > $@ fxgasm.h: fxgasm.exe - $< -hex > $@ + $(RUN_FXGASM) -hex > $@ fxgasm.exe: fxgasm.c - $(CC) -o $@ $(CFLAGS) $< + $(HOST_CC) -o $@ $(HOST_CFLAGS) $< ############################################################################### # clean, realclean diff --git a/glide3x/sst1/glide3/tests/Makefile.DJ b/glide3x/sst1/glide3/tests/Makefile.DJ index ac573d6..2823765 100644 --- a/glide3x/sst1/glide3/tests/Makefile.DJ +++ b/glide3x/sst1/glide3/tests/Makefile.DJ @@ -38,8 +38,10 @@ override FX_GLIDE_HW = sst1 TOP = ../../.. CPU ?= pentium +UNLINK = rm -f $(1) + CC = gcc -CFLAGS = -Wall -O2 -ffast-math -mcpu=$(CPU) +CFLAGS = -Wall -O2 -ffast-math -mtune=$(CPU) CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide3/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc -I$(TOP)/$(FX_GLIDE_HW)/init CFLAGS += -I$(TOP)/swlibs/fxmisc CFLAGS += -D__DOS__ $(HWDEF) @@ -48,9 +50,9 @@ CFLAGS += -D__DOS32__ LDFLAGS = -s -L$(TOP)/$(FX_GLIDE_HW)/lib ifdef DXE -LDLIBS = -lgld3i +LDLIBS = -lglide3i else -LDLIBS = -lgld3x +LDLIBS = -lglide3x endif .c.o: @@ -60,3 +62,7 @@ endif all: $(error Must specify to build) + +clean: + -$(call UNLINK,*.o) + -$(call UNLINK,*.exe)