#----------------------------------------------------------------------------
# MAKEFILE for the OMNI DRIVER
#
# SCCSID: src/osdd/omni/makefile nextbuild 95/06/09
#
# COMPONENT_NAME: OMNI
#
# FUNCTIONS: OMNI PRESENTATION DRIVER
#
# ORIGINS: Linked to os2
#
# (C) COPYRIGHT International Business Machines Corp. 1992
# All Rights Reserved
# Licensed Materials - Property of IBM
#
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#----------------------------------------------------------------------------
# SUBSYS is a macro to define the name of the subsystem that this makefile is a
# part of.   It is the name of the subdirectory that is above all of the
# individual components.
#
# SUBSYS_RELATIVE is a macro to define the name of this component.
# SRC_RELATIVE is the full path for the current directory from the
# ROOT.
#
# This uses the substitution feature which takes the current directory of
# this makefile (MAKEDIR) and removes the relative part of the directory to
# get the TOP level directory.
#
# The other macros are used to build directories in other levels of the tree.
#------------------------------------------------------------------------------
#
# Usage: For DDK builds please type 'nmake ddkbld=1' from the command line
#
#------------------------------------------------------------------------------

DRIVER       = omni
DRIVER_U     = OMNI
MAKEFILE     = makefile
GPLNAME      = genplib
DDFDIR       = devices
ICODIR       = resource
ECHO         = echo
DEL          = del
COPY         = copy
EA           = $(ROOT)\src\$(SUBSYS)\common\tools\rxea.cmd

!ifndef ddkbld
INCLUDE_HP = 1
!endif

!ifdef ddkbld
DDKBLD       = -DDDKBLD=1
!endif

!ifdef DISABLE_DJP_SUPPORT
CDJPOPTS     = -DDISABLE_DJP_SUPPORT=1
ADJPOPTS     = /DDISABLE_DJP_SUPPORT=1
!endif

#------------------------------------------------------------------------------
# Modified by:
# Description:  Makefile for OMNI PRINTER DRIVER
# Date       :  Jun 9, 1995
#------------------------------------------------------------------------------
# By default use the ibm visual age compiler.

!if "$(USE_IBMCPP)" == ""
!ifndef VACPP_VER
VACPP_VER       = v308
#VACPP_VER       = v36
!endif
COMP_VER_FLAG   = "VACPP_VER=$(VACPP_VER)"
!else
!undef VACPP_VER
COMP_VER_FLAG   = "USE_IBMCPP=1"
!endif

# This will adjust for either the older genplib name, or the
# Visual Age genplib name(genplibv).

!if "$(VACPP_VER)" != ""
GPLNAME_LIB     = genplibv
!else
GPLNAME_LIB     = genplib
!endif

SUBSYS          = osdd
SUBSYS_RELATIVE = omni
SRC_RELATIVE    = src\$(SUBSYS)\$(SUBSYS_RELATIVE)
SRC_NL_RELATIVE = mri\$(NLV)\$(SUBSYS)\$(SUBSYS_RELATIVE)
FMF_PATH        = $(ROOT)\$(SRC_RELATIVE)\devices

USE_IBMC_LIB    = 1

#------------------------------------------------------------------------------
#  Use built in macro "MAKEDIR" to establish "ROOT".  Due to case sensitivity
#  of nmake macro substitution, try all lowercase then all uppercase.  Fail if
#  current working directory path is mixed case.  This is a current nmake
#  limitation on macro substitutions but should not be a problem for most
#  people.  We are searching for a fix to this problem.
#------------------------------------------------------------------------------

ROOT            = $(MAKEDIR:\src\osdd\omni=)
!if "$(ROOT)" == "$(MAKEDIR)"
ROOT            = $(MAKEDIR:\SRC\OSDD\OMNI=)
!endif
!if "$(ROOT)" == "$(MAKEDIR)"
!error Problem setting "ROOT"! Make sure current working directory is either all\
       uppercase or all lowercase!
!endif

#-----------------------------------------------------------------
# Set up component/subsystem specific macros for use in header.mak
# This allows you establish a search order for header and lib paths.  A
# prefix would be a path that you would like to add to the beginning of
# the standard path which is set in header.mak.  A suffix tags onto the
# end of the standard path.
#-----------------------------------------------------------------

#CMP_HDR_PREFIX = <specify non-default path(s) for front of INCLUDE path>
CMP_HDR_PREFIX  =
#CMP_HDR_SUFFIX = <specify non-default path(s) for back INCLUDE path>
CMP_HDR_SUFFIX  = $(ROOT)\SRC\OSDD\$(GPLNAME);$(ROOT)\$(SRC_RELATIVE)
#CMP_LIB_PREFIX = <specify non-default path(s) for front of LIB path>
CMP_LIB_PREFIX  =
#CMP_LIB_SUFFIX = <specify non-default path(s) for back LIB path>
CMP_LIB_SUFFIX  =

#-----------------------------------------------------------------------------
# PUBLIC can be one of "ibmmk", "cps","os2".  Please define the below macros
# if you want to include the public files in a different order.  These macros
# would be used if you have a preference as to which directory gets searched
# first.  For example, you would like to search the OS2 header or include
# files before you search the ibmmk header or include files.  In this case,
# you would specify PUBLIC1 = OS2 and PUBLIC2= IBMMK and PUBLIC3 = CPS.
# These macros are then used in header.mak to set the path order.
#------------------------------------------------------------------------------

PUBLIC1 = os2
#PUBLIC2 = ibmmk
#PUBLIC3 = ibmmk\pns_runtime
#PUBLIC4 = cps

#------------------------------------------------------------------------------
# HOST_PROC and HOST_OS will be set in the environment by the build lab.
# Set them in your private builds.
# Please don't set these variables in the public build.
# HOST_PROC=386
# HOST_OS=OS2
#-----------------------------------------------------------------------------

!ifndef HOST_PROC
HOST_PROC=386
HOST_OS=os2
!endif

#
# Use CSD 11 of CSET/2  Note: valid levels are CSD 9 and CSD 11
# These levels are specified in \cosdd\tools\os2.386\lx.386\bin\tools.mak
# Both a set and a !if [set ...] need to happen for some reason.
#
CSET_VER=11
!if [set CSET_VER=11]
!endif

#------------------------------------------------------------------------------
# header.mak is the public makefile that sets up all paths and options.  It
# should not be altered.  Additions or changes to header.mak for a component
# can be overwritten in this makefile.  Additions or changes to header.mak
# for an entire subsystem can be overwritten in subsys.mak
#-----------------------------------------------------------------------------

