#******************************************************************************
#  Makefile for the CLOCK\CLOCK02 directory
#
#       SCCSID = @(#)makefile   6.3 92/01/10
#
#       IBM/Microsoft Confidential
#
#       Copyright (c) IBM Corporation 1987, 1989
#       Copyright (c) Microsoft Corporation 1987, 1989
#
#       All Rights Reserved
#
#******************************************************************************

#
# Compiler Location w/ includes, libs and tools
#

H   = ..\..\..\..\h;
H1  = ..\..\..\..\h\version.mak
INC = ..\..\..\..\inc;
LIB = ..\..\..\..\lib;
TOOLSPATH = ..\..\..\..\tools

#
# Since the compiler/linker and other tools use environment
# variables ( INCLUDE, LIB, etc ) in order to get the location of files,
# the following line will check the environment for the LIFE of the
# makefile and will be specific to this set of instructions. All MAKEFILES
# are requested to use this format to insure that they are using the correct
# level of files and tools.
#

!if [set INCLUDE=$(H);$(INC)] || [set LIB=$(LIB)] || [set PATH=$(TOOLSPATH)]
!endif

.SUFFIXES:
.SUFFIXES:      .c .asm .obj .lst .def .lnk .lrf .exe .com

!include      "..\..\..\..\h\version.mak"

DRV=02

ASM=    masm
# d182895 !ifndef smp
AFLAGS= -Mx -t $(GAFLAGS)
# d182895 !else
# d182895 AFLAGS= -Mx -t $(GAFLAGS) -DSMP
# d182895 !endif
AINC=   -I. -I.. -I../../../../inc -I../../../dos/dosinc

######  Definitions for linker

LINK=   link
LFLAGS= /exepack /align:2
LIBS=
LNK=    clock$(DRV).lnk
DEF=    clockdd.def

######  List of object files required

OBJ=    ../clockdd.obj clock$(DRV).obj ../ptdbeep.obj ../clkvdm.obj



#       Rules for generating object and linker response and definition files

.asm.obj:
        $(ASM) $(AFLAGS) $(AINC) -p $*.asm,$*.obj;

.asm.lst:
        $(ASM) -l -n $(AFLAGS) $(AINC) $*.asm;

.lnk.lrf:
        tresp $*.lnk $*.lrf

# Dependency Target Section

!     if [ if exist depchk del depchk dephold depend.mak ] || \
         [ if not exist depend.mak touch depend.mak & $(MAKE) -a depend.mak ]
!     endif


dep:    depend.mak
        -del dephold
        $(MAKE) -$(MAKEFLAGS) all $(MAKEOPTS)


#       Rules for building .exe .com go here

all:    clock$(DRV).sys

clock$(DRV).sys: $(OBJ) $(LIBS) $(LNK) $(DEF)
        $(LINK) $(LFLAGS) @$(LNK);
        mapsym clock$(DRV)

clockdd.def: makefile $(H1)
        @echo Creating file <<$(@B).def
LIBRARY clock$(DRV)
DESCRIPTION '$(FILEVER)'
PROTMODE
SEGMENTS
   CLKDATA   CLASS 'DATA'
   CLKCODE   CLASS 'CODE'
   CLKSWAP   CLASS 'CODE'  IOPL
   IMPORTS
      DOSIODELAYCNT = DOSCALLS.427
<<keep

#****************************************************************************
