convert win32 Makefiles to crlf, convert path separators to backslash.

This commit is contained in:
sezero
2018-08-08 14:56:02 +03:00
parent 8adf484af7
commit 8c917cb2a2
5 changed files with 1369 additions and 1370 deletions

View File

@@ -1,74 +1,72 @@
# Win32 makefile for Glide3 and Texus2
# This makefile MUST be processed by GNU make!!!
#
# Copyright (c) 2003 - Daniel Borca
# Email : dborca@users.sourceforge.net
# Web : http://www.geocities.com/dborca
#
# $Header$
#
#
# Available options:
#
# Environment variables:
# FX_GLIDE_HW build for the given ASIC (sst1, sst96, cvg, h3, h5).
# default = h5
# H4=1 High speed Avenger/Napalm.
# target = h3, h5
# default = no
# OPTFLAGS pass given optimization flags to compiler
# target = sst1, sst96, cvg, h3, h5
# default = -G6 -O2 (or -Od if DEBUG=1)
# DEBUG=1 enable debugging checks and messages
# target = sst1, sst96, cvg, h3, h5
# default = no
# USE_X86=1 use assembler triangle specializations; req by CVG
# target = sst1, sst96, cvg, h3, h5
# default = no
# USE_3DNOW=1 allow 3DNow! specializations. However, the true CPU
# capabilities are still checked at run-time to avoid
# crashes.
# target = cvg, h3, h5
# default = no
# USE_MMX=1 (see USE_3DNOW)
# target = h5
# default = no
# USE_SSE=1 (see USE_3DNOW)
# target = h5
# default = no
# USE_SSE2=1 (see USE_3DNOW)
# target = h5
# default = no
# TEXUS2=1 embed Texus2 functions into Glide3.
# target = sst1, sst96, cvg, h3, h5
# default = no
#
# Targets:
# all: build everything
# clean: remove object files
# realclean: remove all generated files
#
.PHONY: all clean realclean
export BUILD_NUMBER = 40404
export FX_GLIDE_HW ?= h5
ifeq ($(FX_GLIDE_HW),sst96)
G3_DIR = sst1/glide3/src
else
G3_DIR = $(FX_GLIDE_HW)/glide3/src
endif
all:
make -f Makefile.win32 -C $(G3_DIR)
clean:
make -f Makefile.win32 -C $(G3_DIR) clean
realclean:
make -f Makefile.win32 -C $(G3_DIR) realclean
# Win32 makefile for Glide3 and Texus2, using Visual Studio (cl.exe)
# This makefile MUST be processed by GNU make!!!
#
# Copyright (c) 2003 - Daniel Borca
# Email : dborca@users.sourceforge.net
# Web : http://www.geocities.com/dborca
#
# $Header$
#
#
# Available options:
#
# Environment variables:
# FX_GLIDE_HW build for the given ASIC (sst1, sst96, cvg, h3, h5).
# default = h5
# H4=1 High speed Avenger/Napalm.
# target = h3, h5
# default = no
# OPTFLAGS pass given optimization flags to compiler
# target = sst1, sst96, cvg, h3, h5
# default = -G6 -O2 (or -Od if DEBUG=1)
# DEBUG=1 enable debugging checks and messages
# target = sst1, sst96, cvg, h3, h5
# default = no
# USE_X86=1 use assembler triangle specializations; req by CVG
# target = sst1, sst96, cvg, h3, h5
# default = no
# USE_3DNOW=1 allow 3DNow! specializations. However, the true CPU
# capabilities are still checked at run-time to avoid
# crashes.
# target = cvg, h3, h5
# default = no
# USE_MMX=1 (see USE_3DNOW)
# target = h5
# default = no
# USE_SSE=1 (see USE_3DNOW)
# target = h5
# default = no
# USE_SSE2=1 (see USE_3DNOW)
# target = h5
# default = no
# TEXUS2=1 embed Texus2 functions into Glide3.
# target = sst1, sst96, cvg, h3, h5
# default = no
#
# Targets:
# all: build everything
# clean: remove object files
# realclean: remove all generated files
#
.PHONY: all clean realclean
export BUILD_NUMBER = 40404
export FX_GLIDE_HW ?= h5
ifeq ($(FX_GLIDE_HW),sst96)
G3_DIR = sst1\glide3\src
else
G3_DIR = $(FX_GLIDE_HW)\glide3\src
endif
all:
make -f Makefile.win32 -C $(G3_DIR)
clean:
make -f Makefile.win32 -C $(G3_DIR) clean
realclean:
make -f Makefile.win32 -C $(G3_DIR) realclean

View File