!include $(ROOT)\header.mak

!include $(ROOT)\src\$(SUBSYS)\common\version.mak

#-------------------------------------------------------------------------
# subsys.mak is used as a way for each subsystem to override any settings
# that were set in header.mak.  It is owned by development.
#-------------------------------------------------------------------------
!include $(ROOT)\src\$(SUBSYS)\common\subsys.mak

!if "$(TARGET_PROC)"=="ppc"
EXT = prv
!else
EXT = drv
!endif

CDEFINEFOREIGN = -DFOREIGN=1
ADEFINEFOREIGN = /DFOREIGN=1

# in src/osdd/genplib/dbcs.c the code that uses CNVCALLS.STRCODECONVERT is
# included only for Taiwan builds.  I do not know why Japan and Korea uses
# CNVCALLS for the omni driver
INCL_CNVCALLS = 0

# In order to build a non-us build:
#    All you have to do is set NLV=xx from the command line
#    and rebuild genplib and omni
#
# From c.pc src/public/include/os2c/16bit/preipfc.mak
#      \cosdd\rel\os2c\include\base\os2\16bit\preipfc.mak
#      \cosdd\tools\os2.386\bin\preipfc.mak
#
#  c.nlv.*
#  $(NLV)  $(L) $(P) $(C) Description              Locale Alt  Oth Wind Warp 4 FP Warp 3 FP CSD
#  ------  ---- ---- ---- ------------------------ ------ ---  --- ---- --------- --------- ---
#  ar      ARA  864  785  Arabic/Egypt             ar_AA                AR                  A
#  bg      BGR  915  359  Bulgarian/Bulgaria       bg_BG  850  855 1251                     4
#  br      PTB  850  55   Portuguese/Brazil        pt_BR  437      1252 BR        BR        B
#  cf      FRA  437  33   French/Canada            fr_CA  863 1004 1252                    C
#  ca      CAT  850  034  Catalan/Spain            ca_ES  437 1004 1252                     3
#  ce                     Central European English                      CE                  0
#  cn      PRC  1381 086  Simplified Chinese/PRC          946                               M
#  cx      PRC  1886 086  Chinese GBK                     946       936                     6
#  cz      CZE  852  421  Czech/Czech Republic     cs_CZ  850      1250 CZ                  Z
#  de      DEU  850  49   German/Germany           de_DE  437 1004 1252 DE        GR        G
#  dk      DAN  850  45   Danish/Denmark           da_DK      1004 1252 DK        DK        D
#  en      ENU  437  1    English/North America    en_US  437 1004 1252 US        US        0 or _
#  es      ESP  850  34   Spanish/Spain            es_ES  437 1004 1252 ES        SP        S
#  fi      FIN  850  358  Finnish/Finland          fi_FI  437 1004 1252 FI        SU        L
#  fr      FRA  437  33   French/France            fr_FR  437 1004 1252 FR        FR        F
#  gk      ELL  813  030  Greek/Greece             el_GR  813      1253 GK                  K
#  ge      ENU  869  030  Greek/English            el_US                GE                  5
#  he      HEB  862  972  Hebrew/Israel            iw_IL                                    E
#  hu      HUN  852  036  Hungarian/Hungary        hu_HU  850      1250 HU                  Y
#  it      ITA  437  39   Italian/Italy            it_IT  437 1004 1252 IT        IT        I
#  jp      JPN  932  81   Japanese/Japan           ja_JP            932 JP        JP        J
#  ko      KOR  949  082  Korean/Korea             ko_KR  944       949                     Q
#  lt           921  82   Lithuanian/Lithuania     lt_LT  850      1257 LT                  7
#  nl      NLD  850  31   Dutch/Netherlands        nl_NL                NL        NL        H
#  no      NOR  850  47   Norweigian/Norway        no_NO                NO        NO        N
#  pl      POL  852  048  Polish/Poland            pl_PL                PL                  O
#  pt      PTG  850  351  Portuguese/Portugul      pt_PT                PT        PO        P
#  ru      RUS  866  007  Russian/Russia           ru_RU                RU                  R
#  sl      SLO  852  386  Slovenian/Slovenia       sl_SI                                    2
#               852  422  Slovenian/Slovenia       sk_SK
#  sv      SVE  850  46   Swedish/Sweden           sv_SE                SW        SV        W
#  th      THI  874  066  Thai/Thailand            th_TH                TH                  V
#  tr      TRK  857  090  Turkish/Turkey           tr_TR                TR                  1
#  tw      CHT  950  088  Trad. Chinese/Taiwan     zh_TW                                    T
#  uk      ENG  850  044  English/Great Britain    en_GB                UK        UK        U

#!if ( "$(L)"=="ENU" && ( "$(NLV)" == "EN" || "$(NLV)" == "en" ) )
!if ( "$(NLV)" == "EN" || "$(NLV)" == "en" )
CDEFINEFOREIGN = -DFOREIGN=0
ADEFINEFOREIGN = /DFOREIGN=0
!endif

#!if ( "$(L)"=="JPN" && ( "$(NLV)" == "jp" || "$(NLV)" == "JP" ) )
!if ( "$(NLV)" == "jp" || "$(NLV)" == "JP" )
JPNBLD  = -DJPNBLD=1
DBCSFLAG = /Sn+
#INCL_CNVCALLS = 1
!endif

# <TWN> Define TWNBLD
#!if ( "$(L)"=="CHT" && ( "$(NLV)" == "tw" || "$(NLV)" == "TW" ) )
!if ( "$(NLV)" == "tw" || "$(NLV)" == "TW" )
TWNBLD  = -DTWNBLD=1
INCL_CNVCALLS = 1
!endif

#  ko     KOR  949  082  Korean/Korea
!if ( "$(NLV)" == "ko" || "$(NLV)" == "KO" )
KORBLD  = -DKORBLD=1
#INCL_CNVCALLS = 1
!endif

PRIV_HDR  = $(ROOT)\$(SRC_RELATIVE)

#-------------------------------------------------------------------------
# Insert any paths or macros that weren't defined in header.mak or
# subsys.mak here.
#--------------------------------------------------------------------------

MRIPATH = $(ROOT)\$(SRC_NL_RELATIVE)
OUTDIR  = $(DRIVERS_NLV)\$(SUBSYS_RELATIVE)
TOOLDIR = $(ROOT)\src\$(SUBSYS)\common\tools
PRDESC  = $(O)\..\prdesc\$(NLV)

