#******************************************************************************
#
#  Makefile for the XGA 2.0 BVH
#
#     This is very simple because we assume we will always be called
#     from the main XGA 32 bit display driver makefile, which will
#     have taken care of setting up all the paths etc
#
#******************************************************************************

.SUFFIXES:      .c .asm .obj .lst .cod

# define the level sensitive includes
AINC=-I. -I..\32bit
CINC=-I. -I..\32bit

#
# compiler options etc
#

Debug=
CFLAGS=-c -Asnw -Zp -Zl -J -G2 -Gc -W3 -Owit -Gs $(Debug)
LFLAGS=/nod /m /far


#****************************************************************************
#   Module Versioning
#****************************************************************************
!include      "..\..\..\H\version.mak"


# Rules for generating object files

.asm.obj:
#       masm $(ADebug) $(AINC) $*.asm;
        masm $(ADebug) $(AINC) -DDBCS $*.asm;

.c.obj:
#       cl $(CFLAGS) $(CINC) $*.c
        cl $(CFLAGS) $(CINC) -DDBCS $*.c

makeall:  bvhxga.dll


#****************************************************************************
#   Module Versioning
#****************************************************************************
bvhxga2.def: bvhxga.def makefile bvhxga.obj bvhxga2.obj bvhxga2.l
  copy bvhxga.def bvhxgas.def
  copy bvhxga.def bvhxga2.def
  echo #1 $(FILEVER) >  rep.in
  rep -f rep.in bvhxga2.def
  copy bvhxga2.def bvhxga.def


#******************************************************************************
# And now for the thing we really want to build - the BVH!
#******************************************************************************
bvhxga.dll: bvhxga.obj bvhxga2.obj bvhxga2.l bvhxga.def bvhxga2.def
  link386 $(LFLAGS) @bvhxga2.l
  mapsym bvhxga.map
  copy bvhxgas.def bvhxga.def
  del  bvhxgas.def



#******************************************************************************
# For development purposes we ignore the rest of this file.
#******************************************************************************
depend:
        copy makefile makefile.old
        sed "/^# Dependencies follow/,$$d" makefile.old > makefile
        echo # Dependencies follow >> makefile
        includes $(AINC) *.asm >> makefile
        includes $(CINC) *.c >> makefile
        echo # IF YOU PUT STUFF HERE IT WILL GET BLASTED >> makefile
        echo # see depend: above >> makefile

# DO NOT DELETE THE FOLLOWING LINE
# Dependencies follow
bvhxga.obj bvhxga.lst: bvhxga.asm ../32bit/eddhtype.inc \
        ../32bit/xgaadapt.inc

bvhxga2.obj bvhxga2.lst: bvhxga2.c ../32bit/plasma.h ../32bit/xgaadapt.h \
        bvhxga2.h

# IF YOU PUT STUFF HERE IT WILL GET BLASTED
# see depend: above