@@ -1,326 +1,326 @@
# Win32 makefile for Glide3/CVG and Texus2
# This makefile MUST be processed by GNU make!!!
#
# Copyright (c) 2004 - Daniel Borca
# Email : dborca@users.sourceforge.net
# Web : http://www.geocities.com/dborca
#
#
# Available options:
#
# Environment variables:
# FX_GLIDE_HW build for the given ASIC (cvg).
# default = cvg
# OPTFLAGS pass given optimization flags to compiler
# default = -G6 -O2 (or -Od if DEBUG=1)
# DEBUG=1 enable debugging checks and messages
# default = no
# USE_X86=1 use assembler triangle specializations; req by CVG
# default = no
# USE_MMX=1 allow MMX specializations. However, the true CPU
# capabilities are still checked at run-time to avoid
# crashes.
# default = no
# USE_3DNOW=1 allow 3DNow! specializations. However, the true CPU
# capabilities are still checked at run-time to avoid
# crashes.
# default = no
# TEXUS2=1 embed Texus2 functions into Glide3.
# default = no
#
# Targets:
# all: build everything
# glide3x: build Glide3x lib
# clean: remove object files
# realclean: remove all generated files
#
.PHONY: all glide3x clean realclean
.INTERMEDIATE: fxgasm.exe
.SUFFIXES: .c .obj .rc .res
###############################################################################
# general defines (user settable?)
###############################################################################
GLIDE_RES = glide.res
GLIDE_DLL = glide3x.dll
GLIDE_IMP = glide3x.lib
TEXUS_EXE = texus2.exe
FX_GLIDE_HW ?= cvg
FX_GLIDE_SW = ../../../swlibs
GLIDE_LIBDIR = ../../lib
TEXUS_EXEDIR = $(FX_GLIDE_SW)/bin
###############################################################################
# tools
###############################################################################
CC = cl
AS = nasm
LD = link
RC = rc
ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
UNLINK = del $(subst /,\,$(1))
else
UNLINK = $(RM) $(1)
endif
###############################################################################
# defines
###############################################################################
# platform
CDEFS = -D__WIN32__ -DDIRECTX -DFX_DLL_ENABLE -D__3Dfx_PCI_CFG__
# general
CDEFS += -DGLIDE3 -DGLIDE3_ALPHA -DGLIDE3_VERTEX_LAYOUT=1 -DGLIDE_HW_TRI_SETUP=1 -DGLIDE_PACKED_RGB=0 -DGLIDE_PACKET3_TRI_SETUP=1 -DGLIDE_TRI_CULLING=1 -DUSE_PACKET_FIFO=1
#CDEFS += -DGLIDE3_SCALER
CDEFS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_DISPATCH_DOWNLOAD=1
# workaround for CVGs with broken tsus which cannot send commands to multiple
# tmus using chipfield. chipfield will always be set to 0xf
CDEFS += -DGLIDE_CHIP_BROADCAST=1
# special sli buffer clears
CDEFS += -DGLIDE_BLIT_CLEAR=1
# subsystem
CDEFS += -DCVG
# debug
ifdef DEBUG
CDEFS += -DGDBG_INFO_ON -DGLIDE_DEBUG -DGLIDE_SANITY_ASSERT -DGLIDE_SANITY_SIZE
endif
# other
CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH
ifeq ($(TEXUS2),1)
CDEFS += -DHAVE_TEXUS2
endif
###############################################################################
# flags
###############################################################################
# linker
LDFLAGS = -nologo -dll -opt:WIN98 -machine:IX86 -nodefaultlib
# assembler
ASFLAGS = -O6 -fwin32 -D__WIN32__ --prefix _
ASFLAGS += $(CDEFS)
# compiler
CFLAGS = -nologo -W3 -WX -D__MSC__=1
LDLIBS = user32.lib kernel32.lib advapi32.lib
ifdef DEBUG
CFLAGS += -MTd -Zi
LDFLAGS += -debugtype:both -debug
LDLIBS += LIBCMTD.lib
OPTFLAGS ?= -Od
else
CFLAGS += -DNDEBUG -MT
LDLIBS += LIBCMT.lib
OPTFLAGS ?= -G6 -O2
endif
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
CFLAGS += $(CDEFS) $(OPTFLAGS)
ifeq ($(USE_MMX),1)
CFLAGS += -DGL_MMX
override USE_X86 = 1
endif
ifeq ($(USE_3DNOW),1)
CFLAGS += -DGL_AMD3D
override USE_X86 = 1
endif
ifeq ($(USE_X86),1)
CFLAGS += -DGL_X86
else
CFLAGS += -DGLIDE_USE_C_TRISETUP
endif
###############################################################################
# objects
###############################################################################
GLIDE_OBJECTS = \
fifo.obj \
distate.obj \
gstrip.obj \
distrip.obj \
diget.obj \
gsplash.obj \
g3df.obj \
gu.obj \
gpci.obj \
diglide.obj \
disst.obj \
ditex.obj \
gbanner.obj \
gerror.obj \
gaa.obj \
gdraw.obj \
gglide.obj \
glfb.obj \
gsst.obj \
gtex.obj \
gtexdl.obj \
xtexdl_def.obj
ifeq ($(USE_X86),1)
GLIDE_OBJECTS += \
cpuid.obj \
xdraw2_def.obj \
xdraw3_def.obj
ifeq ($(USE_MMX),1)
GLIDE_OBJECTS += \
xtexdl_mmx.obj
endif
ifeq ($(USE_3DNOW),1)
GLIDE_OBJECTS += \
xdraw2_3dnow.obj \
xdraw3_3dnow.obj \
xtexdl_3dnow.obj
endif
else
GLIDE_OBJECTS += \
gxdraw.obj
endif
GLIDE_OBJECTS += \
digutex.obj \
$(FX_GLIDE_SW)/newpci/pcilib/fxpci.obj \
$(FX_GLIDE_SW)/newpci/pcilib/fxw32.obj \
$(FX_GLIDE_SW)/newpci/pcilib/fxvxd.obj \
$(FX_GLIDE_SW)/newpci/pcilib/fxnt.obj \
$(FX_GLIDE_SW)/newpci/pcilib/fxmsr.obj \
../../init/canopus.obj \
../../init/dac.obj \
../../init/gamma.obj \
../../init/gdebug.obj \
../../init/info.obj \
../../init/parse.obj \
../../init/print.obj \
../../init/sli.obj \
../../init/sst1init.obj \
../../init/util.obj \
../../init/video.obj \
../../init/fxremap.obj
TEXUS_SOURCES = \
$(FX_GLIDE_SW)/texus2/lib/texuslib.c \
$(FX_GLIDE_SW)/texus2/lib/clamp.c \
$(FX_GLIDE_SW)/texus2/lib/read.c \
$(FX_GLIDE_SW)/texus2/lib/resample.c \
$(FX_GLIDE_SW)/texus2/lib/mipmap.c \
$(FX_GLIDE_SW)/texus2/lib/quantize.c \
$(FX_GLIDE_SW)/texus2/lib/ncc.c \
$(FX_GLIDE_SW)/texus2/lib/nccnnet.c \
$(FX_GLIDE_SW)/texus2/lib/pal256.c \
$(FX_GLIDE_SW)/texus2/lib/pal6666.c \
$(FX_GLIDE_SW)/texus2/lib/dequant.c \
$(FX_GLIDE_SW)/texus2/lib/view.c \
$(FX_GLIDE_SW)/texus2/lib/util.c \
$(FX_GLIDE_SW)/texus2/lib/diffuse.c \
$(FX_GLIDE_SW)/texus2/lib/write.c \
$(FX_GLIDE_SW)/texus2/lib/tga.c \
$(FX_GLIDE_SW)/texus2/lib/3df.c \
$(FX_GLIDE_SW)/texus2/lib/ppm.c \
$(FX_GLIDE_SW)/texus2/lib/rgt.c \
$(FX_GLIDE_SW)/texus2/lib/txs.c \
$(FX_GLIDE_SW)/texus2/lib/codec.c \
$(FX_GLIDE_SW)/texus2/lib/eigen.c \
$(FX_GLIDE_SW)/texus2/lib/bitcoder.c
ifeq ($(TEXUS2),1)
GLIDE_OBJECTS += $(TEXUS_SOURCES:.c=.obj)
endif
###############################################################################
# rules
###############################################################################
.c.obj:
$(CC) -Fo$@ $(CFLAGS) -c $<
.rc.res:
$(RC) -Fo$@ $(CDEFS) -I$(FX_GLIDE_SW)/fxmisc $<
###############################################################################
# main
###############################################################################
all: glide3x $(TEXUS_EXEDIR)/$(TEXUS_EXE)
glide3x: $(GLIDE_LIBDIR)/$(GLIDE_DLL)
$(GLIDE_LIBDIR)/$(GLIDE_DLL): $(GLIDE_OBJECTS) $(GLIDE_RES)
$(LD) -out:$@ $(LDFLAGS) $(GLIDE_OBJECTS) $(LDLIBS) $(GLIDE_RES)
$(TEXUS_EXEDIR)/$(TEXUS_EXE): $(FX_GLIDE_SW)/texus2/cmd/cmd.c $(GLIDE_LIBDIR)/$(GLIDE_IMP)
#ifeq ($(TEXUS2),1)
# $(CC) -o $@ $(CFLAGS) $^
#else
# $(warning Texus2 not enabled... Skipping $(TEXUS_EXE))
#endif
###############################################################################
# rules(2)
###############################################################################
#cpuid.obj: cpudtect.asm
# $(AS) -o $@ $(ASFLAGS) $<
xdraw2_def.obj: xdraw2.asm
$(AS) -o $@ $(ASFLAGS) $<
xdraw3_def.obj: xdraw3.asm
$(AS) -o $@ $(ASFLAGS) $<
xtexdl_def.obj: xtexdl.c
$(CC) -Fo$@ $(CFLAGS) -c $<
xtexdl_mmx.obj: xtexdl.asm
$(AS) -o $@ $(ASFLAGS) -DGL_MMX=1 $<
xdraw2_3dnow.obj: xdraw2.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xdraw3_3dnow.obj: xdraw3.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xtexdl_3dnow.obj: xtexdl.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
$(GLIDE_OBJECTS): fxinline.h fxgasm.h
fxinline.h: fxgasm.exe
./$< -inline > $@
fxgasm.h: fxgasm.exe
./$< -hex > $@
fxgasm.exe: fxgasm.c
$(CC) -o $@ $(CFLAGS) $<
###############################################################################
# clean, realclean
###############################################################################
clean:
-$(call UNLINK,*.obj)
-$(call UNLINK,../../init/*.obj)
-$(call UNLINK,$(FX_GLIDE_SW)/newpci/pcilib/*.obj)
-$(call UNLINK,fxinline.h)
-$(call UNLINK,fxgasm.h)
-$(call UNLINK,$(FX_GLIDE_SW)/texus2/lib/*.obj)
-$(call UNLINK,$(GLIDE_RES))
realclean: clean
-$(call UNLINK,$(GLIDE_LIBDIR)/glide3x.exp)
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_DLL))
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_IMP))
-$(call UNLINK,$(TEXUS_EXEDIR)/$(TEXUS_EXE))
# Win32 makefile for Glide3/CVG and Texus2, using Visual Studio (cl.exe)
# This makefile MUST be processed by GNU make!!!
#
# Copyright (c) 2004 - Daniel Borca
# Email : dborca@users.sourceforge.net
# Web : http://www.geocities.com/dborca
#
#
# Available options:
#
# Environment variables:
# FX_GLIDE_HW build for the given ASIC (cvg).
# default = cvg
# OPTFLAGS pass given optimization flags to compiler
# default = -G6 -O2 (or -Od if DEBUG=1)
# DEBUG=1 enable debugging checks and messages
# default = no
# USE_X86=1 use assembler triangle specializations; req by CVG
# default = no
# USE_MMX=1 allow MMX specializations. However, the true CPU
# capabilities are still checked at run-time to avoid
# crashes.
# default = no
# USE_3DNOW=1 allow 3DNow! specializations. However, the true CPU
# capabilities are still checked at run-time to avoid
# crashes.
# default = no
# TEXUS2=1 embed Texus2 functions into Glide3.
# default = no
#
# Targets:
# all: build everything
# glide3x: build Glide3x lib
# clean: remove object files
# realclean: remove all generated files
#
.PHONY: all glide3x clean realclean
.INTERMEDIATE: fxgasm.exe
.SUFFIXES: .c .obj .rc .res
###############################################################################
# general defines (user settable?)
###############################################################################
GLIDE_RES = glide.res
GLIDE_DLL = glide3x.dll
GLIDE_IMP = glide3x.lib
TEXUS_EXE = texus2.exe
FX_GLIDE_HW ?= cvg
FX_GLIDE_SW = ../..\..\swlibs
GLIDE_LIBDIR = ..\..\lib
TEXUS_EXEDIR = $(FX_GLIDE_SW)\bin
###############################################################################
# tools
###############################################################################
CC = cl
AS = nasm
LD = link
RC = rc
ifeq ($(wildcard $(addsuffix \rm.exe,$(subst ;, ,$(PATH)))),)
UNLINK = del $(subst \,\,$(1))
else
UNLINK = $(RM) $(1)
endif
###############################################################################
# defines
###############################################################################
# platform
CDEFS = -D__WIN32__ -DDIRECTX -DFX_DLL_ENABLE -D__3Dfx_PCI_CFG__
# general
CDEFS += -DGLIDE3 -DGLIDE3_ALPHA -DGLIDE3_VERTEX_LAYOUT=1 -DGLIDE_HW_TRI_SETUP=1 -DGLIDE_PACKED_RGB=0 -DGLIDE_PACKET3_TRI_SETUP=1 -DGLIDE_TRI_CULLING=1 -DUSE_PACKET_FIFO=1
#CDEFS += -DGLIDE3_SCALER
CDEFS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_DISPATCH_DOWNLOAD=1
# workaround for CVGs with broken tsus which cannot send commands to multiple
# tmus using chipfield. chipfield will always be set to 0xf
CDEFS += -DGLIDE_CHIP_BROADCAST=1
# special sli buffer clears
CDEFS += -DGLIDE_BLIT_CLEAR=1
# subsystem
CDEFS += -DCVG
# debug
ifdef DEBUG
CDEFS += -DGDBG_INFO_ON -DGLIDE_DEBUG -DGLIDE_SANITY_ASSERT -DGLIDE_SANITY_SIZE
endif
# other
CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH
ifeq ($(TEXUS2),1)
CDEFS += -DHAVE_TEXUS2
endif
###############################################################################
# flags
###############################################################################
# linker
LDFLAGS = -nologo -dll -opt:WIN98 -machine:IX86 -nodefaultlib
# assembler
ASFLAGS = -O6 -fwin32 -D__WIN32__ --prefix _
ASFLAGS += $(CDEFS)
# compiler
CFLAGS = -nologo -W3 -WX -D__MSC__=1
LDLIBS = user32.lib kernel32.lib advapi32.lib
ifdef DEBUG
CFLAGS += -MTd -Zi
LDFLAGS += -debugtype:both -debug
LDLIBS += LIBCMTD.lib
OPTFLAGS ?= -Od
else
CFLAGS += -DNDEBUG -MT
LDLIBS += LIBCMT.lib
OPTFLAGS ?= -G6 -O2
endif
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
CFLAGS += $(CDEFS) $(OPTFLAGS)
ifeq ($(USE_MMX),1)
CFLAGS += -DGL_MMX
override USE_X86 = 1
endif
ifeq ($(USE_3DNOW),1)
CFLAGS += -DGL_AMD3D
override USE_X86 = 1
endif
ifeq ($(USE_X86),1)
CFLAGS += -DGL_X86
else
CFLAGS += -DGLIDE_USE_C_TRISETUP
endif
###############################################################################
# objects
###############################################################################
GLIDE_OBJECTS = \
fifo.obj \
distate.obj \
gstrip.obj \
distrip.obj \
diget.obj \
gsplash.obj \
g3df.obj \
gu.obj \
gpci.obj \
diglide.obj \
disst.obj \
ditex.obj \
gbanner.obj \
gerror.obj \
gaa.obj \
gdraw.obj \
gglide.obj \
glfb.obj \
gsst.obj \
gtex.obj \
gtexdl.obj \
xtexdl_def.obj
ifeq ($(USE_X86),1)
GLIDE_OBJECTS += \
cpuid.obj \
xdraw2_def.obj \
xdraw3_def.obj
ifeq ($(USE_MMX),1)
GLIDE_OBJECTS += \
xtexdl_mmx.obj
endif
ifeq ($(USE_3DNOW),1)
GLIDE_OBJECTS += \
xdraw2_3dnow.obj \
xdraw3_3dnow.obj \
xtexdl_3dnow.obj
endif
else
GLIDE_OBJECTS += \
gxdraw.obj
endif
GLIDE_OBJECTS += \
digutex.obj \
$(FX_GLIDE_SW)\newpci\pcilib\fxpci.obj \
$(FX_GLIDE_SW)\newpci\pcilib\fxw32.obj \
$(FX_GLIDE_SW)\newpci\pcilib\fxvxd.obj \
$(FX_GLIDE_SW)\newpci\pcilib\fxnt.obj \
$(FX_GLIDE_SW)\newpci\pcilib\fxmsr.obj \
..\..\init\canopus.obj \
..\..\init\dac.obj \
..\..\init\gamma.obj \
..\..\init\gdebug.obj \
..\..\init\info.obj \
..\..\init\parse.obj \
..\..\init\print.obj \
..\..\init\sli.obj \
..\..\init\sst1init.obj \
..\..\init\util.obj \
..\..\init\video.obj \
..\..\init\fxremap.obj
TEXUS_SOURCES = \
$(FX_GLIDE_SW)\texus2\lib\texuslib.c \
$(FX_GLIDE_SW)\texus2\lib\clamp.c \
$(FX_GLIDE_SW)\texus2\lib\read.c \
$(FX_GLIDE_SW)\texus2\lib\resample.c \
$(FX_GLIDE_SW)\texus2\lib\mipmap.c \
$(FX_GLIDE_SW)\texus2\lib\quantize.c \
$(FX_GLIDE_SW)\texus2\lib\ncc.c \
$(FX_GLIDE_SW)\texus2\lib\nccnnet.c \
$(FX_GLIDE_SW)\texus2\lib\pal256.c \
$(FX_GLIDE_SW)\texus2\lib\pal6666.c \
$(FX_GLIDE_SW)\texus2\lib\dequant.c \
$(FX_GLIDE_SW)\texus2\lib\view.c \
$(FX_GLIDE_SW)\texus2\lib\util.c \
$(FX_GLIDE_SW)\texus2\lib\diffuse.c \
$(FX_GLIDE_SW)\texus2\lib\write.c \
$(FX_GLIDE_SW)\texus2\lib\tga.c \
$(FX_GLIDE_SW)\texus2\lib\3df.c \
$(FX_GLIDE_SW)\texus2\lib\ppm.c \
$(FX_GLIDE_SW)\texus2\lib\rgt.c \
$(FX_GLIDE_SW)\texus2\lib\txs.c \
$(FX_GLIDE_SW)\texus2\lib\codec.c \
$(FX_GLIDE_SW)\texus2\lib\eigen.c \
$(FX_GLIDE_SW)\texus2\lib\bitcoder.c
ifeq ($(TEXUS2),1)
GLIDE_OBJECTS += $(TEXUS_SOURCES:.c=.obj)
endif
###############################################################################
# rules
###############################################################################
.c.obj:
$(CC) -Fo$@ $(CFLAGS) -c $<
.rc.res:
$(RC) -Fo$@ $(CDEFS) -I$(FX_GLIDE_SW)\fxmisc $<
###############################################################################
# main
###############################################################################
all: glide3x $(TEXUS_EXEDIR)\$(TEXUS_EXE)
glide3x: $(GLIDE_LIBDIR)\$(GLIDE_DLL)
$(GLIDE_LIBDIR)\$(GLIDE_DLL): $(GLIDE_OBJECTS) $(GLIDE_RES)
$(LD) -out:$@ $(LDFLAGS) $(GLIDE_OBJECTS) $(LDLIBS) $(GLIDE_RES)
$(TEXUS_EXEDIR)\$(TEXUS_EXE): $(FX_GLIDE_SW)\texus2\cmd\cmd.c $(GLIDE_LIBDIR)\$(GLIDE_IMP)
#ifeq ($(TEXUS2),1)
# $(CC) -o $@ $(CFLAGS) $^
#else
# $(warning Texus2 not enabled... Skipping $(TEXUS_EXE))
#endif
###############################################################################
# rules(2)
###############################################################################
#cpuid.obj: cpudtect.asm
# $(AS) -o $@ $(ASFLAGS) $<
xdraw2_def.obj: xdraw2.asm
$(AS) -o $@ $(ASFLAGS) $<
xdraw3_def.obj: xdraw3.asm
$(AS) -o $@ $(ASFLAGS) $<
xtexdl_def.obj: xtexdl.c
$(CC) -Fo$@ $(CFLAGS) -c $<
xtexdl_mmx.obj: xtexdl.asm
$(AS) -o $@ $(ASFLAGS) -DGL_MMX=1 $<
xdraw2_3dnow.obj: xdraw2.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xdraw3_3dnow.obj: xdraw3.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xtexdl_3dnow.obj: xtexdl.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
$(GLIDE_OBJECTS): fxinline.h fxgasm.h
fxinline.h: fxgasm.exe
.\$< -inline > $@
fxgasm.h: fxgasm.exe
.\$< -hex > $@
fxgasm.exe: fxgasm.c
$(CC) -o $@ $(CFLAGS) $<
###############################################################################
# clean, realclean
###############################################################################
clean:
-$(call UNLINK,*.obj)
-$(call UNLINK,..\..\init\*.obj)
-$(call UNLINK,$(FX_GLIDE_SW)\newpci\pcilib\*.obj)
-$(call UNLINK,fxinline.h)
-$(call UNLINK,fxgasm.h)
-$(call UNLINK,$(FX_GLIDE_SW)\texus2\lib\*.obj)
-$(call UNLINK,$(GLIDE_RES))
realclean: clean
-$(call UNLINK,$(GLIDE_LIBDIR)\glide3x.exp)
-$(call UNLINK,$(GLIDE_LIBDIR)\$(GLIDE_DLL))
-$(call UNLINK,$(GLIDE_LIBDIR)\$(GLIDE_IMP))
-$(call UNLINK,$(TEXUS_EXEDIR)\$(TEXUS_EXE))

View File

@@ -1,293 +1,293 @@
# Win32 makefile for Glide3/H3 and Texus2
# This makefile MUST be processed by GNU make!!!
#
# Copyright (c) 2004 - Daniel Borca
# Email : dborca@users.sourceforge.net
# Web : http://www.geocities.com/dborca
#
#
# Available options:
#
# Environment variables:
# FX_GLIDE_HW build for the given ASIC (h3).
# default = h3
# H4=1 High speed Avenger.
# default = no
# OPTFLAGS pass given optimization flags to compiler
# default = -G6 -O2 (or -Od if DEBUG=1)
# DEBUG=1 enable debugging checks and messages
# default = no
# USE_X86=1 use assembler triangle specializations!
# default = no
# USE_3DNOW=1 allow 3DNow! specializations. However, the true CPU
# capabilities are still checked at run-time to avoid
# crashes.
# default = no
# TEXUS2=1 embed Texus2 functions into Glide3.
# default = no
#
# Targets:
# all: build everything
# glide3x: build Glide3x lib
# clean: remove object files
# realclean: remove all generated files
#
.PHONY: all glide3x clean realclean
.INTERMEDIATE: fxgasm.exe
.SUFFIXES: .c .obj .rc .res
###############################################################################
# general defines (user settable?)
###############################################################################
GLIDE_RES = glide.res
GLIDE_DLL = glide3x.dll
GLIDE_IMP = glide3x.lib
TEXUS_EXE = texus2.exe
FX_GLIDE_HW ?= h3
FX_GLIDE_SW = ../../../swlibs
GLIDE_LIBDIR = ../../lib
TEXUS_EXEDIR = $(FX_GLIDE_SW)/bin
###############################################################################
# tools
###############################################################################
CC = cl
AS = nasm
LD = link
RC = rc
ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
UNLINK = del $(subst /,\,$(1))
else
UNLINK = $(RM) $(1)
endif
###############################################################################
# defines
###############################################################################
# platform
CDEFS = -D__WIN32__ -DFX_DLL_ENABLE -DHWC_ACCESS_DDRAW=1 -DHWC_EXT_INIT=1 -DGLIDE_ALT_TAB=1
# general
CDEFS += -DGLIDE3 -DGLIDE3_ALPHA -DGLIDE_HW_TRI_SETUP=1 -DGLIDE_INIT_HWC -DGLIDE_PACKED_RGB=0 -DGLIDE_PACKET3_TRI_SETUP=1 -DGLIDE_TRI_CULLING=1 -DUSE_PACKET_FIFO=1
CDEFS += -DGLIDE_CHECK_CONTEXT
# subsystem
CDEFS += -DH3
ifdef H4
CDEFS += -DH4
endif
# debug
ifdef DEBUG
CDEFS += -DGDBG_INFO_ON -DGLIDE_DEBUG -DGLIDE_SANITY_ASSERT -DGLIDE_SANITY_SIZE
endif
# other
CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH
ifeq ($(TEXUS2),1)
CDEFS += -DHAVE_TEXUS2
endif
###############################################################################
# flags
###############################################################################
# linker
LDFLAGS = -nologo -dll -opt:WIN98 -machine:IX86 -nodefaultlib
# assembler
ASFLAGS = -O6 -fwin32 -D__WIN32__ --prefix _
ASFLAGS += $(CDEFS)
# compiler
CFLAGS = -nologo -W3 -WX -D__MSC__=1
LDLIBS = user32.lib kernel32.lib ddraw.lib gdi32.lib dxguid.lib advapi32.lib
ifdef DEBUG
CFLAGS += -MTd -Zi
LDFLAGS += -debugtype:both -debug
LDLIBS += LIBCMTD.lib
OPTFLAGS ?= -Od
else
CFLAGS += -DNDEBUG -MT
LDLIBS += LIBCMT.lib
OPTFLAGS ?= -G6 -O2
endif
CFLAGS += -I. -I../../incsrc -I../../minihwc
CFLAGS += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap
CFLAGS += -I$(FX_GLIDE_SW)/texus2/lib
CFLAGS += $(CDEFS) $(OPTFLAGS)
ifeq ($(USE_3DNOW),1)
CFLAGS += -DGL_AMD3D
override USE_X86 = 1
endif
ifeq ($(USE_X86),1)
CFLAGS += -DGL_X86
else
CFLAGS += -DGLIDE_USE_C_TRISETUP
endif
###############################################################################
# objects
###############################################################################
GLIDE_OBJECTS = \
fifo.obj \
distate.obj \
gstrip.obj \
distrip.obj \
diget.obj \
gsplash.obj \
g3df.obj \
gu.obj \
gpci.obj \
diglide.obj \
disst.obj \
ditex.obj \
gsfc.obj \
gbanner.obj \
gerror.obj \
gaa.obj \
gdraw.obj \
gglide.obj \
glfb.obj \
gsst.obj \
gtex.obj \
gtexdl.obj \
xtexdl_def.obj
ifeq ($(USE_X86),1)
GLIDE_OBJECTS += \
cpuid.obj \
xdraw2_def.obj \
xdraw3_def.obj
ifeq ($(USE_3DNOW),1)
GLIDE_OBJECTS += \
xdraw2_3dnow.obj \
xdraw3_3dnow.obj \
xtexdl_3dnow.obj
endif
else
GLIDE_OBJECTS += \
gxdraw.obj
endif
GLIDE_OBJECTS += \
gthread.obj \
../../minihwc/hwcio.obj \
../../minihwc/gdebug.obj \
../../minihwc/minihwc.obj \
../../minihwc/win_mode.obj
TEXUS_SOURCES = \
$(FX_GLIDE_SW)/texus2/lib/texuslib.c \
$(FX_GLIDE_SW)/texus2/lib/clamp.c \
$(FX_GLIDE_SW)/texus2/lib/read.c \
$(FX_GLIDE_SW)/texus2/lib/resample.c \
$(FX_GLIDE_SW)/texus2/lib/mipmap.c \
$(FX_GLIDE_SW)/texus2/lib/quantize.c \
$(FX_GLIDE_SW)/texus2/lib/ncc.c \
$(FX_GLIDE_SW)/texus2/lib/nccnnet.c \
$(FX_GLIDE_SW)/texus2/lib/pal256.c \
$(FX_GLIDE_SW)/texus2/lib/pal6666.c \
$(FX_GLIDE_SW)/texus2/lib/dequant.c \
$(FX_GLIDE_SW)/texus2/lib/view.c \
$(FX_GLIDE_SW)/texus2/lib/util.c \
$(FX_GLIDE_SW)/texus2/lib/diffuse.c \
$(FX_GLIDE_SW)/texus2/lib/write.c \
$(FX_GLIDE_SW)/texus2/lib/tga.c \
$(FX_GLIDE_SW)/texus2/lib/3df.c \
$(FX_GLIDE_SW)/texus2/lib/ppm.c \
$(FX_GLIDE_SW)/texus2/lib/rgt.c \
$(FX_GLIDE_SW)/texus2/lib/txs.c \
$(FX_GLIDE_SW)/texus2/lib/codec.c \
$(FX_GLIDE_SW)/texus2/lib/eigen.c \
$(FX_GLIDE_SW)/texus2/lib/bitcoder.c
ifeq ($(TEXUS2),1)
GLIDE_OBJECTS += $(TEXUS_SOURCES:.c=.obj)
endif
###############################################################################
# rules
###############################################################################
.c.obj:
$(CC) -Fo$@ $(CFLAGS) -c $<
.rc.res:
$(RC) -Fo$@ $(CDEFS) -I$(FX_GLIDE_SW)/fxmisc $<
###############################################################################
# main
###############################################################################
all: glide3x $(TEXUS_EXEDIR)/$(TEXUS_EXE)
glide3x: $(GLIDE_LIBDIR)/$(GLIDE_DLL)
$(GLIDE_LIBDIR)/$(GLIDE_DLL): $(GLIDE_OBJECTS) $(GLIDE_RES)
$(LD) -out:$@ $(LDFLAGS) $(GLIDE_OBJECTS) $(LDLIBS) $(GLIDE_RES)
$(TEXUS_EXEDIR)/$(TEXUS_EXE): $(FX_GLIDE_SW)/texus2/cmd/cmd.c $(GLIDE_LIBDIR)/$(GLIDE_IMP)
#ifeq ($(TEXUS2),1)
# $(CC) -o $@ $(CFLAGS) $^
#else
# $(warning Texus2 not enabled... Skipping $(TEXUS_EXE))
#endif
###############################################################################
# rules(2)
###############################################################################
cpuid.obj: cpudtect.asm
$(AS) -o $@ $(ASFLAGS) $<
xdraw2_def.obj: xdraw2.asm
$(AS) -o $@ $(ASFLAGS) $<
xdraw3_def.obj: xdraw3.asm
$(AS) -o $@ $(ASFLAGS) $<
xdraw2_3dnow.obj: xdraw2.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xdraw3_3dnow.obj: xdraw3.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xtexdl_3dnow.obj: xtexdl.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
$(GLIDE_OBJECTS): fxinline.h fxgasm.h
fxinline.h: fxgasm.exe
$< -inline > $@
fxgasm.h: fxgasm.exe
$< -hex > $@
fxgasm.exe: fxgasm.c
$(CC) -o $@ $(CFLAGS) $<
###############################################################################
# clean, realclean
###############################################################################
clean:
-$(call UNLINK,*.obj)
-$(call UNLINK,../../minihwc/*.obj)
-$(call UNLINK,fxinline.h)
-$(call UNLINK,fxgasm.h)
-$(call UNLINK,$(FX_GLIDE_SW)/texus2/lib/*.obj)
-$(call UNLINK,$(GLIDE_RES))
realclean: clean
-$(call UNLINK,$(GLIDE_LIBDIR)/glide3x.exp)
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_DLL))
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_IMP))
-$(call UNLINK,$(TEXUS_EXEDIR)/$(TEXUS_EXE))
# Win32 makefile for Glide3/H3 and Texus2, using Visual Studio (cl.exe)
# This makefile MUST be processed by GNU make!!!
#
# Copyright (c) 2004 - Daniel Borca
# Email : dborca@users.sourceforge.net
# Web : http://www.geocities.com/dborca
#
#
# Available options:
#
# Environment variables:
# FX_GLIDE_HW build for the given ASIC (h3).
# default = h3
# H4=1 High speed Avenger.
# default = no
# OPTFLAGS pass given optimization flags to compiler
# default = -G6 -O2 (or -Od if DEBUG=1)
# DEBUG=1 enable debugging checks and messages
# default = no
# USE_X86=1 use assembler triangle specializations!
# default = no
# USE_3DNOW=1 allow 3DNow! specializations. However, the true CPU
# capabilities are still checked at run-time to avoid
# crashes.
# default = no
# TEXUS2=1 embed Texus2 functions into Glide3.
# default = no
#
# Targets:
# all: build everything
# glide3x: build Glide3x lib
# clean: remove object files
# realclean: remove all generated files
#
.PHONY: all glide3x clean realclean
.INTERMEDIATE: fxgasm.exe
.SUFFIXES: .c .obj .rc .res
###############################################################################
# general defines (user settable?)
###############################################################################
GLIDE_RES = glide.res
GLIDE_DLL = glide3x.dll
GLIDE_IMP = glide3x.lib
TEXUS_EXE = texus2.exe
FX_GLIDE_HW ?= h3
FX_GLIDE_SW = ..\..\..\swlibs
GLIDE_LIBDIR = ..\..\lib
TEXUS_EXEDIR = $(FX_GLIDE_SW)\bin
###############################################################################
# tools
###############################################################################
CC = cl
AS = nasm
LD = link
RC = rc
ifeq ($(wildcard $(addsuffix \rm.exe,$(subst ;, ,$(PATH)))),)
UNLINK = del $(subst \,\,$(1))
else
UNLINK = $(RM) $(1)
endif
###############################################################################
# defines
###############################################################################
# platform
CDEFS = -D__WIN32__ -DFX_DLL_ENABLE -DHWC_ACCESS_DDRAW=1 -DHWC_EXT_INIT=1 -DGLIDE_ALT_TAB=1
# general
CDEFS += -DGLIDE3 -DGLIDE3_ALPHA -DGLIDE_HW_TRI_SETUP=1 -DGLIDE_INIT_HWC -DGLIDE_PACKED_RGB=0 -DGLIDE_PACKET3_TRI_SETUP=1 -DGLIDE_TRI_CULLING=1 -DUSE_PACKET_FIFO=1
CDEFS += -DGLIDE_CHECK_CONTEXT
# subsystem
CDEFS += -DH3
ifdef H4
CDEFS += -DH4
endif
# debug
ifdef DEBUG
CDEFS += -DGDBG_INFO_ON -DGLIDE_DEBUG -DGLIDE_SANITY_ASSERT -DGLIDE_SANITY_SIZE
endif
# other
CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH
ifeq ($(TEXUS2),1)
CDEFS += -DHAVE_TEXUS2
endif
###############################################################################
# flags
###############################################################################
# linker
LDFLAGS = -nologo -dll -opt:WIN98 -machine:IX86 -nodefaultlib
# assembler
ASFLAGS = -O6 -fwin32 -D__WIN32__ --prefix _
ASFLAGS += $(CDEFS)
# compiler
CFLAGS = -nologo -W3 -WX -D__MSC__=1
LDLIBS = user32.lib kernel32.lib ddraw.lib gdi32.lib dxguid.lib advapi32.lib
ifdef DEBUG
CFLAGS += -MTd -Zi
LDFLAGS += -debugtype:both -debug
LDLIBS += LIBCMTD.lib
OPTFLAGS ?= -Od
else
CFLAGS += -DNDEBUG -MT
LDLIBS += LIBCMT.lib
OPTFLAGS ?= -G6 -O2
endif
CFLAGS += -I. -I..\..\incsrc -I..\..\minihwc
CFLAGS += -I$(FX_GLIDE_SW)\fxmisc -I$(FX_GLIDE_SW)\newpci\pcilib -I$(FX_GLIDE_SW)\fxmemmap
CFLAGS += -I$(FX_GLIDE_SW)\texus2\lib
CFLAGS += $(CDEFS) $(OPTFLAGS)
ifeq ($(USE_3DNOW),1)
CFLAGS += -DGL_AMD3D
override USE_X86 = 1
endif
ifeq ($(USE_X86),1)
CFLAGS += -DGL_X86
else
CFLAGS += -DGLIDE_USE_C_TRISETUP
endif
###############################################################################
# objects
###############################################################################
GLIDE_OBJECTS = \
fifo.obj \
distate.obj \
gstrip.obj \
distrip.obj \
diget.obj \
gsplash.obj \
g3df.obj \
gu.obj \
gpci.obj \
diglide.obj \
disst.obj \
ditex.obj \
gsfc.obj \
gbanner.obj \
gerror.obj \
gaa.obj \
gdraw.obj \
gglide.obj \
glfb.obj \
gsst.obj \
gtex.obj \
gtexdl.obj \
xtexdl_def.obj
ifeq ($(USE_X86),1)
GLIDE_OBJECTS += \
cpuid.obj \
xdraw2_def.obj \
xdraw3_def.obj
ifeq ($(USE_3DNOW),1)
GLIDE_OBJECTS += \
xdraw2_3dnow.obj \
xdraw3_3dnow.obj \
xtexdl_3dnow.obj
endif
else
GLIDE_OBJECTS += \
gxdraw.obj
endif
GLIDE_OBJECTS += \
gthread.obj \
..\..\minihwc\hwcio.obj \
..\..\minihwc\gdebug.obj \
..\..\minihwc\minihwc.obj \
..\..\minihwc\win_mode.obj
TEXUS_SOURCES = \
$(FX_GLIDE_SW)\texus2\lib\texuslib.c \
$(FX_GLIDE_SW)\texus2\lib\clamp.c \
$(FX_GLIDE_SW)\texus2\lib\read.c \
$(FX_GLIDE_SW)\texus2\lib\resample.c \
$(FX_GLIDE_SW)\texus2\lib\mipmap.c \
$(FX_GLIDE_SW)\texus2\lib\quantize.c \
$(FX_GLIDE_SW)\texus2\lib\ncc.c \
$(FX_GLIDE_SW)\texus2\lib\nccnnet.c \
$(FX_GLIDE_SW)\texus2\lib\pal256.c \
$(FX_GLIDE_SW)\texus2\lib\pal6666.c \
$(FX_GLIDE_SW)\texus2\lib\dequant.c \
$(FX_GLIDE_SW)\texus2\lib\view.c \
$(FX_GLIDE_SW)\texus2\lib\util.c \
$(FX_GLIDE_SW)\texus2\lib\diffuse.c \
$(FX_GLIDE_SW)\texus2\lib\write.c \
$(FX_GLIDE_SW)\texus2\lib\tga.c \
$(FX_GLIDE_SW)\texus2\lib\3df.c \
$(FX_GLIDE_SW)\texus2\lib\ppm.c \
$(FX_GLIDE_SW)\texus2\lib\rgt.c \
$(FX_GLIDE_SW)\texus2\lib\txs.c \
$(FX_GLIDE_SW)\texus2\lib\codec.c \
$(FX_GLIDE_SW)\texus2\lib\eigen.c \
$(FX_GLIDE_SW)\texus2\lib\bitcoder.c
ifeq ($(TEXUS2),1)
GLIDE_OBJECTS += $(TEXUS_SOURCES:.c=.obj)
endif
###############################################################################
# rules
###############################################################################
.c.obj:
$(CC) -Fo$@ $(CFLAGS) -c $<
.rc.res:
$(RC) -Fo$@ $(CDEFS) -I$(FX_GLIDE_SW)\fxmisc $<
###############################################################################
# main
###############################################################################
all: glide3x $(TEXUS_EXEDIR)\$(TEXUS_EXE)
glide3x: $(GLIDE_LIBDIR)\$(GLIDE_DLL)
$(GLIDE_LIBDIR)\$(GLIDE_DLL): $(GLIDE_OBJECTS) $(GLIDE_RES)
$(LD) -out:$@ $(LDFLAGS) $(GLIDE_OBJECTS) $(LDLIBS) $(GLIDE_RES)
$(TEXUS_EXEDIR)\$(TEXUS_EXE): $(FX_GLIDE_SW)\texus2\cmd\cmd.c $(GLIDE_LIBDIR)\$(GLIDE_IMP)
#ifeq ($(TEXUS2),1)
# $(CC) -o $@ $(CFLAGS) $^
#else
# $(warning Texus2 not enabled... Skipping $(TEXUS_EXE))
#endif
###############################################################################
# rules(2)
###############################################################################
cpuid.obj: cpudtect.asm
$(AS) -o $@ $(ASFLAGS) $<
xdraw2_def.obj: xdraw2.asm
$(AS) -o $@ $(ASFLAGS) $<
xdraw3_def.obj: xdraw3.asm
$(AS) -o $@ $(ASFLAGS) $<
xdraw2_3dnow.obj: xdraw2.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xdraw3_3dnow.obj: xdraw3.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xtexdl_3dnow.obj: xtexdl.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
$(GLIDE_OBJECTS): fxinline.h fxgasm.h
fxinline.h: fxgasm.exe
$< -inline > $@
fxgasm.h: fxgasm.exe
$< -hex > $@
fxgasm.exe: fxgasm.c
$(CC) -o $@ $(CFLAGS) $<
###############################################################################
# clean, realclean
###############################################################################
clean:
-$(call UNLINK,*.obj)
-$(call UNLINK,..\..\minihwc\*.obj)
-$(call UNLINK,fxinline.h)
-$(call UNLINK,fxgasm.h)
-$(call UNLINK,$(FX_GLIDE_SW)\texus2\lib\*.obj)
-$(call UNLINK,$(GLIDE_RES))
realclean: clean
-$(call UNLINK,$(GLIDE_LIBDIR)\glide3x.exp)
-$(call UNLINK,$(GLIDE_LIBDIR)\$(GLIDE_DLL))
-$(call UNLINK,$(GLIDE_LIBDIR)\$(GLIDE_IMP))
-$(call UNLINK,$(TEXUS_EXEDIR)\$(TEXUS_EXE))

View File

@@ -1,346 +1,346 @@
# Win32 makefile for Glide3/H5 and Texus2
# This makefile MUST be processed by GNU make!!!
#
# Copyright (c) 2004 - Daniel Borca
# Email : dborca@users.sourceforge.net
# Web : http://www.geocities.com/dborca
#
#
# Available options:
#
# Environment variables:
# FX_GLIDE_HW build for the given ASIC (h5).
# default = h5
# H4=1 High speed Avenger/Napalm.
# default = no
# OPTFLAGS pass given optimization flags to compiler
# default = -G6 -O2 (or -Od if DEBUG=1)
# DEBUG=1 enable debugging checks and messages
# default = no
# USE_X86=1 use assembler triangle specializations!
# default = no
# USE_3DNOW=1 allow 3DNow! specializations. However, the true CPU
# capabilities are still checked at run-time to avoid
# crashes.
# default = no
# USE_MMX=1 (see USE_3DNOW)
# default = no
# USE_SSE=1 (see USE_3DNOW)
# default = no
# USE_SSE2=1 (see USE_3DNOW)
# default = no
# TEXUS2=1 embed Texus2 functions into Glide3.
# default = no
#
# Targets:
# all: build everything
# glide3x: build Glide3x lib
# clean: remove object files
# realclean: remove all generated files
#
.PHONY: all glide3x clean realclean
.INTERMEDIATE: fxgasm.exe gendate.exe fxbldno.exe
.SUFFIXES: .c .obj .rc .res
###############################################################################
# general defines (user settable?)
###############################################################################
GLIDE_RES = glide.res
GLIDE_DLL = glide3x.dll
GLIDE_IMP = glide3x.lib
TEXUS_EXE = texus2.exe
FX_GLIDE_HW ?= h5
FX_GLIDE_SW = ../../../swlibs
GLIDE_LIBDIR = ../../lib
TEXUS_EXEDIR = $(FX_GLIDE_SW)/bin
###############################################################################
# tools
###############################################################################
CC = cl
AS = nasm
LD = link
RC = rc
ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
UNLINK = del $(subst /,\,$(1))
else
UNLINK = $(RM) $(1)
endif
###############################################################################
# defines
###############################################################################
# platform
CDEFS = -D__WIN32__ -DFX_DLL_ENABLE -DHWC_ACCESS_DDRAW=1 -DHWC_EXT_INIT=1 -DGLIDE_ALT_TAB=1
CDEFS += -DBETA=1 -DHWC_MINIVDD_HACK=1 -DWIN40COMPAT=1 -DWINXP_ALT_TAB_FIX=1 -DWINXP_SAFER_ALT_TAB_FIX=1 -DNEED_MSGFILE_ASSIGN
# general
CDEFS += -DGLIDE3 -DGLIDE3_ALPHA -DGLIDE_HW_TRI_SETUP=1 -DGLIDE_INIT_HWC -DGLIDE_PACKED_RGB=0 -DGLIDE_PACKET3_TRI_SETUP=1 -DGLIDE_TRI_CULLING=1 -DUSE_PACKET_FIFO=1
CDEFS += -DGLIDE_CHECK_CONTEXT
# subsystem
CDEFS += -DH3
ifdef H4
CDEFS += -DH4
endif
CDEFS += -DFX_GLIDE_H5_CSIM=1 -DFX_GLIDE_NAPALM=1
# debug
ifdef DEBUG
CDEFS += -DGDBG_INFO_ON -DGLIDE_DEBUG -DGLIDE_SANITY_ASSERT -DGLIDE_SANITY_SIZE
endif
# other
CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH
ifeq ($(TEXUS2),1)
CDEFS += -DHAVE_TEXUS2
endif
###############################################################################
# flags
###############################################################################
# linker
LDFLAGS = -nologo -dll -opt:WIN98 -machine:IX86 -nodefaultlib
# assembler
ASFLAGS = -O6 -fwin32 -D__WIN32__ --prefix _
ASFLAGS += $(CDEFS)
# compiler
CFLAGS = -nologo -W3 -WX -D__MSC__=1
LDLIBS = user32.lib kernel32.lib ddraw.lib gdi32.lib dxguid.lib advapi32.lib
ifdef DEBUG
CFLAGS += -MTd -Zi
LDFLAGS += -debugtype:both -debug
LDLIBS += LIBCMTD.lib
OPTFLAGS ?= -Od
else
CFLAGS += -DNDEBUG -MT
LDLIBS += LIBCMT.lib
OPTFLAGS ?= -G6 -O2
endif
CFLAGS += -I. -I../../incsrc -I../../minihwc
CFLAGS += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap
CFLAGS += -I$(FX_GLIDE_SW)/texus2/lib
CFLAGS += $(CDEFS) $(OPTFLAGS)
ifeq ($(USE_3DNOW),1)
CFLAGS += -DGL_AMD3D
override USE_X86 = 1
endif
ifeq ($(USE_MMX),1)
CFLAGS += -DGL_MMX
override USE_X86 = 1
endif
ifeq ($(USE_SSE),1)
CFLAGS += -DGL_SSE
override USE_X86 = 1
endif
ifeq ($(USE_SSE2),1)
CFLAGS += -DGL_SSE2
override USE_X86 = 1
endif
ifeq ($(USE_X86),1)
CFLAGS += -DGL_X86
else
CFLAGS += -DGLIDE_USE_C_TRISETUP
endif
###############################################################################
# objects
###############################################################################
GLIDE_OBJECTS = \
fifo.obj \
distate.obj \
gstrip.obj \
distrip.obj \
diget.obj \
gsplash.obj \
g3df.obj \
gu.obj \
gpci.obj \
diglide.obj \
disst.obj \
ditex.obj \
gsfc.obj \
gbanner.obj \
gerror.obj \
gaa.obj \
gdraw.obj \
gglide.obj \
glfb.obj \
gsst.obj \
gtex.obj \
gtexdl.obj \
xtexdl_def.obj
ifeq ($(USE_X86),1)
GLIDE_OBJECTS += \
cpuid.obj \
xdraw2_def.obj \
xdraw3_def.obj
ifeq ($(USE_3DNOW),1)
GLIDE_OBJECTS += \
xdraw2_3dnow.obj \
xdraw3_3dnow.obj \
xtexdl_3dnow.obj
endif
ifeq ($(USE_MMX),1)
GLIDE_OBJECTS += \
xtexdl_mmx.obj
endif
ifeq ($(USE_SSE),1)
GLIDE_OBJECTS += \
xdraw2_sse.obj \
xdraw3_sse.obj
endif
ifeq ($(USE_SSE2),1)
GLIDE_OBJECTS += \
xtexdl_sse2.obj
endif
else
GLIDE_OBJECTS += \
gxdraw.obj
endif
GLIDE_OBJECTS += \
gthread.obj \
winsurf.obj \
../../minihwc/hwcio.obj \
../../minihwc/gdebug.obj \
../../minihwc/minihwc.obj \
../../minihwc/win_mode.obj
TEXUS_SOURCES = \
$(FX_GLIDE_SW)/texus2/lib/texuslib.c \
$(FX_GLIDE_SW)/texus2/lib/clamp.c \
$(FX_GLIDE_SW)/texus2/lib/read.c \
$(FX_GLIDE_SW)/texus2/lib/resample.c \
$(FX_GLIDE_SW)/texus2/lib/mipmap.c \
$(FX_GLIDE_SW)/texus2/lib/quantize.c \
$(FX_GLIDE_SW)/texus2/lib/ncc.c \
$(FX_GLIDE_SW)/texus2/lib/nccnnet.c \
$(FX_GLIDE_SW)/texus2/lib/pal256.c \
$(FX_GLIDE_SW)/texus2/lib/pal6666.c \
$(FX_GLIDE_SW)/texus2/lib/dequant.c \
$(FX_GLIDE_SW)/texus2/lib/view.c \
$(FX_GLIDE_SW)/texus2/lib/util.c \
$(FX_GLIDE_SW)/texus2/lib/diffuse.c \
$(FX_GLIDE_SW)/texus2/lib/write.c \
$(FX_GLIDE_SW)/texus2/lib/tga.c \
$(FX_GLIDE_SW)/texus2/lib/3df.c \
$(FX_GLIDE_SW)/texus2/lib/ppm.c \
$(FX_GLIDE_SW)/texus2/lib/rgt.c \
$(FX_GLIDE_SW)/texus2/lib/txs.c \
$(FX_GLIDE_SW)/texus2/lib/codec.c \
$(FX_GLIDE_SW)/texus2/lib/eigen.c \
$(FX_GLIDE_SW)/texus2/lib/bitcoder.c
ifeq ($(TEXUS2),1)
GLIDE_OBJECTS += $(TEXUS_SOURCES:.c=.obj)
endif
###############################################################################
# rules
###############################################################################
.c.obj:
$(CC) -Fo$@ $(CFLAGS) -c $<
.rc.res:
$(RC) -Fo$@ $(CDEFS) -I$(FX_GLIDE_SW)/fxmisc $<
###############################################################################
# main
###############################################################################
all: glide3x $(TEXUS_EXEDIR)/$(TEXUS_EXE)
glide3x: $(GLIDE_LIBDIR)/$(GLIDE_DLL)
$(GLIDE_LIBDIR)/$(GLIDE_DLL): $(GLIDE_OBJECTS) $(GLIDE_RES)
$(LD) -out:$@ $(LDFLAGS) $(GLIDE_OBJECTS) $(LDLIBS) $(GLIDE_RES)
$(TEXUS_EXEDIR)/$(TEXUS_EXE): $(FX_GLIDE_SW)/texus2/cmd/cmd.c $(GLIDE_LIBDIR)/$(GLIDE_IMP)
#ifeq ($(TEXUS2),1)
# $(CC) -o $@ $(CFLAGS) $^
#else
# $(warning Texus2 not enabled... Skipping $(TEXUS_EXE))
#endif
###############################################################################
# rules(2)
###############################################################################
xdraw2_def.obj: xdraw2.asm
$(AS) -o $@ $(ASFLAGS) $<
xdraw3_def.obj: xdraw3.asm
$(AS) -o $@ $(ASFLAGS) $<
xdraw2_3dnow.obj: xdraw2.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xdraw3_3dnow.obj: xdraw3.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xtexdl_3dnow.obj: xtexdl.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xtexdl_mmx.obj: xtexdl.asm
$(AS) -o $@ $(ASFLAGS) -DGL_MMX=1 $<
xdraw2_sse.obj: xdraw2.asm
$(AS) -o $@ $(ASFLAGS) -DGL_SSE=1 $<
xdraw3_sse.obj: xdraw3.asm
$(AS) -o $@ $(ASFLAGS) -DGL_SSE=1 $<
xtexdl_sse2.obj: xtexdl.asm
$(AS) -o $@ $(ASFLAGS) -DGL_SSE2=1 $<
$(GLIDE_OBJECTS): fxinline.h fxgasm.h fxbldno.h
fxinline.h: fxgasm.exe
./$< -inline > $@
fxgasm.h: fxgasm.exe
./$< -hex > $@
fxgasm.exe: fxgasm.c ../../incsrc/gendate.h
$(CC) -o $@ $(CFLAGS) $<
../../incsrc/gendate.h: gendate.exe
./$< > $@
fxbldno.h: fxbldno.exe
./$< > $@
gendate.exe: ../../incsrc/gendate.c
$(CC) -o $@ $(CFLAGS) $<
fxbldno.exe: fxbldno.c
$(CC) -o $@ $(CFLAGS) $<
###############################################################################
# clean, realclean
###############################################################################
clean:
-$(call UNLINK,*.obj)
-$(call UNLINK,../../minihwc/*.obj)
-$(call UNLINK,fxinline.h)
-$(call UNLINK,fxgasm.h)
-$(call UNLINK,../../incsrc/gendate.h)
-$(call UNLINK,fxbldno.h)
-$(call UNLINK,$(FX_GLIDE_SW)/texus2/lib/*.obj)
-$(call UNLINK,$(GLIDE_RES))
realclean: clean
-$(call UNLINK,$(GLIDE_LIBDIR)/glide3x.exp)
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_DLL))
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_IMP))
-$(call UNLINK,$(TEXUS_EXEDIR)/$(TEXUS_EXE))
# Win32 makefile for Glide3/H5 and Texus2, using Visual Studio (cl.exe)
# This makefile MUST be processed by GNU make!!!
#
# Copyright (c) 2004 - Daniel Borca
# Email : dborca@users.sourceforge.net
# Web : http://www.geocities.com/dborca
#
#
# Available options:
#
# Environment variables:
# FX_GLIDE_HW build for the given ASIC (h5).
# default = h5
# H4=1 High speed Avenger/Napalm.
# default = no
# OPTFLAGS pass given optimization flags to compiler
# default = -G6 -O2 (or -Od if DEBUG=1)
# DEBUG=1 enable debugging checks and messages
# default = no
# USE_X86=1 use assembler triangle specializations!
# default = no
# USE_3DNOW=1 allow 3DNow! specializations. However, the true CPU
# capabilities are still checked at run-time to avoid
# crashes.
# default = no
# USE_MMX=1 (see USE_3DNOW)
# default = no
# USE_SSE=1 (see USE_3DNOW)
# default = no
# USE_SSE2=1 (see USE_3DNOW)
# default = no
# TEXUS2=1 embed Texus2 functions into Glide3.
# default = no
#
# Targets:
# all: build everything
# glide3x: build Glide3x lib
# clean: remove object files
# realclean: remove all generated files
#
.PHONY: all glide3x clean realclean
.INTERMEDIATE: fxgasm.exe gendate.exe fxbldno.exe
.SUFFIXES: .c .obj .rc .res
###############################################################################
# general defines (user settable?)
###############################################################################
GLIDE_RES = glide.res
GLIDE_DLL = glide3x.dll
GLIDE_IMP = glide3x.lib
TEXUS_EXE = texus2.exe
FX_GLIDE_HW ?= h5
FX_GLIDE_SW = ..\..\..\swlibs
GLIDE_LIBDIR = ..\..\lib
TEXUS_EXEDIR = $(FX_GLIDE_SW)\bin
###############################################################################
# tools
###############################################################################
CC = cl
AS = nasm
LD = link
RC = rc
ifeq ($(wildcard $(addsuffix \rm.exe,$(subst ;, ,$(PATH)))),)
UNLINK = del $(subst \,\,$(1))
else
UNLINK = $(RM) $(1)
endif
###############################################################################
# defines
###############################################################################
# platform
CDEFS = -D__WIN32__ -DFX_DLL_ENABLE -DHWC_ACCESS_DDRAW=1 -DHWC_EXT_INIT=1 -DGLIDE_ALT_TAB=1
CDEFS += -DBETA=1 -DHWC_MINIVDD_HACK=1 -DWIN40COMPAT=1 -DWINXP_ALT_TAB_FIX=1 -DWINXP_SAFER_ALT_TAB_FIX=1 -DNEED_MSGFILE_ASSIGN
# general
CDEFS += -DGLIDE3 -DGLIDE3_ALPHA -DGLIDE_HW_TRI_SETUP=1 -DGLIDE_INIT_HWC -DGLIDE_PACKED_RGB=0 -DGLIDE_PACKET3_TRI_SETUP=1 -DGLIDE_TRI_CULLING=1 -DUSE_PACKET_FIFO=1
CDEFS += -DGLIDE_CHECK_CONTEXT
# subsystem
CDEFS += -DH3
ifdef H4
CDEFS += -DH4
endif
CDEFS += -DFX_GLIDE_H5_CSIM=1 -DFX_GLIDE_NAPALM=1
# debug
ifdef DEBUG
CDEFS += -DGDBG_INFO_ON -DGLIDE_DEBUG -DGLIDE_SANITY_ASSERT -DGLIDE_SANITY_SIZE
endif
# other
CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH
ifeq ($(TEXUS2),1)
CDEFS += -DHAVE_TEXUS2
endif
###############################################################################
# flags
###############################################################################
# linker
LDFLAGS = -nologo -dll -opt:WIN98 -machine:IX86 -nodefaultlib
# assembler
ASFLAGS = -O6 -fwin32 -D__WIN32__ --prefix _
ASFLAGS += $(CDEFS)
# compiler
CFLAGS = -nologo -W3 -WX -D__MSC__=1
LDLIBS = user32.lib kernel32.lib ddraw.lib gdi32.lib dxguid.lib advapi32.lib
ifdef DEBUG
CFLAGS += -MTd -Zi
LDFLAGS += -debugtype:both -debug
LDLIBS += LIBCMTD.lib
OPTFLAGS ?= -Od
else
CFLAGS += -DNDEBUG -MT
LDLIBS += LIBCMT.lib
OPTFLAGS ?= -G6 -O2
endif
CFLAGS += -I. -I..\..\incsrc -I..\..\minihwc
CFLAGS += -I$(FX_GLIDE_SW)\fxmisc -I$(FX_GLIDE_SW)\newpci\pcilib -I$(FX_GLIDE_SW)\fxmemmap
CFLAGS += -I$(FX_GLIDE_SW)\texus2\lib
CFLAGS += $(CDEFS) $(OPTFLAGS)
ifeq ($(USE_3DNOW),1)
CFLAGS += -DGL_AMD3D
override USE_X86 = 1
endif
ifeq ($(USE_MMX),1)
CFLAGS += -DGL_MMX
override USE_X86 = 1
endif
ifeq ($(USE_SSE),1)
CFLAGS += -DGL_SSE
override USE_X86 = 1
endif
ifeq ($(USE_SSE2),1)
CFLAGS += -DGL_SSE2
override USE_X86 = 1
endif
ifeq ($(USE_X86),1)
CFLAGS += -DGL_X86
else
CFLAGS += -DGLIDE_USE_C_TRISETUP
endif
###############################################################################
# objects
###############################################################################
GLIDE_OBJECTS = \
fifo.obj \
distate.obj \
gstrip.obj \
distrip.obj \
diget.obj \
gsplash.obj \
g3df.obj \
gu.obj \
gpci.obj \
diglide.obj \
disst.obj \
ditex.obj \
gsfc.obj \
gbanner.obj \
gerror.obj \
gaa.obj \
gdraw.obj \
gglide.obj \
glfb.obj \
gsst.obj \
gtex.obj \
gtexdl.obj \
xtexdl_def.obj
ifeq ($(USE_X86),1)
GLIDE_OBJECTS += \
cpuid.obj \
xdraw2_def.obj \
xdraw3_def.obj
ifeq ($(USE_3DNOW),1)
GLIDE_OBJECTS += \
xdraw2_3dnow.obj \
xdraw3_3dnow.obj \
xtexdl_3dnow.obj
endif
ifeq ($(USE_MMX),1)
GLIDE_OBJECTS += \
xtexdl_mmx.obj
endif
ifeq ($(USE_SSE),1)
GLIDE_OBJECTS += \
xdraw2_sse.obj \
xdraw3_sse.obj
endif
ifeq ($(USE_SSE2),1)
GLIDE_OBJECTS += \
xtexdl_sse2.obj
endif
else
GLIDE_OBJECTS += \
gxdraw.obj
endif
GLIDE_OBJECTS += \
gthread.obj \
winsurf.obj \
..\..\minihwc\hwcio.obj \
..\..\minihwc\gdebug.obj \
..\..\minihwc\minihwc.obj \
..\..\minihwc\win_mode.obj
TEXUS_SOURCES = \
$(FX_GLIDE_SW)\texus2\lib\texuslib.c \
$(FX_GLIDE_SW)\texus2\lib\clamp.c \
$(FX_GLIDE_SW)\texus2\lib\read.c \
$(FX_GLIDE_SW)\texus2\lib\resample.c \
$(FX_GLIDE_SW)\texus2\lib\mipmap.c \
$(FX_GLIDE_SW)\texus2\lib\quantize.c \
$(FX_GLIDE_SW)\texus2\lib\ncc.c \
$(FX_GLIDE_SW)\texus2\lib\nccnnet.c \
$(FX_GLIDE_SW)\texus2\lib\pal256.c \
$(FX_GLIDE_SW)\texus2\lib\pal6666.c \
$(FX_GLIDE_SW)\texus2\lib\dequant.c \
$(FX_GLIDE_SW)\texus2\lib\view.c \
$(FX_GLIDE_SW)\texus2\lib\util.c \
$(FX_GLIDE_SW)\texus2\lib\diffuse.c \
$(FX_GLIDE_SW)\texus2\lib\write.c \
$(FX_GLIDE_SW)\texus2\lib\tga.c \
$(FX_GLIDE_SW)\texus2\lib\3df.c \
$(FX_GLIDE_SW)\texus2\lib\ppm.c \
$(FX_GLIDE_SW)\texus2\lib\rgt.c \
$(FX_GLIDE_SW)\texus2\lib\txs.c \
$(FX_GLIDE_SW)\texus2\lib\codec.c \
$(FX_GLIDE_SW)\texus2\lib\eigen.c \
$(FX_GLIDE_SW)\texus2\lib\bitcoder.c
ifeq ($(TEXUS2),1)
GLIDE_OBJECTS += $(TEXUS_SOURCES:.c=.obj)
endif
###############################################################################
# rules
###############################################################################
.c.obj:
$(CC) -Fo$@ $(CFLAGS) -c $<
.rc.res:
$(RC) -Fo$@ $(CDEFS) -I$(FX_GLIDE_SW)\fxmisc $<
###############################################################################
# main
###############################################################################
all: glide3x $(TEXUS_EXEDIR)\$(TEXUS_EXE)
glide3x: $(GLIDE_LIBDIR)\$(GLIDE_DLL)
$(GLIDE_LIBDIR)\$(GLIDE_DLL): $(GLIDE_OBJECTS) $(GLIDE_RES)
$(LD) -out:$@ $(LDFLAGS) $(GLIDE_OBJECTS) $(LDLIBS) $(GLIDE_RES)
$(TEXUS_EXEDIR)\$(TEXUS_EXE): $(FX_GLIDE_SW)\texus2\cmd\cmd.c $(GLIDE_LIBDIR)\$(GLIDE_IMP)
#ifeq ($(TEXUS2),1)
# $(CC) -o $@ $(CFLAGS) $^
#else
# $(warning Texus2 not enabled... Skipping $(TEXUS_EXE))
#endif
###############################################################################
# rules(2)
###############################################################################
xdraw2_def.obj: xdraw2.asm
$(AS) -o $@ $(ASFLAGS) $<
xdraw3_def.obj: xdraw3.asm
$(AS) -o $@ $(ASFLAGS) $<
xdraw2_3dnow.obj: xdraw2.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xdraw3_3dnow.obj: xdraw3.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xtexdl_3dnow.obj: xtexdl.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xtexdl_mmx.obj: xtexdl.asm
$(AS) -o $@ $(ASFLAGS) -DGL_MMX=1 $<
xdraw2_sse.obj: xdraw2.asm
$(AS) -o $@ $(ASFLAGS) -DGL_SSE=1 $<
xdraw3_sse.obj: xdraw3.asm
$(AS) -o $@ $(ASFLAGS) -DGL_SSE=1 $<
xtexdl_sse2.obj: xtexdl.asm
$(AS) -o $@ $(ASFLAGS) -DGL_SSE2=1 $<
$(GLIDE_OBJECTS): fxinline.h fxgasm.h fxbldno.h
fxinline.h: fxgasm.exe
.\$< -inline > $@
fxgasm.h: fxgasm.exe
.\$< -hex > $@
fxgasm.exe: fxgasm.c ..\..\incsrc\gendate.h
$(CC) -o $@ $(CFLAGS) $<
..\..\incsrc\gendate.h: gendate.exe
.\$< > $@
fxbldno.h: fxbldno.exe
.\$< > $@
gendate.exe: ..\..\incsrc\gendate.c
$(CC) -o $@ $(CFLAGS) $<
fxbldno.exe: fxbldno.c
$(CC) -o $@ $(CFLAGS) $<
###############################################################################
# clean, realclean
###############################################################################
clean:
-$(call UNLINK,*.obj)
-$(call UNLINK,..\..\minihwc\*.obj)
-$(call UNLINK,fxinline.h)
-$(call UNLINK,fxgasm.h)
-$(call UNLINK,..\..\incsrc\gendate.h)
-$(call UNLINK,fxbldno.h)
-$(call UNLINK,$(FX_GLIDE_SW)\texus2\lib\*.obj)
-$(call UNLINK,$(GLIDE_RES))
realclean: clean
-$(call UNLINK,$(GLIDE_LIBDIR)\glide3x.exp)
-$(call UNLINK,$(GLIDE_LIBDIR)\$(GLIDE_DLL))
-$(call UNLINK,$(GLIDE_LIBDIR)\$(GLIDE_IMP))
-$(call UNLINK,$(TEXUS_EXEDIR)\$(TEXUS_EXE))

View File

@@ -1,331 +1,332 @@
# Win32 makefile for Glide3/SST1 and Texus2
# This makefile MUST be processed by GNU make!!!
#
# Copyright (c) 2004 - Daniel Borca
# Email : dborca@users.sourceforge.net
# Web : http://www.geocities.com/dborca
#
#
# Available options:
#
# Environment variables:
# FX_GLIDE_HW build for the given ASIC (sst1, sst96).
# default = sst1
# OPTFLAGS pass given optimization flags to compiler
# default = -G6 -O2 (or -Od if DEBUG=1)
# DEBUG=1 enable debugging checks and messages
# default = no
# USE_X86=1 use assembler triangle specializations!
# default = no
# TEXUS2=1 embed Texus2 functions into Glide3.
# default = no
#
# Targets:
# all: build everything
# glide3x: build Glide3x lib
# clean: remove object files
# realclean: remove all generated files
#
.PHONY: all glide3x clean realclean
.INTERMEDIATE: fxgasm.exe
.SUFFIXES: .c .obj .rc .res
###############################################################################
# general defines (user settable?)
###############################################################################
GLIDE_RES = glide.res
GLIDE_DLL = glide3x.dll
GLIDE_IMP = glide3x.lib
TEXUS_EXE = texus2.exe
FX_GLIDE_HW ?= sst1
FX_GLIDE_SW = ../../../swlibs
GLIDE_LIBDIR = ../../lib
TEXUS_EXEDIR = $(FX_GLIDE_SW)/bin
###############################################################################
# tools
###############################################################################
CC = cl
AS = nasm
LD = link
RC = rc
ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
UNLINK = del $(subst /,\,$(1))
else
UNLINK = $(RM) $(1)
endif
###############################################################################
# defines
###############################################################################
# platform
CDEFS = -D__WIN32__ -DDIRECTX -DFX_DLL_ENABLE -DINIT_ACCESS_DDRAW
# general
CDEFS += -DGLIDE3 -DGLIDE3_ALPHA -DGLIDE_HARDWARE
# subsystem
ifeq ($(FX_GLIDE_HW),sst1)
CDEFS += -DSST1
else
ifeq ($(FX_GLIDE_HW),sst96)
CDEFS += -DSST96
CDEFS += -DSST96_FIFO
#CDEFS += -DSST96_ALT_FIFO_WRAP
#CDEFS += -DINIT96VGASWAP
#CDEFS += -DINIT_ACCESS_DIRECT
CDEFS += -DGLIDE_USE_ALT_REGMAP
endif
endif
# debug
ifdef DEBUG
CDEFS += -DGDBG_INFO_ON -DGLIDE_DEBUG -DGLIDE_SANITY_ASSERT -DGLIDE_SANITY_SIZE
endif
# other
CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH
ifeq ($(TEXUS2),1)
CDEFS += -DHAVE_TEXUS2
endif
###############################################################################
# flags
###############################################################################
# linker
LDFLAGS = -nologo -dll -opt:WIN98 -machine:IX86 -nodefaultlib
# assembler
ASFLAGS = -O6 -fwin32 -D__WIN32__ --prefix _
ASFLAGS += $(CDEFS)
# compiler
CFLAGS = -nologo -W3 -WX -D__MSC__=1
LDLIBS = user32.lib kernel32.lib
ifdef DEBUG
CFLAGS += -MTd -Zi
LDFLAGS += -debugtype:both -debug
LDLIBS += LIBCMTD.lib
OPTFLAGS ?= -Od
else
CFLAGS += -DNDEBUG -MT
LDLIBS += LIBCMT.lib
OPTFLAGS ?= -G6 -O2
endif
ifeq ($(FX_GLIDE_HW),sst96)
LDLIBS += gdi32.lib ddraw.lib dxguid.lib oldnames.lib
endif
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
CFLAGS += $(CDEFS) $(OPTFLAGS)
ifeq ($(USE_X86),1)
CFLAGS += -DGL_X86
else
CFLAGS += -DGLIDE_USE_C_TRISETUP
endif
###############################################################################
# objects
###############################################################################
GLIDE_OBJECTS = \
distate.obj \
diget.obj \
gstrip.obj \
distrip.obj \
diglide.obj \
disst.obj \
ditex.obj \
g3df.obj \
gaa.obj \
gbanner.obj \
gdraw.obj \
gerror.obj \
gglide.obj \
glfb.obj \
gpci.obj \
gsplash.obj \
gsst.obj \
gtex.obj \
gtexdl.obj \
gu.obj \
gxdraw.obj
ifeq ($(USE_X86),1)
GLIDE_OBJECTS += \
cpuid.obj
ifeq ($(FX_GLIDE_HW),sst1)
GLIDE_OBJECTS += \
xdraw.obj
else
GLIDE_OBJECTS += \
xdraw96.obj
endif
else
GLIDE_OBJECTS += \
gxdraw.obj
endif
ifeq ($(FX_GLIDE_HW),sst96)
GLIDE_OBJECTS += \
sst96.obj \
../../init/init96/init96.obj \
../../init/init96/dxdrvr.obj \
../../init/init96/initat3d.obj \
../../init/init96/initmcrx.obj
endif
GLIDE_OBJECTS += \
../../init/init.obj \
../../init/vgdrvr.obj \
../../init/vg96drvr.obj \
../../init/initvg/gamma.obj \
../../init/initvg/dac.obj \
../../init/initvg/video.obj \
../../init/initvg/parse.obj \
../../init/initvg/sli.obj \
../../init/initvg/util.obj \
../../init/initvg/info.obj \
../../init/initvg/print.obj \
../../init/initvg/gdebug.obj \
../../init/initvg/sst1init.obj \
$(FX_GLIDE_SW)/newpci/pcilib/sst1_pci.obj \
$(FX_GLIDE_SW)/newpci/pcilib/fxmsr.obj \
$(FX_GLIDE_SW)/newpci/pcilib/fxpci.obj \
$(FX_GLIDE_SW)/newpci/pcilib/fxw32.obj \
$(FX_GLIDE_SW)/newpci/pcilib/fxvxd.obj \
$(FX_GLIDE_SW)/newpci/pcilib/fxnt.obj \
TEXUS_SOURCES = \
$(FX_GLIDE_SW)/texus2/lib/texuslib.c \
$(FX_GLIDE_SW)/texus2/lib/clamp.c \
$(FX_GLIDE_SW)/texus2/lib/read.c \
$(FX_GLIDE_SW)/texus2/lib/resample.c \
$(FX_GLIDE_SW)/texus2/lib/mipmap.c \
$(FX_GLIDE_SW)/texus2/lib/quantize.c \
$(FX_GLIDE_SW)/texus2/lib/ncc.c \
$(FX_GLIDE_SW)/texus2/lib/nccnnet.c \
$(FX_GLIDE_SW)/texus2/lib/pal256.c \
$(FX_GLIDE_SW)/texus2/lib/pal6666.c \
$(FX_GLIDE_SW)/texus2/lib/dequant.c \
$(FX_GLIDE_SW)/texus2/lib/view.c \
$(FX_GLIDE_SW)/texus2/lib/util.c \
$(FX_GLIDE_SW)/texus2/lib/diffuse.c \
$(FX_GLIDE_SW)/texus2/lib/write.c \
$(FX_GLIDE_SW)/texus2/lib/tga.c \
$(FX_GLIDE_SW)/texus2/lib/3df.c \
$(FX_GLIDE_SW)/texus2/lib/ppm.c \
$(FX_GLIDE_SW)/texus2/lib/rgt.c \
$(FX_GLIDE_SW)/texus2/lib/txs.c \
$(FX_GLIDE_SW)/texus2/lib/codec.c \
$(FX_GLIDE_SW)/texus2/lib/eigen.c \
$(FX_GLIDE_SW)/texus2/lib/bitcoder.c
ifeq ($(TEXUS2),1)
GLIDE_OBJECTS += $(TEXUS_SOURCES:.c=.obj)
endif
###############################################################################
# rules
###############################################################################
.c.obj:
$(CC) -Fo$@ $(CFLAGS) -c $<
.rc.res:
$(RC) -Fo$@ $(CDEFS) -I$(FX_GLIDE_SW)/fxmisc $<
###############################################################################
# main
###############################################################################
all: glide3x $(TEXUS_EXEDIR)/$(TEXUS_EXE)
glide3x: $(GLIDE_LIBDIR)/$(GLIDE_DLL)
$(GLIDE_LIBDIR)/$(GLIDE_DLL): $(GLIDE_OBJECTS) $(GLIDE_RES)
$(LD) -out:$@ $(LDFLAGS) $(GLIDE_OBJECTS) $(LDLIBS) $(GLIDE_RES)
$(TEXUS_EXEDIR)/$(TEXUS_EXE): $(FX_GLIDE_SW)/texus2/cmd/cmd.c $(GLIDE_LIBDIR)/$(GLIDE_IMP)
#ifeq ($(TEXUS2),1)
# $(CC) -o $@ $(CFLAGS) $^
#else
# $(warning Texus2 not enabled... Skipping $(TEXUS_EXE))
#endif
###############################################################################
# rules(2)
###############################################################################
cpuid.obj: cpudtect.asm
$(AS) -o $@ $(ASFLAGS) $<
xdraw.obj: xdraw.asm
$(AS) -o $@ $(ASFLAGS) $<
xdraw96.obj: xdraw96.asm
$(AS) -o $@ $(ASFLAGS) $<
ifeq ($(FX_GLIDE_HW),sst96)
../../init/initvg/gamma.obj: ../../init/initvg/gamma.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
../../init/initvg/dac.obj: ../../init/initvg/dac.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
../../init/initvg/video.obj: ../../init/initvg/video.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
../../init/initvg/parse.obj: ../../init/initvg/parse.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
../../init/initvg/sli.obj: ../../init/initvg/sli.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
../../init/initvg/util.obj: ../../init/initvg/util.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
../../init/initvg/info.obj: ../../init/initvg/info.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
../../init/initvg/print.obj: ../../init/initvg/print.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
../../init/initvg/gdebug.obj: ../../init/initvg/gdebug.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
../../init/initvg/sst1init.obj: ../../init/initvg/sst1init.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
endif
$(GLIDE_OBJECTS): fxinline.h fxgasm.h
fxinline.h: fxgasm.exe
./$< -inline > $@
fxgasm.h: fxgasm.exe
./$< -hex > $@
fxgasm.exe: fxgasm.c
$(CC) -o $@ $(CFLAGS) $<
###############################################################################
# clean, realclean
###############################################################################
clean:
-$(call UNLINK,*.obj)
-$(call UNLINK,../../init/*.obj)
-$(call UNLINK,../../init/initvg/*.obj)
-$(call UNLINK,../../init/init96/*.obj)
-$(call UNLINK,$(FX_GLIDE_SW)/newpci/pcilib/*.obj)
-$(call UNLINK,fxinline.h)
-$(call UNLINK,fxgasm.h)
-$(call UNLINK,$(FX_GLIDE_SW)/texus2/lib/*.obj)
-$(call UNLINK,$(GLIDE_RES))
realclean: clean
-$(call UNLINK,$(GLIDE_LIBDIR)/glide3x.exp)
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_DLL))
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_IMP))
-$(call UNLINK,$(TEXUS_EXEDIR)/$(TEXUS_EXE))
# Win32 makefile for Glide3/SST1 and Texus2, using Visual Studio (cl.exe)
# This makefile MUST be processed by GNU make!!!
#
# Copyright (c) 2004 - Daniel Borca
# Email : dborca@users.sourceforge.net
# Web : http://www.geocities.com/dborca
#
#
# Available options:
#
# Environment variables:
# FX_GLIDE_HW build for the given ASIC (sst1, sst96).
# default = sst1
# OPTFLAGS pass given optimization flags to compiler
# default = -G6 -O2 (or -Od if DEBUG=1)
# DEBUG=1 enable debugging checks and messages
# default = no
# USE_X86=1 use assembler triangle specializations!
# default = no
# TEXUS2=1 embed Texus2 functions into Glide3.
# default = no
#
# Targets:
# all: build everything
# glide3x: build Glide3x lib
# clean: remove object files
# realclean: remove all generated files
#
.PHONY: all glide3x clean realclean
.INTERMEDIATE: fxgasm.exe
.SUFFIXES: .c .obj .rc .res
###############################################################################
# general defines (user settable?)
###############################################################################
GLIDE_RES = glide.res
GLIDE_DLL = glide3x.dll
GLIDE_IMP = glide3x.lib
TEXUS_EXE = texus2.exe
FX_GLIDE_HW ?= sst1
FX_GLIDE_SW = ..\..\..\swlibs
GLIDE_LIBDIR = ..\..\lib
TEXUS_EXEDIR = $(FX_GLIDE_SW)\bin
###############################################################################
# tools
###############################################################################
CC = cl
AS = nasm
LD = link
RC = rc
ifeq ($(wildcard $(addsuffix \rm.exe,$(subst ;, ,$(PATH)))),)
UNLINK = del $(subst \,\,$(1))
else
UNLINK = $(RM) $(1)
endif
###############################################################################
# defines
###############################################################################
# platform
CDEFS = -D__WIN32__ -DDIRECTX -DFX_DLL_ENABLE -DINIT_ACCESS_DDRAW
# general
CDEFS += -DGLIDE3 -DGLIDE3_ALPHA -DGLIDE_HARDWARE
# subsystem
ifeq ($(FX_GLIDE_HW),sst1)
CDEFS += -DSST1
else
ifeq ($(FX_GLIDE_HW),sst96)
CDEFS += -DSST96
CDEFS += -DSST96_FIFO
#CDEFS += -DSST96_ALT_FIFO_WRAP
#CDEFS += -DINIT96VGASWAP
#CDEFS += -DINIT_ACCESS_DIRECT
CDEFS += -DGLIDE_USE_ALT_REGMAP
GLIDE_LIBDIR = ..\..\lib\sst96
endif
endif
# debug
ifdef DEBUG
CDEFS += -DGDBG_INFO_ON -DGLIDE_DEBUG -DGLIDE_SANITY_ASSERT -DGLIDE_SANITY_SIZE
endif
# other
CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH
ifeq ($(TEXUS2),1)
CDEFS += -DHAVE_TEXUS2
endif
###############################################################################
# flags
###############################################################################
# linker
LDFLAGS = -nologo -dll -opt:WIN98 -machine:IX86 -nodefaultlib
# assembler
ASFLAGS = -O6 -fwin32 -D__WIN32__ --prefix _
ASFLAGS += $(CDEFS)
# compiler
CFLAGS = -nologo -W3 -WX -D__MSC__=1
LDLIBS = user32.lib kernel32.lib
ifdef DEBUG
CFLAGS += -MTd -Zi
LDFLAGS += -debugtype:both -debug
LDLIBS += LIBCMTD.lib
OPTFLAGS ?= -Od
else
CFLAGS += -DNDEBUG -MT
LDLIBS += LIBCMT.lib
OPTFLAGS ?= -G6 -O2
endif
ifeq ($(FX_GLIDE_HW),sst96)
LDLIBS += gdi32.lib ddraw.lib dxguid.lib oldnames.lib
endif
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
CFLAGS += $(CDEFS) $(OPTFLAGS)
ifeq ($(USE_X86),1)
CFLAGS += -DGL_X86
else
CFLAGS += -DGLIDE_USE_C_TRISETUP
endif
###############################################################################
# objects
###############################################################################
GLIDE_OBJECTS = \
distate.obj \
diget.obj \
gstrip.obj \
distrip.obj \
diglide.obj \
disst.obj \
ditex.obj \
g3df.obj \
gaa.obj \
gbanner.obj \
gdraw.obj \
gerror.obj \
gglide.obj \
glfb.obj \
gpci.obj \
gsplash.obj \
gsst.obj \
gtex.obj \
gtexdl.obj \
gu.obj \
gxdraw.obj
ifeq ($(USE_X86),1)
GLIDE_OBJECTS += \
cpuid.obj
ifeq ($(FX_GLIDE_HW),sst1)
GLIDE_OBJECTS += \
xdraw.obj
else
GLIDE_OBJECTS += \
xdraw96.obj
endif
else
GLIDE_OBJECTS += \
gxdraw.obj
endif
ifeq ($(FX_GLIDE_HW),sst96)
GLIDE_OBJECTS += \
sst96.obj \
..\..\init\init96\init96.obj \
..\..\init\init96\dxdrvr.obj \
..\..\init\init96\initat3d.obj \
..\..\init\init96\initmcrx.obj
endif
GLIDE_OBJECTS += \
..\..\init\init.obj \
..\..\init\vgdrvr.obj \
..\..\init\vg96drvr.obj \
..\..\init\initvg\gamma.obj \
..\..\init\initvg\dac.obj \
..\..\init\initvg\video.obj \
..\..\init\initvg\parse.obj \
..\..\init\initvg\sli.obj \
..\..\init\initvg\util.obj \
..\..\init\initvg\info.obj \
..\..\init\initvg\print.obj \
..\..\init\initvg\gdebug.obj \
..\..\init\initvg\sst1init.obj \
$(FX_GLIDE_SW)\newpci\pcilib\sst1_pci.obj \
$(FX_GLIDE_SW)\newpci\pcilib\fxmsr.obj \
$(FX_GLIDE_SW)\newpci\pcilib\fxpci.obj \
$(FX_GLIDE_SW)\newpci\pcilib\fxw32.obj \
$(FX_GLIDE_SW)\newpci\pcilib\fxvxd.obj \
$(FX_GLIDE_SW)\newpci\pcilib\fxnt.obj \
TEXUS_SOURCES = \
$(FX_GLIDE_SW)\texus2\lib\texuslib.c \
$(FX_GLIDE_SW)\texus2\lib\clamp.c \
$(FX_GLIDE_SW)\texus2\lib\read.c \
$(FX_GLIDE_SW)\texus2\lib\resample.c \
$(FX_GLIDE_SW)\texus2\lib\mipmap.c \
$(FX_GLIDE_SW)\texus2\lib\quantize.c \
$(FX_GLIDE_SW)\texus2\lib\ncc.c \
$(FX_GLIDE_SW)\texus2\lib\nccnnet.c \
$(FX_GLIDE_SW)\texus2\lib\pal256.c \
$(FX_GLIDE_SW)\texus2\lib\pal6666.c \
$(FX_GLIDE_SW)\texus2\lib\dequant.c \
$(FX_GLIDE_SW)\texus2\lib\view.c \
$(FX_GLIDE_SW)\texus2\lib\util.c \
$(FX_GLIDE_SW)\texus2\lib\diffuse.c \
$(FX_GLIDE_SW)\texus2\lib\write.c \
$(FX_GLIDE_SW)\texus2\lib\tga.c \
$(FX_GLIDE_SW)\texus2\lib\3df.c \
$(FX_GLIDE_SW)\texus2\lib\ppm.c \
$(FX_GLIDE_SW)\texus2\lib\rgt.c \
$(FX_GLIDE_SW)\texus2\lib\txs.c \
$(FX_GLIDE_SW)\texus2\lib\codec.c \
$(FX_GLIDE_SW)\texus2\lib\eigen.c \
$(FX_GLIDE_SW)\texus2\lib\bitcoder.c
ifeq ($(TEXUS2),1)
GLIDE_OBJECTS += $(TEXUS_SOURCES:.c=.obj)
endif
###############################################################################
# rules
###############################################################################
.c.obj:
$(CC) -Fo$@ $(CFLAGS) -c $<
.rc.res:
$(RC) -Fo$@ $(CDEFS) -I$(FX_GLIDE_SW)\fxmisc $<
###############################################################################
# main
###############################################################################
all: glide3x $(TEXUS_EXEDIR)\$(TEXUS_EXE)
glide3x: $(GLIDE_LIBDIR)\$(GLIDE_DLL)
$(GLIDE_LIBDIR)\$(GLIDE_DLL): $(GLIDE_OBJECTS) $(GLIDE_RES)
$(LD) -out:$@ $(LDFLAGS) $(GLIDE_OBJECTS) $(LDLIBS) $(GLIDE_RES)
$(TEXUS_EXEDIR)\$(TEXUS_EXE): $(FX_GLIDE_SW)\texus2\cmd\cmd.c $(GLIDE_LIBDIR)\$(GLIDE_IMP)
#ifeq ($(TEXUS2),1)
# $(CC) -o $@ $(CFLAGS) $^
#else
# $(warning Texus2 not enabled... Skipping $(TEXUS_EXE))
#endif
###############################################################################
# rules(2)
###############################################################################
cpuid.obj: cpudtect.asm
$(AS) -o $@ $(ASFLAGS) $<
xdraw.obj: xdraw.asm
$(AS) -o $@ $(ASFLAGS) $<
xdraw96.obj: xdraw96.asm
$(AS) -o $@ $(ASFLAGS) $<
ifeq ($(FX_GLIDE_HW),sst96)
..\..\init\initvg\gamma.obj: ..\..\init\initvg\gamma.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
..\..\init\initvg\dac.obj: ..\..\init\initvg\dac.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
..\..\init\initvg\video.obj: ..\..\init\initvg\video.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
..\..\init\initvg\parse.obj: ..\..\init\initvg\parse.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
..\..\init\initvg\sli.obj: ..\..\init\initvg\sli.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
..\..\init\initvg\util.obj: ..\..\init\initvg\util.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
..\..\init\initvg\info.obj: ..\..\init\initvg\info.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
..\..\init\initvg\print.obj: ..\..\init\initvg\print.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
..\..\init\initvg\gdebug.obj: ..\..\init\initvg\gdebug.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
..\..\init\initvg\sst1init.obj: ..\..\init\initvg\sst1init.c
$(CC) -Fo$@ $(CFLAGS) -USST96 -c $<
endif
$(GLIDE_OBJECTS): fxinline.h fxgasm.h
fxinline.h: fxgasm.exe
.\$< -inline > $@
fxgasm.h: fxgasm.exe
.\$< -hex > $@
fxgasm.exe: fxgasm.c
$(CC) -o $@ $(CFLAGS) $<
###############################################################################
# clean, realclean
###############################################################################
clean:
-$(call UNLINK,*.obj)
-$(call UNLINK,..\..\init\*.obj)
-$(call UNLINK,..\..\init\initvg\*.obj)
-$(call UNLINK,..\..\init\init96\*.obj)
-$(call UNLINK,$(FX_GLIDE_SW)\newpci\pcilib\*.obj)
-$(call UNLINK,fxinline.h)
-$(call UNLINK,fxgasm.h)
-$(call UNLINK,$(FX_GLIDE_SW)\texus2\lib\*.obj)
-$(call UNLINK,$(GLIDE_RES))
realclean: clean
-$(call UNLINK,$(GLIDE_LIBDIR)\glide3x.exp)
-$(call UNLINK,$(GLIDE_LIBDIR)\$(GLIDE_DLL))
-$(call UNLINK,$(GLIDE_LIBDIR)\$(GLIDE_IMP))
-$(call UNLINK,$(TEXUS_EXEDIR)\$(TEXUS_EXE))