!if "$(TARGET_PROC)"=="ppc"
GENPLIB = $(O)\..\$(GPLNAME)\$(NLV)\libgenp.a
!else
GENPLIB = $(O)\..\$(GPLNAME)\$(NLV)\$(GPLNAME_LIB).lib
!endif

# @Booklet
GPLMRI    = $(MRIPATH)\..\DRVMRI

#----------------------------------------------------------------
# Set up the list of suffixes, if the suffixes in header.mak are not
# sufficient.  Be sure to include the entire list.
#-----------------------------------------------------------------

.SUFFIXES:
.SUFFIXES: .c .cpp .asm .h .inc .obj .def .dll .lib .o .res .rc .drv .map .sym

#------------------------------------------------------------------------
# Please define all compiler, assembler, and linker flags here.
# Use if statement to define the flags for each type of builds.
# See $(ROOT)\src\$(SUBSYS)\common\subsys.mak for defines.
#------------------------------------------------------------------------

# PPC pragma defintions are:
#   88 - Expression has no side-effects.
#  257 - '=' encountered where '==' may have been intended.
#  290 - Static function is not referenced.
#  587 - Linkage pragma not supported yet.
#  652 - Variable is never used.

!if "$(TARGET_PROC)"=="ppc"
!    if "$(BLD_TYPE)"=="retail"
DBG_CFLAGS=
!    else
DBG_CFLAGS= -g
!    endif

# <TWN> Add $(TWNBLD)
CFLAGS = -c $(SYSTEM_CFLAGS) $(MW_IBMC_DEFS) $(DBG_CFLAGS) -o $@ -D_OS2 -DMACH \
         -DSWITCH -DINCL_32 -DWPOS_BLD -DIBMC -DPPC -DUNIX_BUILD -D__GNUASM \
         -DPOWERPC -DMETAWARE -DMACH_IPC_TYPED=0 \
         $(CDEFINEFOREIGN) $(DDKBLD) $(JPNBLD) $(TWNBLD) $(KORBLD) \
         -Hpragma=Offwarn(88,257,290,587,652) -pic -Hon=Char_default_unsigned \
         -Hpragma=os_id(4) -HL -Hinlsize=300 -Hon=Char_is_rep

CFLAGSEXE = $(CFLAGS)

!else

!if "$(VACPP_VER)" != ""
!ifndef ddkbld 
WARN_CFLAGS    = /W3 /Wgen+ /Wext- /Wrea+ /Wuse+ /Wcnd+
!else
WARN_CFLAGS    = /W0
!endif
!if (  ("$(VACPP_VER)" == "v304") \
    || ("$(VACPP_VER)" == "v306") \
    || ("$(VACPP_VER)" == "v308") \
    )
VACPP_CDEFINES = /D_V3_CRT_=1
!else
# cpprns36 does not have a run time library to init
VACPP_CDEFINES =
!endif
!else
WARN_CFLAGS    = /W3 /Kb+
VACPP_CDEFINES =
!endif

!if "$(INCLUDE_HP)" == "1"
HPBLD      = /DHPBUILD=1
!else
HPBLD      =
!endif

!    if "$(BLD_TYPE)"=="retail"
# <TWN> Add $(TWNBLD)
CDEFINES   = /DINCL_32=1 $(CDEFINEFOREIGN) $(VACPP_CDEFINES) \
             $(DDKBLD) $(JPNBLD) $(TWNBLD) $(KORBLD) $(CDJPOPTS) \
             /DTIFFDEVICE=1 $(HPBLD)
ADEFINES   = /DINCL_32=1 $(ADEFINEFOREIGN) $(ADJPOPTS)
DBG_CFLAGS =
DBG_LFLAGS =
RET_CFLAGS = /O+
RET_LFLAGS = /PACKCODE
!    else
# <TWN> Add $(TWNBLD)
CDEFINES   = /DDEBUG=1 /DINCL_32=1 $(CDEFINEFOREIGN) $(VACPP_CDEFINES) \
             $(DDKBLD) $(JPNBLD) $(TWNBLD) $(KORBLD) $(CDJPOPTS) \
             /DTIFFDEVICE=1 $(HPBLD)
ADEFINES   = /DDEBUG=1 /DINCL_32=1 $(ADEFINEFOREIGN) $(ADJPOPTS)
DBG_CFLAGS = /O- /Ti+
DBG_LFLAGS = /CODEView
RET_CFLAGS =
RET_LFLAGS =
!    endif

# @RICOH add $(DBCSFLAG)
CFLAGS    = /c /Gd- /Ss /Gm+ /Q+ $(DBCSFLAG) $(WARN_CFLAGS) /Ge- /Ms $(RET_CFLAGS) $(DBG_CFLAGS)

!if "$(VACPP_VER)" != ""
LFLAGS    = /nod /map /noe $(RET_LFLAGS) $(DBG_LFLAGS) /IGnorecase
!else
LFLAGS    = /nod /map /noe $(RET_LFLAGS) $(DBG_LFLAGS)
!endif

LIBOS2    = $(R206_LIB)\os2386.lib
LIBOS2P   = $(R206_LIB)\os2386p.lib

!if "$(VACPP_VER)" != ""
!if (  ("$(VACPP_VER)" == "v304") \
    || ("$(VACPP_VER)" == "v306") \
    || ("$(VACPP_VER)" == "v308") \
    )
CLIBSDLL  = $(COMPILER_LIB)\cppom30.lib
!else
CLIBSDLL  = $(COMPILER_LIB)\cpprns36.lib  # cpiors40 cpiorn40 cpiorm40 cpprsi36 cpprni36 cpprmi36
!endif
!else
CLIBSDLL  = $(COMPILER_LIB)\dde4nbs.lib
!endif
!endif

!if "$(INCLUDE_HP)" == "1"
HPLIB = $(O)\hplib.lib
!endif

#--------------------------------------------------------------------------
# If the Inference rules defined in header.mak are not sufficient, then
# define the inference rules necessary at this point.
# The following inference rules are just an example.
# You can delete this section if you don't need to add more inference rules.
#-------------------------------------------------------------------------

.c{$(O)}.obj:
        $(CC) $(CDEFINES) $(DBG_CFLAGS) $(CFLAGS) /Fo$*.obj $(@B).c

.c{$(O_NLV)}.obj:
        $(CC) $(CDEFINES) $(DBG_CFLAGS) $(CFLAGS) /Fo$*.obj $(@B).c

