The original MAKEFILE.MAK:
# PolyMake file
#--- C modules
# CAVEAT -- set environment variables thusly
# SET CL=/Od /Zi
# SET LINK=/CO
# The demo code was compiled with CL=/Oilt
# Using CL=/Ox causes some problems with the zoom box...
cmod=S
array.obj : array.c array.h data.h driver.h extmath.h graphics.h \
screen.h serial.h
driver.obj : driver.c driver.h data.h array.h extmath.h keyboard.h \
screen.h scrnfile.h serial.h utility.h vertint.h zplane.h
extmath.obj : extmath.c extmath.h driver.h
keyboard.obj : keyboard.c keyboard.h data.h driver.h array.h screen.h zplane.h
screen.obj : screen.c screen.h data.h driver.h graphics.h keyboard.h
scrnfile.obj : scrnfile.c scrnfile.h driver.h screen.h
serial.obj : serial.c serial.h driver.h utility.h
utility.obj : utility.c utility.h data.h driver.h
zplane.obj : zplane.c zplane.h data.h driver.h array.h screen.h keyboard.h
#--- ASM modules
data.obj : data.asm defines.inc
graphics.obj : graphics.asm graphics.h defines.inc macros.inc
vertint.obj : vertint.asm vertint.h defines.inc macros.inc
#--- LINK process
MNAME=driver
MODS1=array data extmath
MODS2=keyboard graphics scrnfile
MODS3=screen serial utility
MODS4=vertint zplane
$(MNAME).exe : $(MNAME).obj $[f,,$(MODS1),obj] $[f,,$(MODS2),obj] $[f,,$(MODS3),obj] $[f,,$(MODS4),obj]
tm start /n /c1
link /M /ST:4096 <@<
$[f,$(.PATH.obj),$(MNAME),obj]+
$[f,$(.PATH.obj),$(MODS1),obj]+
$[f,$(.PATH.obj),$(MODS2),obj]+
$[f,$(.PATH.obj),$(MODS3),obj]+
$[f,$(.PATH.obj),$(MODS4),obj]
$[r,$*]
$(wk)$[r,$*]
ct5_m5$(cmod);
<
tm stop "------link" /n /c1
--------------------------------------
XXXXXXXXXXXXXXXXXXXXXXXXX
--------------------------------------
XXXXXXXXXXXXXXXXXXXXXXXXX
-------------------------------------
I recently discovered that POLYMAKE in addition to MAKEFILE.MAK, also uses a second file, BUILTINS.MAK :
# default make procedures
#-- workaround for disappearing OBJ files...
.PRECIOUS
#-- put all OBJ files on RAM disk
.PATH.obj=g:
#-- put working files on RAM disk
wk=g:
#-- set up C model
cmod=S
#-- do single-module assembly
#-- /ZI turns on CodeView info
.asm.obj :
tm start /n /c1
masm /MX /N /P /T /W2 /ZI \
$[r,$*],$(.PATH.obj)$[r,$*],$(wk)$[r,$*],NUL
tm stop "------masm" /n /c1
#-- single-module C compile
.c.obj :
tm start /n /c1
cl /Fo$(.PATH.obj) /Fs$(wk) /V"Nisley Micro Consulting" \
/W3 /A$(cmod) /Sl132 /Sp79 /c \
$[r,$*].c
tm stop "--------cl" /n /c1
#-- single-module link
.obj.exe :
tm start /n /c1
link /M <@<
$(.PATH.obj)$[r,$*]
$[r,$*]
$(wk)$[r,$*]
ct5_m5$(cmod)+
capi_$(cmod)+
scode_$(cmod);
<
tm stop "------link" /n /c1
#-- EXE file conversions
.exe.com :
exe2bin $[r,$*] $[r,$*].COM
del $[r,$*].exe
.exe.bin :
exe2bin $[r,$*] $[r,$*].BIN
del $[r,$*].exe
.exe.sys :
exe2bin $[r,$*] $[r,$*].SYS
del $[r,$*].exe
#-- AVMAC51 assembler to hex file, single module only!
.asm.hex :
AVMAC51 $[r,$*] OJ=$(.PATH.obj)$[r,$*] PR=$(wk)$[r,$*] MF=$(wk)$[r,$*].MXP PW=130
AVLINK <@<
$[r,$*].hex=$(.PATH.obj)$[r,$*].obj
< MA=$(.PATH.obj)$[r,$*].MAP SY=$[r,$*].SYM -SM -SP -SN