#############################################################################
#
#                   Copyright (C) 1994 SciTech Software
#                           All rights reserved.
#
# Descripton:   Generic makefile for the SuperVGA Kit. Requires the SciTech
#               Software makefile definitions package to be installed.
#
# $Id: makefile 1.3 1995/09/26 12:23:59 kjb release $
#
#############################################################################

# DOS extender dependant flags

CFLAGS          += $(DX_CFLAGS)
ASFLAGS         += $(DX_ASFLAGS)

# Name of library and object files required to build it

LIBFILE         = svga$L
OBJECTS         = vesavbe$O svgasdk$O _svgasdk$O _linsdk$O              \
                  font8x16$O cpu$O vgapal$O

# Names of all executable files built

.IF $(USE_WIN16)
EXEFILES        = wdtest16$E wdvga16$E
EXELIBS         = ztimer$L wdirec16$L pmpro16$L 
.IF $(USE_CTL3D)
CFLAGS          += -DUSE_CTL3D
EXELIB          += ctl3dv2$L
.ENDIF
.ELIF $(USE_WIN32)
EXEFILES        = wdtest32$E wdvga32$E
EXELIBS         = ztimer$L wdirec32$L pmpro32$L 
.IF $(USE_CTL3D)
CFLAGS          += -DUSE_CTL3D
EXELIB          += ctl3d32$L
.ENDIF
.ELSE
EXEFILES        = svtest$E profile$E
EXELIBS         = ztimer$L
.ENDIF

# Link with UVBELib(tm) device support library if desired

.IF $(USE_UVBELIB)
CFLAGS          += -DUSE_UVBELIB
EXELIBS         += uvbelib$L
.ENDIF

all: $(EXEFILES)

svtest$E: svtest$O tests$O getopt$O $(LIBFILE)
profile$E: profile$O _profile$O getopt$O $(LIBFILE)
hellovbe$E: hellovbe$O
wdtest16$E: wdtest$O tests$O wdtest16$R $(LIBFILE)
wdtest32$E: wdtest$O tests$O wdtest32$R $(LIBFILE)
wdvga16$E: wdvga$O wdvga16$R
wdvga32$E: wdvga$O wdvga32$R

# The following is 4Dos specific!!

smallclean:
    @del *.sym *.bak *.tdk *.map *.dsk *.log
    @except (cpu.* font8x16.* svga.*) del *.obj *.o

# Source files to check in with RCS (RCSFILES_H are in SCITECH\INCLUDE)

RCSFILES        = getopt.c hellovbe.c profile.c svgasdk.c svtest.c tests.c  \
                  version.c vesavbe.c cpu.asm font8x16.asm _linsdk.asm      \
                  _profile.asm _svgasdk.asm getopt.h vgapal.c vbeaf.c       \
                  _vbeaf.asm profall.bat                                    \
                  wdtest.c wdtest.h wdtest16.def wdtest32.def wdtest16.rc   \
                  wdtest32.rc wdvga.c wdvga16.def wdvga32.def wdvga16.rc    \
                  wdvga32.rc
RCSFILES_H      = svga.h vesavbe.h vbeaf.h vbeaf.inc

# Define the list of object files to create dependency information for

DEPEND_OBJ      = $(OBJECTS) svtest$O getopt$O cpu$O profile$O 		\
                  _profile$O hellovbe$O wdtest$O wdvga$O

.INCLUDE: "$(SCITECH)\makedefs\common.mk"