.c.lst:
        $(CC) $(CDEFINES) /C+ /Fo- /Labejs $(DBG_CFLAGS) $(CFLAGS) $(@B).c

.c.i:
        $(CC) $(CDEFINES) /C+ /Fo- /P+ $(DBG_CFLAGS) $(CFLAGS) $(*B).c

.c.cod:
        $(CC) $(CDEFINES) /C+ /Fo- /Fa$(*B).cod $(DBG_CFLAGS) $(CFLAGS) $(*B).c

.asm{$(O)}.obj:
        $(AS) $(ADEFINES) $(@B).asm,$(O)\$(@B).obj;

.asm.lst:
        $(AS) $(ADEFINES) -d -la $(@B).asm,$(O)\$(@B).obj;

.asm.cod:
        $(AS) /l $(ADEFINES) $(@B).asm,nul;

#
# In the case of fast computers, the symbol file can have the same date as
# the map file.  So to be safe, bump the time up to avoid a rebuild of the
# symbol file.
#
{$(O_NLV)}.map{$(OUTDIR)}.sym:
        cd $(@D)
        $(MAPSYM) $(O_NLV)\$(@B).map
        bumptime $@ 2 seconds
        $(EA) -e .VERSION=$(_VERSION21) $(@B).sym
        cd $(ROOT)\$(SRC_RELATIVE)

#------------------------------------------------------------------------
#Component defines start here. Example of some defines are attached in
#this template
#------------------------------------------------------------------------

LIBSDLL = $(LIBOS2) $(CLIBSDLL) $(GENPLIB) $(HPLIB)

OBJ01     = $(O)\attrib.obj     $(O)\bitmap.obj       $(O)\clrtable.obj
OBJ02     = $(O)\connect.obj    $(O)\devfunc2.obj     $(O)\devfunc3.obj
OBJ03     = $(O)\devmisc.obj    $(O_NLV)\dlg.obj      $(O_NLV)\driver.obj
OBJ04     = $(O_NLV)\enable.obj $(O_NLV)\escape.obj   $(O)\fonts.obj
OBJ05     = $(O_NLV)\forms.obj  $(O)\handler.obj      $(O)\djp.obj
OBJ06     = $(O)\helper.obj     $(O_NLV)\initterm.obj $(O)\line.obj
OBJ07     = $(O)\marker.obj     $(O_NLV)\medias.obj   $(O)\help.obj
OBJ08     = $(O)\newframe.obj   $(O)\common.obj       $(O)\query.obj
OBJ09     = $(O)\surface.obj    $(O)\text.obj         $(O_NLV)\trays.obj

# PAGE_TUNE - add ptune
OBJ10     = $(O)\ptune.obj

!ifndef DDKBLD
DEVFILES  = $(DDFDIR)\canon.c     \
            $(DDFDIR)\deskjet.c   \
!if "$(INCLUDE_HP)" == "1"
            $(DDFDIR)\hpdeskjt.c  \
!endif
            $(DDFDIR)\epson.c     \
            $(DDFDIR)\epsdev.h    \
            $(DDFDIR)\ibmxx.c     \
            $(DDFDIR)\laserjet.c  \
            $(DDFDIR)\lexmark.c   \
            $(DDFDIR)\olivetti.c  \
            $(DDFDIR)\paintjet.c  \
            $(DDFDIR)\passthru.c  \
            $(DDFDIR)\seiko.c     \
            $(DDFDIR)\seikhelp.h  \
            $(DDFDIR)\seikhelp.c  \
            $(DDFDIR)\ccitt.c     \
!ifdef JPNBLD
            $(DDFDIR)\deskjetj.c  \
            $(DDFDIR)\escpage.h   \
            $(DDFDIR)\escpage.c   \
            $(DDFDIR)\lips.h      \
            $(DDFDIR)\lips.c      \
            $(DDFDIR)\pages.h     \
            $(DDFDIR)\pages.c     \
            $(DDFDIR)\rpdl.h      \
            $(DDFDIR)\rpdl.c      \
!endif
!ifdef KORBLD
            $(DDFDIR)\ks.c        \
            $(DDFDIR)\kssm.c      \
!endif
#           $(DDFDIR)\tiff.c      \
#           $(DDFDIR)\alps.c
            $(DDFDIR)\tiff.c
!else
DEVFILES  = $(DDFDIR)\samp_pcl.c  \
            $(DDFDIR)\samp_eps.c  \
            $(DDFDIR)\tiff.c
!endif

#--------------------------------------------------------------------------

# Files to keep (that is, not delete)
SRCRESOURCES = driver.rc driverjp.rc ddk.rc

!ifndef DDKBLD
!ifdef JPNBLD
MAINRCFILE   = $(ROOT)\$(SRC_RELATIVE)\driverjp.rc
!else
MAINRCFILE   = $(ROOT)\$(SRC_RELATIVE)\driver.rc
!endif
!else
MAINRCFILE   = $(ROOT)\$(SRC_RELATIVE)\ddk.rc
!endif

!ifndef DDKBLD

# @RICOH add rpdl.rc rpdl.h rpdl.dlg
DEVRESOURCES = \
               $(ROOT)\$(SRC_NL_RELATIVE)\deskjet.rc \
               $(ROOT)\$(SRC_RELATIVE)\$(DDFDIR)\deskjet.h \
               $(ROOT)\$(SRC_NL_RELATIVE)\deskjet.dlg \
               $(ICODIR)\djhorz.bmp \
               $(ICODIR)\djvert.bmp \
               $(ICODIR)\djalignc.bmp \
               $(ICODIR)\djclean.bmp \
               $(ICODIR)\djclean2.bmp \
               $(ICODIR)\both.pcl \
               $(ICODIR)\complete.pcl \
               $(ICODIR)\align_dw.pcl \
               $(ICODIR)\align_bw.pcl \
               $(ICODIR)\comp_dw.pcl \
               $(ICODIR)\djtest.pcl \
               $(ICODIR)\clean1.pcl \
               $(ICODIR)\clean2.pcl \
               $(ICODIR)\clean3.pcl \
               $(ROOT)\$(SRC_NL_RELATIVE)\canon.rc \
               $(ROOT)\$(SRC_RELATIVE)\$(DDFDIR)\canon.h \
               $(ROOT)\$(SRC_NL_RELATIVE)\canon.dlg \
               $(ICODIR)\alig7_1.bmp\
               $(ICODIR)\alig7_2.bmp\
               $(ICODIR)\alig8_1.bmp\
               $(ICODIR)\alig8_2.bmp\
               $(ICODIR)\alig85_1.bmp\
               $(ICODIR)\alig85_1.bmp\
