#
# This makefile was generated by QMK386 v2.14
#
# Program:  unzip.NLM
#           This makefile rebuilds the zip NetWare Loadable Module
#
# Created:  Sun Jan 03 03:54:03 1999
#
# MAKEINIT defines many of the macros used herein
# The following macros can be set via your environment:
#   CCF386 : Set compile options
#   QMKVER : Set to 'd' or 'p' to define VERSION
#   SILENT : If defined, .SILENT will be set
#
# The following macros are defined for your program:
#   vMAJ : Major version number
#   vMIN : Minor version number
#   vREV : Revision number

!ifdef %SILENT
.silent
!endif

program = zip

pvmaj = 1           # major version number
pvmin = 00          # minor version number
pvrev = 3           # revision number e.g. 0,1,2, ...

!ifndef %qmkver
!   define version p                # use 'd' or 'p' here
!else
!   define version $(%qmkver)
!endif
!ifeq version d
!   define lversion DEBUG
!   define debug /dDEBUG
!else
!   define lversion PRODUCTION
!   define debug
!endif

nlm_TYPE = Form Novell NLM '$(program)'
nlm_NAME = Name $^&
nlm_SCREEN = Op ScreenName '$(program)'
nlm_THREAD = Op ThreadName '$^&__P '
nlm_STACK = Op Stack = 8k
nlm_NLMVER = Op Version = $(pvmaj).$(pvmin).$(pvrev)
nlm_COPYRIGHT = Op Copyright '$(copyright)'
linkop = $+$(linkop)$- Caseexact
linkop = $+$(linkop)$- Nod
!ifeq version d
!   define linkop $+$(linkop)$- Map
!   define linkop $+$(linkop)$- Verbose
!   define ldebug debug all debug novell
!endif

objlst = BITS.OBJ
objlst = $+$(objlst)$- CRC32.OBJ
objlst = $+$(objlst)$- CRYPT.OBJ
objlst = $+$(objlst)$- DEFLATE.OBJ
objlst = $+$(objlst)$- FILEIO.OBJ
objlst = $+$(objlst)$- GLOBALS.OBJ
objlst = $+$(objlst)$- MKTIME.OBJ
objlst = $+$(objlst)$- NETWARE.OBJ
objlst = $+$(objlst)$- SIGNAL.OBJ
objlst = $+$(objlst)$- TREES.OBJ
objlst = $+$(objlst)$- TTYIO.OBJ
objlst = $+$(objlst)$- UTIL.OBJ
objlst = $+$(objlst)$- ZIP.OBJ
objlst = $+$(objlst)$- ZIPFILE.OBJ
objlst = $+$(objlst)$- ZIPUP.OBJ
objlst = $+$(objlst)$- $(startup)

import = $(allimp)

module = CLib

build_msg = Building a $(lversion) version of $(program)

pgm_ver = /dvMAJ="$(pvmaj)" /dvMIN="$(pvmin)" /dvREV="$(pvrev)"

!ifndef %ccf386
!   define  d_wcc386opt /ms /w4 /e99 /zp1 /3s /ot /d2 /dN_PLAT_NLM /d_FIND_OLD_HEADERS -dNO_ASM -dNLM $(debug)
!   define  p_wcc386opt /ms /w4 /s /zp1 /3s /oaxt /dN_PLAT_NLM /d_FIND_OLD_HEADERS -dNO_ASM -dNLM
!   define  x_wcc386opt $($(version)_wcc386opt) $(pgm_ver)
!else
!   define  x_wcc386opt $(%ccf386)
!endif

compiler_cmd = $(wcc386) $(x_wcc386opt) $[*.c

.BEFORE
    echo $(build_msg)
    set inc386=$(inc_386)
    set lib386=$(lib_386)
    set wcg386=$(code_386)

.c.obj:
        $(compiler_cmd)

zip.nlm : $(objlst) zip.LNK
        $(linker) @zip

zip.LNK : MAKEFILE
  if exist $^&.LNK del $^&.LNK
  %append $^&.LNK $(nlm_TYPE)
  %append $^&.LNK $(nlm_NAME)
  %append $^&.LNK $(nlm_SCREEN)
  %append $^&.LNK $(nlm_THREAD)
  %append $^&.LNK $(nlm_STACK)
  %append $^&.LNK $(nlm_NLMVER)
!ifdef copyright
  %append $^&.LNK $(nlm_COPYRIGHT)
!endif
!ifdef ldebug
  %append $^&.LNK $(ldebug)
!endif
  for %i in ($(linkop)) do %append $^&.LNK Op %i
  for %i in ($(objlst)) do %append $^&.LNK File %i
  for %i in ($(import)) do %append $^&.LNK Import @%i
  for %i in ($(export)) do %append $^&.LNK Export @%i
  for %i in ($(module)) do %append $^&.LNK Module %i
  for %i in ($(library)) do %append $^&.LNK Library %i

clean : .symbolic
    del *.MAP
    del *.OBJ
    del *.ERR
    del *.LNK
    del *.NLM

zip : .symbolic
    -pkzip -u zip MAKEFILE *.c *.h

unzip : .symbolic
    -pkunzip -n -d zip

save : .symbolic
    %make zip
    %make clean

