
[nmake]

#############################################################################
#                                                                           #
# These are the built in rules and path definitions used by the new MS Make #
# Utility (NMAKE). The following variables are set externaly (ie set in the #
# individual makefiles.                                                     #
#                                                                           #
# extasw = The 'extra assembly switch' variable is optionaly used in the    #
#          makefile to specify special MASM command line switches.          #
#                                                                           #
# extcsw = The 'extra C switch' variable is optionaly used in the makefile  #
#          to specify special C compiler command line switches.             #
#                                                                           #
# inc    = The include file search path from the utility being built to the #
#          INC directory. Used if needed.                                   #
#                                                                           #
# dos    = The include file search path from the utility being built to the #
#          DOS directory. Used if needed.                                   #
#                                                                           #
# hinc   = The include file search path from the utility being built to the #
#          H directory. Used if needed for C source compilation.            #
#                                                                           #
#############################################################################

########## Definitionms for the Assembler ##########

asm	=masm
aflags	=-l -Mx -t $(extasw)
ainc	=-I. -I$(inc) -I$(dos)

nasm	=nasm
nasflags	=-Ox -P$(inc)/nasm.mac
nasinc		=-I$(inc)/ -I$(dos)/

########## Definitions for C compiler ##########

cc	=cl
cflags	=-AS -Os -Zp $(extcsw)
cinc	=-I. -I$(hinc)

########## Definitions for linker ##########

link	=link

########## Built-in rules ##########

.SUFFIXES:
.SUFFIXES: .c .obj .lst .exe .com .cod .inc .skl .cl1 .ctl .asm .idx .msg .fob .nas

.nas.obj:
	$(nasm) $(nasflags) $(nasinc) $*.nas -fobj -o$*.obj -l$*.lst

.obj.fob:
	fixupp $*.obj $*.fob

.asm.obj:
	$(asm) $(aflags) $(ainc) $*.asm,$*.obj;

.asm.lst:
	$(asm) -l $(aflags) $(ainc) $*.asm;

.c.obj:
	$(cc) -c $(cflags) $(cinc) -Fo$*.obj $*.c

.c.lst:
	$(cc) -c $(cflags) $(cinc) -fc$*.cod -fo$*.obj $*.c

.exe.com:
	reloc $*.exe $*.com

.skl.cl1:
	nosrvbld $*.skl $(msg)\$(COUNTRY).msg

.skl.ctl:
	buildmsg $(msg)\$(COUNTRY) $*.skl

.msg.idx:
	buildidx $*.msg