!ifdef JPNBLD
               $(ROOT)\$(SRC_NL_RELATIVE)\escpage.rc \
               $(ROOT)\$(SRC_RELATIVE)\$(DDFDIR)\escpage.h \
               $(ROOT)\$(SRC_NL_RELATIVE)\escpage.dlg \
               $(ROOT)\$(SRC_NL_RELATIVE)\lips.rc \
               $(ROOT)\$(SRC_RELATIVE)\$(DDFDIR)\lips.h \
               $(ROOT)\$(SRC_NL_RELATIVE)\lips.dlg \
               $(ROOT)\$(SRC_NL_RELATIVE)\pages.rc \
               $(ROOT)\$(SRC_RELATIVE)\$(DDFDIR)\pages.h \
               $(ROOT)\$(SRC_NL_RELATIVE)\pages.dlg \
               $(ROOT)\$(SRC_NL_RELATIVE)\rpdl.rc \
               $(ROOT)\$(SRC_RELATIVE)\$(DDFDIR)\rpdl.h \
               $(ROOT)\$(SRC_NL_RELATIVE)\rpdl.dlg \
               $(ICODIR)\jpn\nup1.ico    \
               $(ICODIR)\jpn\nup21.ico    \
               $(ICODIR)\jpn\nup22.ico    \
               $(ICODIR)\jpn\nup41.ico    \
               $(ICODIR)\jpn\nup42.ico    \
               $(ICODIR)\jpn\nup43.ico    \
               $(ICODIR)\jpn\nup44.ico    \
               $(ICODIR)\jpn\nup61.ico    \
               $(ICODIR)\jpn\nup62.ico    \
               $(ICODIR)\jpn\nup63.ico    \
               $(ICODIR)\jpn\nup64.ico    \
               $(ICODIR)\jpn\nup81.ico    \
               $(ICODIR)\jpn\nup82.ico    \
               $(ICODIR)\jpn\nup83.ico    \
               $(ICODIR)\jpn\nup84.ico    \
               $(ICODIR)\jpn\nup91.ico    \
               $(ICODIR)\jpn\nup92.ico    \
               $(ICODIR)\jpn\nup93.ico    \
               $(ICODIR)\jpn\nup94.ico    \
               $(ICODIR)\jpn\nup161.ico    \
               $(ICODIR)\jpn\nup162.ico    \
               $(ICODIR)\jpn\nup163.ico    \
               $(ICODIR)\jpn\nup164.ico    \
               $(ICODIR)\jpn\punch01.ico \
               $(ICODIR)\jpn\punch02.ico \
               $(ICODIR)\jpn\punch03.ico \
               $(ICODIR)\jpn\sort01.ico \
               $(ICODIR)\jpn\sort02.ico \
               $(ICODIR)\jpn\sort03.ico \
               $(ICODIR)\jpn\staple01.ico \
               $(ICODIR)\jpn\staple02.ico \
               $(ICODIR)\jpn\staple03.ico \
               $(ICODIR)\jpn\staple04.ico \
               $(ICODIR)\jpn\staple05.ico \
               $(ICODIR)\jpn\staple06.ico \
               $(ICODIR)\jpn\staple07.ico \
               $(ICODIR)\jpn\staple08.ico \
               $(ICODIR)\jpn\staple09.ico \
               $(ICODIR)\jpn\staple10.ico \
               $(ICODIR)\jpn\staple11.ico \
               $(ICODIR)\jpn\staple12.ico \
               $(ICODIR)\jpn\staple13.ico \
               $(ICODIR)\jpn\staple14.ico \
               $(ICODIR)\jpn\staple15.ico \
               $(ICODIR)\jpn\staple16.ico \
!endif
               $(ROOT)\$(SRC_NL_RELATIVE)\passthru.dlg \
               $(ROOT)\$(SRC_NL_RELATIVE)\lexmark.dlg \
# @Booklet
               $(GPLMRI)\omnibook.rc
!else

DEVRESOURCES =

!endif

MODSINHPLIB = $(O)\hplib.obj $(O)\hplib2.obj

#--------------------------------------------------------------------------

!if "$(BLD_TYPE)"=="debug"
OBJ11     = $(O_NLV)\debug.obj
!endif

!if "$(TARGET_PROC)"=="ppc"
OBJ12     = $(O_NLV)\$(DRIVER).o
!else
OBJ12     = $(O)\util.obj
!endif

#---------------------------------------------------------------------------

OMNIOBJS  = $(OBJ01) $(OBJ02) $(OBJ03) $(OBJ04) $(OBJ05) \
            $(OBJ06) $(OBJ07) $(OBJ08) $(OBJ09) $(OBJ10) \
            $(OBJ11) $(OBJ12)

#-----------------------------------------------------------------------------
# The all target is used to specify a list of targets that need to be built
# Please don't delete "dep" from the target list.  It is used to generate the
# depend.mak file
# Please look at the example for more details.
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
# We need to recurse yet another time because nmaking all or dep will generate
# a new set of depend*.mak files but before we create them, we !include
# the old set.  Therefore, nmake the rest of the driver after dependencies
# have been generated!
#-----------------------------------------------------------------------------
all:     dep
        @$(MAKE) $(MAKE_OPTS) -f $(MAKEFILE_NAME) nodep

!if "$(TARGET_PROC)"=="ppc"
nodep:   $(OUTDIR)\$(DRIVER).$(EXT) \
         $(OUTDIR)\$(DRIVER).hlp    \
         $(PRDESC)\$(DRIVER).lst    \
         copyfmf
!else
nodep:   $(OUTDIR)\$(DRIVER).$(EXT) \
         $(OUTDIR)\$(DRIVER).hlp    \
         $(OUTDIR)\$(DRIVER).sym    \
         $(PRDESC)\$(DRIVER).lst    \
         copyfmf
!endif

# generated on the fly below!
#
#copyfmf:
#    $(MAKEPATH) $(OUTDIR)
#    -copy $(DDFDIR)\*.FMF $(OUTDIR)\*.FMF
#
#$(O_NLV)\driver.obj: driver.c $(DEVFILES) def.h driver.h funcs.h
#        $(CREATE_PATH)
#        $(CC) $(CDEFINES) $(DBG_CFLAGS) $(CFLAGS) /Fo$*.obj driver.c

$(PRDESC)\$(DRIVER).lst: $(OUTDIR)\$(DRIVER).$(EXT)
        $(CREATE_PATH)
