added makefiles for DOS/OpenWatcom and Win32
This commit is contained in:
301
glide3x/cvg/glide3/src/Makefile.wat
Normal file
301
glide3x/cvg/glide3/src/Makefile.wat
Normal file
@@ -0,0 +1,301 @@
|
||||
# OpenWatcom 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
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# FX_GLIDE_HW build for the given ASIC (cvg).
|
||||
# default = cvg
|
||||
# CPU optimize for the given processor.
|
||||
# default = 5s (Pentium, stack)
|
||||
# DEBUG=1 disable optimizations and build for debug.
|
||||
# default = no
|
||||
# USE_X86=1 use assembler triangle specializations; req by CVG
|
||||
# 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 wlib.lbc
|
||||
.SUFFIXES: .c .obj
|
||||
|
||||
###############################################################################
|
||||
# general defines (user settable?)
|
||||
###############################################################################
|
||||
|
||||
GLIDE_LIB = 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 = wcl386
|
||||
AS = nasm
|
||||
AR = wlib
|
||||
|
||||
ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
|
||||
UNLINK = del $(subst /,\,$(1))
|
||||
else
|
||||
UNLINK = $(RM) $(1)
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# defines
|
||||
###############################################################################
|
||||
|
||||
# platform
|
||||
CDEFS = -D__DOS__ -D__DOS32__ -DINIT_DOS -D__3Dfx_PCI_CFG__
|
||||
|
||||
# general
|
||||
CDEFS += -DGLIDE3 -DGLIDE3_ALPHA -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 -DGLIDE_DISPATCH_DOWNLOAD
|
||||
|
||||
# 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
|
||||
###############################################################################
|
||||
|
||||
# librarian
|
||||
ARFLAGS = -c -fo -n -t -q
|
||||
|
||||
# assembler
|
||||
ASFLAGS = -O6 -fobj -D__WATCOMD__ --prefix _
|
||||
ASFLAGS += $(CDEFS)
|
||||
|
||||
# compiler
|
||||
CFLAGS = -wx
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -od -d2
|
||||
else
|
||||
CPU ?= 5s
|
||||
CFLAGS += -ox -$(CPU)
|
||||
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)
|
||||
|
||||
override USE_X86 = 1
|
||||
|
||||
ifeq ($(USE_3DNOW),1)
|
||||
CFLAGS += -DGL_AMD3D
|
||||
override USE_X86 = 1
|
||||
endif
|
||||
|
||||
ifneq ($(USE_X86),1)
|
||||
CFLAGS += -DGLIDE_USE_C_TRISETUP
|
||||
endif
|
||||
|
||||
# Watcom woes: pass parameters through environment vars
|
||||
export WCC386 = $(subst /,\,$(CFLAGS))
|
||||
export WCL386 = -zq
|
||||
|
||||
###############################################################################
|
||||
# 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 \
|
||||
cpuid.obj \
|
||||
xtexdl_d.obj
|
||||
|
||||
ifeq ($(USE_X86),1)
|
||||
GLIDE_OBJECTS += \
|
||||
xdraw2_d.obj \
|
||||
xdraw3_d.obj
|
||||
ifeq ($(USE_3DNOW),1)
|
||||
GLIDE_OBJECTS += \
|
||||
xdraw2_3.obj \
|
||||
xdraw3_3.obj \
|
||||
xtexdl_3.obj
|
||||
endif
|
||||
else
|
||||
GLIDE_OBJECTS += \
|
||||
gxdraw.obj
|
||||
endif
|
||||
|
||||
GLIDE_OBJECTS += \
|
||||
digutex.obj \
|
||||
$(FX_GLIDE_SW)/newpci/pcilib/fxmsr.obj \
|
||||
$(FX_GLIDE_SW)/newpci/pcilib/fxpci.obj \
|
||||
$(FX_GLIDE_SW)/newpci/pcilib/fxdpmi2.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=$@ -c $<
|
||||
|
||||
###############################################################################
|
||||
# main
|
||||
###############################################################################
|
||||
all: glide3x $(TEXUS_EXEDIR)/$(TEXUS_EXE)
|
||||
|
||||
glide3x: $(GLIDE_LIBDIR)/$(GLIDE_LIB)
|
||||
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_LIB): wlib.lbc
|
||||
$(AR) $(ARFLAGS) -o $(subst /,\,$@) @wlib
|
||||
|
||||
$(TEXUS_EXEDIR)/$(TEXUS_EXE): $(FX_GLIDE_SW)/texus2/cmd/cmd.c $(GLIDE_LIBDIR)/$(GLIDE_LIB)
|
||||
ifeq ($(TEXUS2),1)
|
||||
$(CC) -fe=$(subst /,\,$@) $(subst /,\,$^)
|
||||
else
|
||||
$(warning Texus2 not enabled... Skipping $(TEXUS_EXE))
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# rules(2)
|
||||
###############################################################################
|
||||
|
||||
cpuid.obj: cpudtect.asm
|
||||
$(AS) -o $@ $(ASFLAGS) $<
|
||||
xdraw2_d.obj: xdraw2.asm
|
||||
$(AS) -o $@ $(ASFLAGS) $<
|
||||
xdraw3_d.obj: xdraw3.asm
|
||||
$(AS) -o $@ $(ASFLAGS) $<
|
||||
xtexdl_d.obj: xtexdl.c
|
||||
$(CC) -fo=$@ -c $<
|
||||
xdraw2_3.obj: xdraw2.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
|
||||
xdraw3_3.obj: xdraw3.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
|
||||
xtexdl_3.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) -fe=$@ $<
|
||||
|
||||
wlib.lbc: $(subst /,\,$(GLIDE_OBJECTS))
|
||||
@echo $(addprefix +,$^) > wlib.lbc
|
||||
|
||||
###############################################################################
|
||||
# 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,*.err)
|
||||
|
||||
realclean: clean
|
||||
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_LIB))
|
||||
-$(call UNLINK,$(TEXUS_EXEDIR)/$(TEXUS_EXE))
|
||||
307
glide3x/cvg/glide3/src/Makefile.win32
Normal file
307
glide3x/cvg/glide3/src/Makefile.win32
Normal file
@@ -0,0 +1,307 @@
|
||||
# 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
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# FX_GLIDE_HW build for the given ASIC (cvg).
|
||||
# default = cvg
|
||||
# CPU optimize for the given processor.
|
||||
# default = 6 (PentiumPro)
|
||||
# DEBUG=1 disable optimizations and build for debug.
|
||||
# default = no
|
||||
# USE_X86=1 use assembler triangle specializations; req by CVG
|
||||
# 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 -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 -DGLIDE_DISPATCH_DOWNLOAD
|
||||
|
||||
# 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
|
||||
ifdef DEBUG
|
||||
CFLAGS += -Od -MTd -Zi
|
||||
LDFLAGS += -debugtype:both -debug
|
||||
LDLIBS += LIBCMTD.lib
|
||||
else
|
||||
CPU ?= 6
|
||||
CFLAGS += -DNDEBUG -G$(CPU) -O2 -MT
|
||||
LDLIBS += LIBCMT.lib
|
||||
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)
|
||||
|
||||
override USE_X86 = 1
|
||||
|
||||
ifeq ($(USE_3DNOW),1)
|
||||
CFLAGS += -DGL_AMD3D
|
||||
override USE_X86 = 1
|
||||
endif
|
||||
|
||||
ifneq ($(USE_X86),1)
|
||||
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 \
|
||||
cpuid.obj \
|
||||
xtexdl_def.obj
|
||||
|
||||
ifeq ($(USE_X86),1)
|
||||
GLIDE_OBJECTS += \
|
||||
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 += \
|
||||
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 $<
|
||||
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))
|
||||
61
glide3x/cvg/glide3/tests/Makefile.wat
Normal file
61
glide3x/cvg/glide3/tests/Makefile.wat
Normal file
@@ -0,0 +1,61 @@
|
||||
# OpenWatcom tests makefile for Glide3
|
||||
# This makefile MUST be processed by GNU make!!!
|
||||
#
|
||||
# Copyright (c) 2004 - Borca Daniel
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# CPU optimize for the given processor.
|
||||
# default = 5s (Pentium, stack)
|
||||
# DEBUG=1 disable optimizations and build for debug.
|
||||
# default = no
|
||||
#
|
||||
# Targets:
|
||||
# <file.exe> build a specific file
|
||||
#
|
||||
|
||||
|
||||
.PHONY: all
|
||||
.SUFFIXES: .c .obj .exe
|
||||
.SECONDARY: tlib.obj
|
||||
|
||||
FX_GLIDE_HW = cvg
|
||||
TOP = ../../..
|
||||
|
||||
CC = wcl386
|
||||
CFLAGS = -wx
|
||||
CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide3/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc
|
||||
CFLAGS += -I$(TOP)/swlibs/fxmisc
|
||||
CFLAGS += -D__DOS__ -DCVG
|
||||
CFLAGS += -D__DOS32__
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -od -d2
|
||||
else
|
||||
CPU ?= 5s
|
||||
CFLAGS += -ox -$(CPU)
|
||||
endif
|
||||
|
||||
LDFLAGS = -k16384
|
||||
|
||||
LDLIBS = $(TOP)/$(FX_GLIDE_HW)/lib/glide3x.lib
|
||||
|
||||
# Watcom woes: pass parameters through environment vars
|
||||
export WCC386 = $(subst /,\,$(CFLAGS))
|
||||
export WCL386 = -zq
|
||||
|
||||
.c.obj:
|
||||
$(CC) -fo=$@ -c $<
|
||||
%.exe: tlib.obj %.obj
|
||||
$(CC) -fe=$@ $(LDFLAGS) $^ $(subst /,\,$(LDLIBS))
|
||||
|
||||
all:
|
||||
$(error Must specify <filename.exe> to build)
|
||||
50
glide3x/cvg/glide3/tests/Makefile.win32
Normal file
50
glide3x/cvg/glide3/tests/Makefile.win32
Normal file
@@ -0,0 +1,50 @@
|
||||
# Win32 tests makefile for Glide3
|
||||
# This makefile MUST be processed by GNU make!!!
|
||||
#
|
||||
# Copyright (c) 2004 - Borca Daniel
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# FX_GLIDE_HW build for the given ASIC (cvg).
|
||||
# default = cvg
|
||||
# CPU optimize for the given processor.
|
||||
# default = 6
|
||||
#
|
||||
# Targets:
|
||||
# <file.exe> build a specific file
|
||||
#
|
||||
|
||||
|
||||
.PHONY: all
|
||||
.SUFFIXES: .c .obj .exe
|
||||
.SECONDARY: tlib.obj
|
||||
|
||||
FX_GLIDE_HW ?= cvg
|
||||
TOP = ../../..
|
||||
CPU ?= 6
|
||||
|
||||
CC = cl
|
||||
CFLAGS = -nologo -W3 -WX -D__MSC__=1 -DNDEBUG -G$(CPU) -O2 -MT
|
||||
CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide3/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc
|
||||
CFLAGS += -I$(TOP)/swlibs/fxmisc
|
||||
CFLAGS += -D__WIN32__ -DCVG
|
||||
|
||||
LD = link
|
||||
LDFLAGS = -nologo -opt:WIN98 -machine:IX86
|
||||
LDLIBS = user32.lib gdi32.lib $(TOP)/$(FX_GLIDE_HW)/lib/glide3x.lib
|
||||
|
||||
.c.obj:
|
||||
$(CC) -Fo$@ $(CFLAGS) -c $<
|
||||
%.exe: tlib.obj %.obj
|
||||
$(LD) -out:$@ $(LDFLAGS) $^ $(LDLIBS)
|
||||
|
||||
all:
|
||||
$(error Must specify <filename.exe> to build)
|
||||
298
glide3x/h3/glide3/src/Makefile.wat
Normal file
298
glide3x/h3/glide3/src/Makefile.wat
Normal file
@@ -0,0 +1,298 @@
|
||||
# OpenWatcom 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
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# FX_GLIDE_HW build for the given ASIC (h3).
|
||||
# default = h3
|
||||
# H4=1 High speed Avenger.
|
||||
# default = no
|
||||
# CPU optimize for the given processor.
|
||||
# default = 5s (Pentium, stack)
|
||||
# DEBUG=1 disable optimizations and build for debug.
|
||||
# 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 wlib.lbc
|
||||
.SUFFIXES: .c .obj
|
||||
|
||||
###############################################################################
|
||||
# general defines (user settable?)
|
||||
###############################################################################
|
||||
|
||||
GLIDE_LIB = 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 = wcl386
|
||||
AS = nasm
|
||||
AR = wlib
|
||||
|
||||
ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
|
||||
UNLINK = del $(subst /,\,$(1))
|
||||
else
|
||||
UNLINK = $(RM) $(1)
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# defines
|
||||
###############################################################################
|
||||
|
||||
# platform
|
||||
CDEFS = -D__DOS__ -D__DOS32__
|
||||
|
||||
# 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
|
||||
###############################################################################
|
||||
|
||||
# librarian
|
||||
ARFLAGS = -c -fo -n -t -q
|
||||
|
||||
# assembler
|
||||
ASFLAGS = -O6 -fobj -D__WATCOMD__ --prefix _
|
||||
ASFLAGS += $(CDEFS)
|
||||
|
||||
# compiler
|
||||
CFLAGS = -wx
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -od -d2
|
||||
else
|
||||
CPU ?= 5s
|
||||
CFLAGS += -ox -$(CPU)
|
||||
endif
|
||||
|
||||
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
|
||||
CFLAGS += $(CDEFS)
|
||||
|
||||
ifeq ($(USE_3DNOW),1)
|
||||
CFLAGS += -DGL_AMD3D
|
||||
override USE_X86 = 1
|
||||
endif
|
||||
|
||||
ifneq ($(USE_X86),1)
|
||||
CFLAGS += -DGLIDE_USE_C_TRISETUP
|
||||
endif
|
||||
|
||||
# Watcom woes: pass parameters through environment vars
|
||||
export WCC386 = $(subst /,\,$(CFLAGS))
|
||||
export WCL386 = -zq
|
||||
|
||||
###############################################################################
|
||||
# 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 \
|
||||
cpuid.obj \
|
||||
xtexdl_d.obj
|
||||
|
||||
ifeq ($(USE_X86),1)
|
||||
GLIDE_OBJECTS += \
|
||||
xdraw2_d.obj \
|
||||
xdraw3_d.obj
|
||||
ifeq ($(USE_3DNOW),1)
|
||||
GLIDE_OBJECTS += \
|
||||
xdraw2_3.obj \
|
||||
xdraw3_3.obj \
|
||||
xtexdl_3.obj
|
||||
endif
|
||||
else
|
||||
GLIDE_OBJECTS += \
|
||||
gxdraw.obj
|
||||
endif
|
||||
|
||||
GLIDE_OBJECTS += \
|
||||
gthread.obj \
|
||||
$(FX_GLIDE_SW)/newpci/pcilib/fxpci.obj \
|
||||
$(FX_GLIDE_SW)/newpci/pcilib/fxdpmi2.obj \
|
||||
../../minihwc/hwcio.obj \
|
||||
../../minihwc/gdebug.obj \
|
||||
../../minihwc/minihwc.obj \
|
||||
../../minihwc/dos_mode.obj \
|
||||
../../cinit/h3cinit.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=$@ -c $<
|
||||
|
||||
###############################################################################
|
||||
# main
|
||||
###############################################################################
|
||||
all: glide3x $(TEXUS_EXEDIR)/$(TEXUS_EXE)
|
||||
|
||||
glide3x: $(GLIDE_LIBDIR)/$(GLIDE_LIB)
|
||||
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_LIB): wlib.lbc
|
||||
$(AR) $(ARFLAGS) -o $(subst /,\,$@) @wlib
|
||||
|
||||
$(TEXUS_EXEDIR)/$(TEXUS_EXE): $(FX_GLIDE_SW)/texus2/cmd/cmd.c $(GLIDE_LIBDIR)/$(GLIDE_LIB)
|
||||
ifeq ($(TEXUS2),1)
|
||||
$(CC) -fe=$(subst /,\,$@) $(subst /,\,$^)
|
||||
else
|
||||
$(warning Texus2 not enabled... Skipping $(TEXUS_EXE))
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# rules(2)
|
||||
###############################################################################
|
||||
|
||||
cpuid.obj: cpudtect.asm
|
||||
$(AS) -o $@ $(ASFLAGS) $<
|
||||
xdraw2_d.obj: xdraw2.asm
|
||||
$(AS) -o $@ $(ASFLAGS) $<
|
||||
xdraw3_d.obj: xdraw3.asm
|
||||
$(AS) -o $@ $(ASFLAGS) $<
|
||||
xtexdl_d.obj: xtexdl_def.c
|
||||
copy xtexdl_def.c xtexdl_d.c
|
||||
$(CC) -fo=$@ -c xtexdl_d.c
|
||||
-$(call UNLINK,xtexdl_d.c)
|
||||
xdraw2_3.obj: xdraw2.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
|
||||
xdraw3_3.obj: xdraw3.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
|
||||
xtexdl_3.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) -fe=$@ $<
|
||||
|
||||
wlib.lbc: $(subst /,\,$(GLIDE_OBJECTS))
|
||||
@echo $(addprefix +,$^) > wlib.lbc
|
||||
|
||||
###############################################################################
|
||||
# clean, realclean
|
||||
###############################################################################
|
||||
|
||||
clean:
|
||||
-$(call UNLINK,*.obj)
|
||||
-$(call UNLINK,../../cinit/*.obj)
|
||||
-$(call UNLINK,../../minihwc/*.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,*.err)
|
||||
|
||||
realclean: clean
|
||||
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_LIB))
|
||||
-$(call UNLINK,$(TEXUS_EXEDIR)/$(TEXUS_EXE))
|
||||
302
glide3x/h3/glide3/src/Makefile.win32
Normal file
302
glide3x/h3/glide3/src/Makefile.win32
Normal file
@@ -0,0 +1,302 @@
|
||||
# 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
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# FX_GLIDE_HW build for the given ASIC (h3).
|
||||
# default = h3
|
||||
# CPU optimize for the given processor.
|
||||
# default = 6 (PentiumPro)
|
||||
# DEBUG=1 disable optimizations and build for debug.
|
||||
# default = no
|
||||
# USE_X86=1 use assembler triangle specializations; req by CVG
|
||||
# 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 += -Od -MTd -Zi
|
||||
LDFLAGS += -debugtype:both -debug
|
||||
LDLIBS += LIBCMTD.lib
|
||||
else
|
||||
CPU ?= 6
|
||||
CFLAGS += -DNDEBUG -G$(CPU) -O2 -MT
|
||||
LDLIBS += LIBCMT.lib
|
||||
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)
|
||||
|
||||
override USE_X86 = 1
|
||||
|
||||
ifeq ($(USE_3DNOW),1)
|
||||
CFLAGS += -DGL_AMD3D
|
||||
override USE_X86 = 1
|
||||
endif
|
||||
|
||||
ifneq ($(USE_X86),1)
|
||||
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 \
|
||||
cpuid.obj \
|
||||
xtexdl_def.obj
|
||||
|
||||
ifeq ($(USE_X86),1)
|
||||
GLIDE_OBJECTS += \
|
||||
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 \
|
||||
$(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 \
|
||||
../../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) $<
|
||||
xtexdl_def.obj: xtexdl_def.c
|
||||
$(CC) -Fo$@ $(CFLAGS) -c $<
|
||||
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,$(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))
|
||||
61
glide3x/h3/glide3/tests/Makefile.wat
Normal file
61
glide3x/h3/glide3/tests/Makefile.wat
Normal file
@@ -0,0 +1,61 @@
|
||||
# OpenWatcom tests makefile for Glide3
|
||||
# This makefile MUST be processed by GNU make!!!
|
||||
#
|
||||
# Copyright (c) 2004 - Borca Daniel
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# CPU optimize for the given processor.
|
||||
# default = 5s (Pentium, stack)
|
||||
# DEBUG=1 disable optimizations and build for debug.
|
||||
# default = no
|
||||
#
|
||||
# Targets:
|
||||
# <file.exe> build a specific file
|
||||
#
|
||||
|
||||
|
||||
.PHONY: all
|
||||
.SUFFIXES: .c .obj .exe
|
||||
.SECONDARY: tlib.obj
|
||||
|
||||
FX_GLIDE_HW = h3
|
||||
TOP = ../../..
|
||||
|
||||
CC = wcl386
|
||||
CFLAGS = -wx
|
||||
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__
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -od -d2
|
||||
else
|
||||
CPU ?= 5s
|
||||
CFLAGS += -ox -$(CPU)
|
||||
endif
|
||||
|
||||
LDFLAGS = -k16384
|
||||
|
||||
LDLIBS = $(TOP)/$(FX_GLIDE_HW)/lib/glide3x.lib
|
||||
|
||||
# Watcom woes: pass parameters through environment vars
|
||||
export WCC386 = $(subst /,\,$(CFLAGS))
|
||||
export WCL386 = -zq
|
||||
|
||||
.c.obj:
|
||||
$(CC) -fo=$@ -c $<
|
||||
%.exe: tlib.obj %.obj
|
||||
$(CC) -fe=$@ $(LDFLAGS) $^ $(subst /,\,$(LDLIBS))
|
||||
|
||||
all:
|
||||
$(error Must specify <filename.exe> to build)
|
||||
50
glide3x/h3/glide3/tests/Makefile.win32
Normal file
50
glide3x/h3/glide3/tests/Makefile.win32
Normal file
@@ -0,0 +1,50 @@
|
||||
# Win32 tests makefile for Glide3
|
||||
# This makefile MUST be processed by GNU make!!!
|
||||
#
|
||||
# Copyright (c) 2004 - Borca Daniel
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# FX_GLIDE_HW build for the given ASIC (h3).
|
||||
# default = h3
|
||||
# CPU optimize for the given processor.
|
||||
# default = 6
|
||||
#
|
||||
# Targets:
|
||||
# <file.exe> build a specific file
|
||||
#
|
||||
|
||||
|
||||
.PHONY: all
|
||||
.SUFFIXES: .c .obj .exe
|
||||
.SECONDARY: tlib.obj
|
||||
|
||||
FX_GLIDE_HW ?= h3
|
||||
TOP = ../../..
|
||||
CPU ?= 6
|
||||
|
||||
CC = cl
|
||||
CFLAGS = -nologo -W3 -WX -D__MSC__=1 -DNDEBUG -G$(CPU) -O2 -MT
|
||||
CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide3/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc
|
||||
CFLAGS += -I$(TOP)/swlibs/fxmisc
|
||||
CFLAGS += -D__WIN32__ -DH3
|
||||
|
||||
LD = link
|
||||
LDFLAGS = -nologo -opt:WIN98 -machine:IX86
|
||||
LDLIBS = user32.lib gdi32.lib $(TOP)/$(FX_GLIDE_HW)/lib/glide3x.lib
|
||||
|
||||
.c.obj:
|
||||
$(CC) -Fo$@ $(CFLAGS) -c $<
|
||||
%.exe: tlib.obj %.obj
|
||||
$(LD) -out:$@ $(LDFLAGS) $^ $(LDLIBS)
|
||||
|
||||
all:
|
||||
$(error Must specify <filename.exe> to build)
|
||||
320
glide3x/sst1/glide3/src/Makefile.wat
Normal file
320
glide3x/sst1/glide3/src/Makefile.wat
Normal file
@@ -0,0 +1,320 @@
|
||||
# OpenWatcom 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
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# FX_GLIDE_HW build for the given ASIC (cvg).
|
||||
# default = sst1
|
||||
# CPU optimize for the given processor.
|
||||
# default = 5s (Pentium, stack)
|
||||
# DEBUG=1 disable optimizations and build for debug.
|
||||
# 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 wlib.lbc
|
||||
.SUFFIXES: .c .obj
|
||||
|
||||
###############################################################################
|
||||
# general defines (user settable?)
|
||||
###############################################################################
|
||||
|
||||
GLIDE_LIB = 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 = wcl386
|
||||
AS = nasm
|
||||
AR = wlib
|
||||
|
||||
ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
|
||||
UNLINK = del $(subst /,\,$(1))
|
||||
else
|
||||
UNLINK = $(RM) $(1)
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# defines
|
||||
###############################################################################
|
||||
|
||||
# platform
|
||||
CDEFS = -D__DOS__ -D__DOS32__ -DINIT_DOS
|
||||
|
||||
# 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 -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
|
||||
###############################################################################
|
||||
|
||||
# librarian
|
||||
ARFLAGS = -c -fo -n -t -q
|
||||
|
||||
# assembler
|
||||
ASFLAGS = -O6 -fobj -D__WATCOMD__ --prefix _
|
||||
ASFLAGS += $(CDEFS)
|
||||
|
||||
# compiler
|
||||
CFLAGS = -wx
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -od -d2
|
||||
else
|
||||
CPU ?= 5s
|
||||
CFLAGS += -ox -$(CPU)
|
||||
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)
|
||||
|
||||
ifneq ($(USE_X86),1)
|
||||
CFLAGS += -DGLIDE_USE_C_TRISETUP
|
||||
endif
|
||||
|
||||
# Watcom woes: pass parameters through environment vars
|
||||
export WCC386 = $(subst /,\,$(CFLAGS))
|
||||
export WCL386 = -zq
|
||||
|
||||
###############################################################################
|
||||
# objects
|
||||
###############################################################################
|
||||
|
||||
GLIDE_OBJECTS = \
|
||||
distate.obj \
|
||||
diget.obj \
|
||||
gstrip.obj \
|
||||
distrip.obj \
|
||||
cpuid.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)
|
||||
ifeq ($(FX_GLIDE_HW),sst1)
|
||||
GLIDE_OBJECTS += \
|
||||
xdraw.obj
|
||||
else
|
||||
GLIDE_OBJECTS += \
|
||||
xdraw96.obj
|
||||
endif
|
||||
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/h3drvr.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/fxdpmi2.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=$@ -c $<
|
||||
|
||||
###############################################################################
|
||||
# main
|
||||
###############################################################################
|
||||
all: glide3x $(TEXUS_EXEDIR)/$(TEXUS_EXE)
|
||||
|
||||
glide3x: $(GLIDE_LIBDIR)/$(GLIDE_LIB)
|
||||
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_LIB): wlib.lbc
|
||||
$(AR) $(ARFLAGS) -o $(subst /,\,$@) @wlib
|
||||
|
||||
$(TEXUS_EXEDIR)/$(TEXUS_EXE): $(FX_GLIDE_SW)/texus2/cmd/cmd.c $(GLIDE_LIBDIR)/$(GLIDE_LIB)
|
||||
ifeq ($(TEXUS2),1)
|
||||
$(CC) -fe=$(subst /,\,$@) $(subst /,\,$^)
|
||||
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=$@ -USST96 -c $<
|
||||
..\..\init\initvg\dac.obj: ..\..\init\initvg\dac.c
|
||||
$(CC) -fo=$@ -USST96 -c $<
|
||||
..\..\init\initvg\video.obj: ..\..\init\initvg\video.c
|
||||
$(CC) -fo=$@ -USST96 -c $<
|
||||
..\..\init\initvg\parse.obj: ..\..\init\initvg\parse.c
|
||||
$(CC) -fo=$@ -USST96 -c $<
|
||||
..\..\init\initvg\sli.obj: ..\..\init\initvg\sli.c
|
||||
$(CC) -fo=$@ -USST96 -c $<
|
||||
..\..\init\initvg\util.obj: ..\..\init\initvg\util.c
|
||||
$(CC) -fo=$@ -USST96 -c $<
|
||||
..\..\init\initvg\info.obj: ..\..\init\initvg\info.c
|
||||
$(CC) -fo=$@ -USST96 -c $<
|
||||
..\..\init\initvg\print.obj: ..\..\init\initvg\print.c
|
||||
$(CC) -fo=$@ -USST96 -c $<
|
||||
..\..\init\initvg\gdebug.obj: ..\..\init\initvg\gdebug.c
|
||||
$(CC) -fo=$@ -USST96 -c $<
|
||||
..\..\init\initvg\sst1init.obj: ..\..\init\initvg\sst1init.c
|
||||
$(CC) -fo=$@ -USST96 -c $<
|
||||
endif
|
||||
|
||||
$(GLIDE_OBJECTS): fxinline.h fxgasm.h
|
||||
|
||||
fxinline.h: fxgasm.exe
|
||||
$< -inline > $@
|
||||
|
||||
fxgasm.h: fxgasm.exe
|
||||
$< -hex > $@
|
||||
|
||||
fxgasm.exe: fxgasm.c
|
||||
$(CC) -fe=$@ $<
|
||||
|
||||
wlib.lbc: $(subst /,\,$(GLIDE_OBJECTS))
|
||||
@echo $(addprefix +,$^) > wlib.lbc
|
||||
|
||||
###############################################################################
|
||||
# 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,*.err)
|
||||
|
||||
realclean: clean
|
||||
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_LIB))
|
||||
-$(call UNLINK,$(TEXUS_EXEDIR)/$(TEXUS_EXE))
|
||||
329
glide3x/sst1/glide3/src/Makefile.win32
Normal file
329
glide3x/sst1/glide3/src/Makefile.win32
Normal file
@@ -0,0 +1,329 @@
|
||||
# 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
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# FX_GLIDE_HW build for the given ASIC (cvg).
|
||||
# default = sst1
|
||||
# CPU optimize for the given processor.
|
||||
# default = 6 (PentiumPro)
|
||||
# DEBUG=1 disable optimizations and build for debug.
|
||||
# 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 -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 += -Od -MTd -Zi
|
||||
LDFLAGS += -debugtype:both -debug
|
||||
LDLIBS += LIBCMTD.lib
|
||||
else
|
||||
CPU ?= 6
|
||||
CFLAGS += -DNDEBUG -G$(CPU) -O2 -MT
|
||||
LDLIBS += LIBCMT.lib
|
||||
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)
|
||||
|
||||
ifneq ($(USE_X86),1)
|
||||
CFLAGS += -DGLIDE_USE_C_TRISETUP
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# objects
|
||||
###############################################################################
|
||||
|
||||
GLIDE_OBJECTS = \
|
||||
distate.obj \
|
||||
diget.obj \
|
||||
gstrip.obj \
|
||||
distrip.obj \
|
||||
cpuid.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)
|
||||
ifeq ($(FX_GLIDE_HW),sst1)
|
||||
GLIDE_OBJECTS += \
|
||||
xdraw.obj
|
||||
else
|
||||
GLIDE_OBJECTS += \
|
||||
xdraw96.obj
|
||||
endif
|
||||
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/h3drvr.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))
|
||||
72
glide3x/sst1/glide3/tests/Makefile.wat
Normal file
72
glide3x/sst1/glide3/tests/Makefile.wat
Normal file
@@ -0,0 +1,72 @@
|
||||
# OpenWatcom tests makefile for Glide3
|
||||
# This makefile MUST be processed by GNU make!!!
|
||||
#
|
||||
# Copyright (c) 2004 - Borca Daniel
|
||||
# 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).
|
||||
# default = sst1
|
||||
# CPU optimize for the given processor.
|
||||
# default = 5s (Pentium, stack)
|
||||
# DEBUG=1 disable optimizations and build for debug.
|
||||
# default = no
|
||||
#
|
||||
# Targets:
|
||||
# <file.exe> build a specific file
|
||||
#
|
||||
|
||||
|
||||
.PHONY: all
|
||||
.SUFFIXES: .c .obj .exe
|
||||
.SECONDARY: tlib.obj
|
||||
|
||||
FX_GLIDE_HW ?= sst1
|
||||
ifeq ($(FX_GLIDE_HW),sst1)
|
||||
HWDEF = -DSST1
|
||||
else
|
||||
ifeq ($(FX_GLIDE_HW),sst96)
|
||||
HWDEF = -DSST96
|
||||
endif
|
||||
endif
|
||||
|
||||
override FX_GLIDE_HW = sst1
|
||||
TOP = ../../..
|
||||
|
||||
CC = wcl386
|
||||
CFLAGS = -wx
|
||||
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)
|
||||
CFLAGS += -D__DOS32__
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -od -d2
|
||||
else
|
||||
CPU ?= 5s
|
||||
CFLAGS += -ox -$(CPU)
|
||||
endif
|
||||
|
||||
LDFLAGS = -k16384
|
||||
|
||||
LDLIBS = $(TOP)/$(FX_GLIDE_HW)/lib/glide3x.lib
|
||||
|
||||
# Watcom woes: pass parameters through environment vars
|
||||
export WCC386 = $(subst /,\,$(CFLAGS))
|
||||
export WCL386 = -zq
|
||||
|
||||
.c.obj:
|
||||
$(CC) -fo=$@ -c $<
|
||||
%.exe: tlib.obj %.obj
|
||||
$(CC) -fe=$@ $(LDFLAGS) $^ $(subst /,\,$(LDLIBS))
|
||||
|
||||
all:
|
||||
$(error Must specify <filename.exe> to build)
|
||||
59
glide3x/sst1/glide3/tests/Makefile.win32
Normal file
59
glide3x/sst1/glide3/tests/Makefile.win32
Normal file
@@ -0,0 +1,59 @@
|
||||
# Win32 tests makefile for Glide3
|
||||
# This makefile MUST be processed by GNU make!!!
|
||||
#
|
||||
# Copyright (c) 2004 - Borca Daniel
|
||||
# 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).
|
||||
# default = sst1
|
||||
# CPU optimize for the given processor.
|
||||
# default = 6
|
||||
#
|
||||
# Targets:
|
||||
# <file.exe> build a specific file
|
||||
#
|
||||
|
||||
|
||||
.PHONY: all
|
||||
.SUFFIXES: .c .obj .exe
|
||||
.SECONDARY: tlib.obj
|
||||
|
||||
FX_GLIDE_HW ?= sst1
|
||||
ifeq ($(FX_GLIDE_HW),sst1)
|
||||
HWDEF = -DSST1
|
||||
else
|
||||
ifeq ($(FX_GLIDE_HW),sst96)
|
||||
HWDEF = -DSST96
|
||||
endif
|
||||
endif
|
||||
|
||||
override FX_GLIDE_HW = sst1
|
||||
TOP = ../../..
|
||||
CPU ?= 6
|
||||
|
||||
CC = cl
|
||||
CFLAGS = -nologo -W3 -WX -D__MSC__=1 -DNDEBUG -G$(CPU) -O2 -MT
|
||||
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__WIN32__ $(HWDEF)
|
||||
|
||||
LD = link
|
||||
LDFLAGS = -nologo -opt:WIN98 -machine:IX86
|
||||
LDLIBS = user32.lib gdi32.lib $(TOP)/$(FX_GLIDE_HW)/lib/glide3x.lib
|
||||
|
||||
.c.obj:
|
||||
$(CC) -Fo$@ $(CFLAGS) -c $<
|
||||
%.exe: tlib.obj %.obj
|
||||
$(LD) -out:$@ $(LDFLAGS) $^ $(LDLIBS)
|
||||
|
||||
all:
|
||||
$(error Must specify <filename.exe> to build)
|
||||
Reference in New Issue
Block a user