#
# Program:  lasthope.NLM
#           This makefile rebuilds the lasthope NetWare Loadable Module
#
# Created:  Tue Dec 01 14:09:17 1992
#
# 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

!ifdef %SILENT
.silent
!endif

program = lasthope

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

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

d_linkopt = debug all debug novell
p_linkopt = debug
x_linkopt = $($(version)_linkopt)

debug = /dDEBUG      # use /dDEBUG to define DEBUG for C Preprocessor

!ifndef %ccf386
d_wcc386opt = /w4 /e99 /zp1 /3s /d2 /zl $(debug)
p_wcc386opt = /w4 /s /zp1 /3s /oax /zl
x_wcc386opt = $($(version)_wcc386opt)
!else
x_wcc386opt = $(%ccf386)
!endif

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

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

.c.obj:
        $(compiler_cmd)

lasthope.nlm : lasthope.obj lasthope.lnk
        $(linker) @lasthope

lasthope.lnk : makefile
  @echo form    novell nlm 'lasthope'                   >$^&.lnk
  @echo name    $^&                              >>$^&.lnk
  @echo option  stack=8k                        >>$^&.lnk
  @echo option  caseexact, verbose, nod          >>$^&.lnk
  @echo option  version=0.01                     >>$^&.lnk
  @echo $(x_linkopt)                             >>$^&.lnk
  @echo option  map                              >>$^&.lnk
  @echo file $(startup), $^&                     >>$^&.lnk
  @echo module clib                              >>$^&.lnk
  @echo option screenname 'lasthope'                   >>$^&.lnk
  @echo option threadname 'lasthope__P '               >>$^&.lnk
  @echo import @$(clibimp)                       >>$^&.lnk

lasthope.obj : lasthope.c