!if "$(TARGET_PROC)"=="ppc"
        -$(COPY) $(ROOT)\obj\os2c\$(BLD_TYPE)\osdd\prdesc\$(NLV)\$(DRIVER).lst $(PRDESC)\$(DRIVER).tmp
        -sed /.DRV/s//.PRV/ $(PRDESC)\$(DRIVER).tmp > $(PRDESC)\$(DRIVER).lst
        -erase $(PRDESC)\$(DRIVER).tmp
!ifdef INSTPATH
        -$(COPY) $(RROOT_W)\rel\os2c\$(BLD_TYPE)\$(NLV)\$(INSTPATH)\os2\drivers\$(SUBSYS_RELATIVE)\$(DRIVER).ea $(OUTDIR)
!else
        -$(COPY) $(RROOT_W)\rel\os2c\$(BLD_TYPE)\$(NLV)\os2\drivers\$(SUBSYS_RELATIVE)\$(DRIVER).ea $(OUTDIR)
!endif
        -eautil $(OUTDIR)\$(DRIVER).$(EXT) $(OUTDIR)\$(DRIVER).ea  /j /o /p
!else
        -..\common\tools\devnames -e$(OUTDIR)\$(DRIVER).$(EXT) > $(PRDESC)\$(DRIVER).tmp
        -sed -e /$(DRIVER)/s//$(DRIVER_U)/ -e /.drv/s//.DRV/ $(PRDESC)\$(DRIVER).tmp > $(PRDESC)\$(DRIVER).lst
        -erase $(PRDESC)\$(DRIVER).tmp
!endif

!if "$(TARGET_PROC)"=="ppc"
$(O_NLV)\$(DRIVER).o: \
!else
$(O_NLV)\driver.res: \
!endif
            $(MAINRCFILE)                            \
            $(ROOT)\$(SRC_RELATIVE)\device.h         \
            $(ROOT)\$(SRC_RELATIVE)\def.h            \
            $(ROOT)\$(SRC_NL_RELATIVE)\$(DRIVER).dlg \
            $(ROOT)\$(SRC_NL_RELATIVE)\$(DRIVER).rc  \
            $(ICODIR)\dplxbook.ico                   \
            $(ICODIR)\dplxflip.ico                   \
            $(ICODIR)\dplxone.ico                    \
            $(ICODIR)\landscap.ico                   \
            $(ICODIR)\portrait.ico                   \
            $(ICODIR)\gamma.bmp                      \
            $(DEVRESOURCES)
        $(CREATE_PATH)
        -@cd $(O_NLV)
        copy $(ROOT)\$(SRC_NL_RELATIVE)\*.rc  .
        copy $(ROOT)\$(SRC_NL_RELATIVE)\*.dlg .
        copy $(GPLMRI)\omnibook.rc            .
        copy $(GPLMRI)\gplweb.rc              .
        copy $(GPLMRI)\gpl_*.bmp              .
!if "$(TARGET_PROC)"=="ppc"
        $(MRES)  -D _I386=1 _OS2=1 -As,$(MAINRCFILE) -- $(O_NLV)\$(DRIVER).o
!else
        $(RC) -cp $(P) -cc $(C) $(CDEFINES) -r $(MAINRCFILE) $(O_NLV)\driver.res
!endif
        @del *.rc
        @del gpl_*.bmp
        @del *.dlg
        -@cd $(ROOT)\$(SRC_RELATIVE)

$(OUTDIR)\$(DRIVER).sym: $(O_NLV)\$(DRIVER).map

$(OUTDIR)\$(DRIVER).hlp: $(ROOT)\$(SRC_NL_RELATIVE)\$(DRIVER).ipf def.h $(GPLMRI)\omnibook.itl $(GPLMRI)\gplweb.itl
        -@cd $(ROOT)\$(SRC_NL_RELATIVE)
        $(IPF) $(ROOT)\$(SRC_NL_RELATIVE)\$(DRIVER).ipf /l=$(L) /codepage=$(P) /country=$(C)
        copy $(ROOT)\$(SRC_NL_RELATIVE)\$(DRIVER).hlp $(OUTDIR)\$(DRIVER).hlp
        del $(ROOT)\$(SRC_NL_RELATIVE)\$(DRIVER).hlp
        -@cd $(ROOT)\$(SRC_RELATIVE)

#
# Ok.  Here is what I am trying to accomplish.  In the old makefile, the OMNI
# driver is dependant on a list of items and the def file was only dependant
# on the makefile.  Now, the omni driver is dependant only on the def file
# and the def file is dependant on everything.  That way, if the omni driver
# is going to be built because some file changed, then the def file will
# always be generated.
#
$(O_NLV)\$(DRIVER).def:     makefile \
!if "$(TARGET_PROC)"=="ppc"
                            $(OMNIOBJS) \
                            $(LIBSDLL)
!else
                            $(OMNIOBJS) \
                            $(O_NLV)\driver.res \
                            $(LIBSDLL) \
                            setea.cmd
!endif
!if "$(TARGET_PROC)"=="ppc"
# Power-PC build
        @echo Create DEF file <<$(O_NLV)\$(DRIVER).def
LIBRARY OMNI INITINSTANCE TERMINSTANCE
DESCRIPTION '$(FILEVER21) OMNI PRINTER DEVICE DRIVER DYNA-LINK'

PROTMODE

DATA SINGLE READWRITE LOADONCALL

CODE LOADONCALL

SEGMENTS
  Global      CLASS  'DATA' SHARED
  PerProcess  CLASS  'DATA' NONSHARED

EXPORTS
  OS2_PM_DRV_DEVMODE          @201
  OS2_PM_DRV_DEVICENAMES      @202
  OS2_PM_DRV_ENABLE           @200
  OS2_PM_DRV_POSTESCAPE       @206
  JobPropertiesDlgProc        @204
  DrvInstall                  @203
  QueryTunerProcData          @205

IMPORTS
  Debug32Output       = PMWIN.955
  InnerGre32Entry2    = PMGRE.72
  InnerGre32Entry3    = PMGRE.73
  InnerGre32Entry4    = PMGRE.74
  InnerGre32Entry5    = PMGRE.75
  InnerGre32Entry6    = PMGRE.76
  InnerGre32Entry7    = PMGRE.77
  InnerGre32Entry8    = PMGRE.78
  InnerGre32Entry9    = PMGRE.79
  InnerGre32Entry10   = PMGRE.80
<<keep
!else
!if "$(VACPP_VER)" != ""
#Intel Visual Age build
        @echo Create DEF file <<$(O_NLV)\$(DRIVER).def
LIBRARY $(DRIVER) INITINSTANCE TERMINSTANCE
DESCRIPTION '$(FILEVER21) $(DRIVER) PRINTER DEVICE DRIVER DYNA-LINK'

PROTMODE

DATA MULTIPLE READWRITE LOADONCALL

CODE LOADONCALL

SEGMENTS
  Global      CLASS  'DATA' SHARED
  PerProcess  CLASS  'DATA' NONSHARED

EXPORTS
  OS2_PM_DRV_DEVMODE
  OS2_PM_DRV_DEVICENAMES
  OS2_PM_DRV_ENABLE
  OS2_PM_DRV_POSTESCAPE
  JobPropertiesDlgProc
  DrvInstall
  QueryTunerProcData

IMPORTS
  Debug32Output       = PMWIN.955
  DosQueryModFromEIP  = DOSCALL1.360
  InnerGre32Entry2    = PMGRE.72
  InnerGre32Entry3    = PMGRE.73
  InnerGre32Entry4    = PMGRE.74
  InnerGre32Entry5    = PMGRE.75
  InnerGre32Entry6    = PMGRE.76
  InnerGre32Entry7    = PMGRE.77
  InnerGre32Entry8    = PMGRE.78
  InnerGre32Entry9    = PMGRE.79
  InnerGre32Entry10   = PMGRE.80
<<keep
!else
# Intel C-Set build
        @echo Create DEF file <<$(O_NLV)\$(DRIVER).def
LIBRARY $(DRIVER) INITINSTANCE TERMINSTANCE
DESCRIPTION '$(FILEVER21) $(DRIVER) PRINTER DEVICE DRIVER DYNA-LINK'

PROTMODE

DATA SINGLE READWRITE LOADONCALL

CODE LOADONCALL

SEGMENTS
  Global      CLASS  'DATA' SHARED
  PerProcess  CLASS  'DATA' NONSHARED

EXPORTS
  OS2_PM_DRV_DEVMODE
  OS2_PM_DRV_DEVICENAMES
  OS2_PM_DRV_ENABLE
  OS2_PM_DRV_POSTESCAPE
  JobPropertiesDlgProc
  DrvInstall
  QueryTunerProcData

IMPORTS
  Debug32Output       = PMWIN.955
  DosQueryModFromEIP  = DOSCALL1.360
  InnerGre32Entry2    = PMGRE.72
  InnerGre32Entry3    = PMGRE.73
  InnerGre32Entry4    = PMGRE.74
  InnerGre32Entry5    = PMGRE.75
  InnerGre32Entry6    = PMGRE.76
  InnerGre32Entry7    = PMGRE.77
  InnerGre32Entry8    = PMGRE.78
  InnerGre32Entry9    = PMGRE.79
  InnerGre32Entry10   = PMGRE.80
<<keep
!endif
!endif
!if "$(INCL_CNVCALLS)"=="1"
    echo     CNVCALLS.STRCODECONVERT >> $(O_NLV)\$(DRIVER).def
!endif

!if "$(TARGET_PROC)"=="ppc"
$(OUTDIR)\$(DRIVER).$(EXT): $(O_NLV)\$(DRIVER).def
        $(CREATE_PATH)
        $(LINK) $(DLL_LFLAGS) @<<$(O_NLV)\$(DRIVER).lnk
$(DLL_INIT)
$(OMNIOBJS: =^
)
$(HCLIB)
-L$(GENPLIB)
-lgenp
$(CRT_VER_LIB)
-los2
-los2p
$(DLL_FINI)
-o $(OUTDIR)\$(@B).$(EXT)
-i $(O_NLV)\$(DRIVER).def
<<keep
!else
# <TWN> Import CNVCALLS.STRCODECONVERT
$(OUTDIR)\$(DRIVER).$(EXT): $(O_NLV)\$(DRIVER).def
        $(CREATE_PATH)
        -del $(OUTDIR)\$(DRIVER).$(EXT) 2>&1 > nul
        $(LINK) $(LFLAGS) @<<$(O_NLV)\$(DRIVER).RSP
$(OMNIOBJS:.obj=.obj+
)
$(OUTDIR)\$(DRIVER).dll
$(O_NLV)\$(DRIVER).map
$(LIBSDLL)
$(O_NLV)\$(DRIVER).def
<<keep
        -@ren $(OUTDIR)\$(DRIVER).dll $(DRIVER).$(EXT) 2>&1 > nul
        bumptime $@ 2 seconds
        $(RC) $(CDEFINES) $(O_NLV)\driver.res $(OUTDIR)\$(DRIVER).$(EXT)
        setea.cmd $(OUTDIR)\$(DRIVER) $(_VERSION21) $(TOOLDIR)
        eautil $(OUTDIR)\$(DRIVER).$(EXT) $(OUTDIR)\$(DRIVER).ea /s /p /r
!endif

!if "$(INCLUDE_HP)" == "1"

!if "$(HPBUILD)" == "1"

$(O)\hplib.obj:      $(ROOT)\$(SRC_RELATIVE)\$(DDFDIR)\hplib\hplib.c \
                     $(ROOT)\$(SRC_RELATIVE)\$(DDFDIR)\hplib\hplib.h \
                     $(ROOT)\$(SRC_RELATIVE)\$(DDFDIR)\hplib\hplibint.h
        $(CC) $(CDEFINES) $(DBG_CFLAGS) $(CFLAGS) /Fo$*.obj $(DDFDIR)\hplib\$(@B).c

$(O)\hplib2.obj:     $(ROOT)\$(SRC_RELATIVE)\$(DDFDIR)\hplib\hplib2.c \
                     $(ROOT)\$(SRC_RELATIVE)\$(DDFDIR)\hplib\hplib.h \
                     $(ROOT)\$(SRC_RELATIVE)\$(DDFDIR)\hplib\hplibint.h
        $(CC) $(CDEFINES) $(DBG_CFLAGS) $(CFLAGS) /Fo$*.obj $(DDFDIR)\hplib\$(@B).c

$(O)\hplib.lib:      $(MODSINHPLIB)
        -cd $(O)
        -del $@
        lib $(@B) $(MODSINHPLIB), $(@B).lst;
        $(EA) -e .VERSION=$(_VERSION21) $@
        bumptime $@ 2 seconds
        -cd $(ROOT)\$(SRC_RELATIVE)

!else

$(O)\hplib.lib:      $(ROOT)\$(SRC_RELATIVE)\$(DDFDIR)\hplib\hplib.lib
        copy $** $(@D)
        bumptime $@ 2 seconds

!endif

!endif

#****************************************************************************
#  Dependency generation and Checking
#****************************************************************************

## Includes is currently commented out for test purposes.
#
#$(O)\depend.mak:  $(O)\dephold
#        -$(CREATE_PATH)
#        -makepath $(OUTDIR)
#        -$(TOUCH) $(O)\depchk
#        -echo generate depend.mak
##         includes -e -S$$(O) -I. -I$(COMPILER_HDR) -I$(R_PUB_HDR) *.c > $@
#        makedep -A -DPS -TP $(O) $(HCINC:-I=-I ) -o $@ *.c
#        -del $(O)\depchk
#
#$(O)\dephold:
#        -$(TOUCH) $@

.SUFFIXES:
.SUFFIXES: .c .cpp .asm .h .inc .obj .def .dll .lib .o .res .rc .drv .map .sym .mak

.c{$(O)}.mak:
        -cpp -S $(ROOT)=$$(ROOT) -E -P $(O)\$(@B).obj $(CDEFINES) $(@B).c $*.mak

.c{$(O_NLV)}.mak:
        -cpp -S $(ROOT)=$$(ROOT) -E -P $(O_NLV)\$(@B).obj $(CDEFINES) $(@B).c $*.mak

.asm{$(O)}.mak:
        -@echo $(O)\$(@B).obj: $(ROOT)\$(SRC_RELATIVE)\$(@B).asm | filter -S $(ROOT)=$$(ROOT)  > $(O)\$(@B).mak
        -@nop >> $(O)\$(@B).mak
        -@echo $(O)\$(@B).mak: $(ROOT)\$(SRC_RELATIVE)\$(@B).asm | filter -S $(ROOT)=$$(ROOT) >> $(O)\$(@B).mak

.asm{$(O_NLV)}.mak:
        -@echo $(O_NLV)\$(@B).obj: $(ROOT)\$(SRC_RELATIVE)\$(@B).asm | filter -S $(ROOT)=$$(ROOT)  > $(O_NLV)\$(@B).mak
        -@nop >> $(O_NLV)\$(@B).mak
        -@echo $(O_NLV)\$(@B).mak: $(ROOT)\$(SRC_RELATIVE)\$(@B).asm | filter -S $(ROOT)=$$(ROOT) >> $(O_NLV)\$(@B).mak

$(O)\depend.mak: inithold depexists gendeps termhold

inithold:
        -$(TOUCH) $(O)\depchk

termhold:
        -del $(O)\depchk 1>nul 2>&1

depexists: $(OMNIOBJS:.obj=.mak)

gendeps:
#
# Create fmf.mak in NLV object directory
#
        -@cd $(FMF_PATH)
        -@nop > $(O_NLV)\fmf.tmp
        -@for %%i in (*.fmf) do \
          @echo $(OUTDIR)\%%i: $(FMF_PATH)\%%i >> $(O_NLV)\fmf.tmp & \
           echo  copy $(FMF_PATH)\%%i $(OUTDIR) >> $(O_NLV)\fmf.tmp & \
           echo  bumptime $(OUTDIR)\%%i 2 seconds >> $(O_NLV)\fmf.tmp & \
           echo  $(EA) -e .VERSION=$(_VERSION21) $(OUTDIR)\%%i >> $(O_NLV)\fmf.tmp & \
           nop >> $(O_NLV)\fmf.tmp
        -@echo copyfmf: ^\>> $(O_NLV)\fmf.tmp
        -@for %%i in (*.fmf) do \
          @echo  $(OUTDIR)\%%i ^\>> $(O_NLV)\fmf.tmp
        -@nop >> $(O_NLV)\fmf.tmp
        -@filter -S $(ROOT)=$$(ROOT) < $(O_NLV)\fmf.tmp > $(O_NLV)\fmf.mak
        -@del $(O_NLV)\fmf.tmp 1>nul 2>&1
        -@cd $(ROOT)\$(SRC_RELATIVE)
#
# Create depend.mak in object directory
#
        -@del $(O)\depend.mak 1>nul 2>&1
        -@del $(O)\depend.tmp 1>nul 2>&1
        -@for %%i in ($(O)\*.mak) do \
          @if not "%%i" == "$(O)\depend.mak" echo !include %%i >> $(O)\depend.tmp
        -@filter -S $(ROOT)=$$(ROOT) < $(O)\depend.tmp > $(O)\depend.mak
        -@del $(O)\depend.tmp 1>nul 2>&1
#
# Create depend.mak in NLV object directory
#
        -@del $(O_NLV)\depend.mak 1>nul 2>&1
        -@del $(O_NLV)\depend.tmp 1>nul 2>&1
        -@for %%i in ($(O_NLV)\*.mak) do \
          @if not "%%i" == "$(O_NLV)\DEPEND.MAK" echo !include %%i >> $(O_NLV)\depend.tmp
        -@filter -S $(ROOT)=$$(ROOT) < $(O_NLV)\depend.tmp > $(O_NLV)\depend.mak
        -@del $(O_NLV)\depend.tmp 1>nul 2>&1
#
# Create depend2.mak in object directory
#
        -@nop > $(O)\depend2.tmp
        -@echo $(O)\depend2.mak: ^\>> $(O)\depend2.tmp
        -@for %%i in ($(O)\*.mak) do \
          @if not "%%i" == "$(O)\depend2.mak" echo                   %%i ^\>> $(O)\depend2.tmp
        -@echo                   Makefile >> $(O)\depend2.tmp
        -@filter -S $(ROOT)=$$(ROOT) < $(O)\depend2.tmp > $(O)\depend2.mak
        -@del $(O)\depend2.tmp 1>nul 2>&1

$(O)\dephold:
        -$(TOUCH) $@

#
# Make sure that the NLV object directory exists and that depend.mak exists in it.
# It will be !included right afterwards.
#
!ifdef TARGET_PROC
!   ifdef EXE_FMT
!      if [ if not exist $(O_NLV)\depend.mak \
               makepath $(O_NLV) & \
               $(TOUCH) $(O_NLV)\depend.mak ]
!      endif
!      include $(O_NLV)\depend.mak
!   endif
!endif

#***************************************************************************
# Include Footer.mak at this point.
#***************************************************************************

!include $(ROOT)\footer.mak

myclean:
        -delpath /Y $(O)
        -delpath /Y $(O_NLV)
        -delpath /Y $(OUTDIR)
