1 # host: watcom c (dos, windows, os/2)
2 # target: windows nt character mode executable
3 # Makefile for the Netwide Assembler
5 # The Netwide Assembler is copyright (C) 1996 Simon Tatham and
6 # Julian Hall. All rights reserved. The software is
7 # redistributable under the licence given in the file "Licence"
8 # distributed in the NASM archive.
10 # this makefile is designed for use with of Watcom C 32 bit compiler
11 # it generates win32 console (character mode) executable
12 # it has been tested with
13 # borland make.exe 4.0
14 # microsoft nmake.exe 1.3
15 # watcom wmake.exe /u 3.2 (remember about that /u option :)
17 # all this should compile under watcom c 9.5, 10.0, 10.5 and 10.6
18 # i dont know about 11.0 because i didnt yet see it
20 CFLAGS = -fpi -mf -3r -s -bt=dos -oilrt
21 # -fpi inline math + emulation
22 # -mf flat model (isnt it by default :)
23 # -3r 386 register calling (does everyone have pentium nowadays ?)
24 # -s no stack checking
25 # -bt=nt target system - windows nt
26 # -oilrt mega cool optimization :)
28 CC = wcc386.exe $(CFLAGS)
32 # target system nt - character mode
33 LD = wlink.exe $(LFLAGS)
41 NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
42 assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
43 output/outbin.$(OBJ) output/outaout.$(OBJ) output/outcoff.$(OBJ) output/outelf.$(OBJ) \
44 output/outobj.$(OBJ) output/outas86.$(OBJ) output/outrdf.$(OBJ) output/outdbg.$(OBJ) \
45 preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ) output/outrdf2.$(OBJ) \
48 NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
51 all : nasm.exe ndisasm.exe
52 echo This is dummy command for dumb make
54 nasm.exe: $(NASMOBJS) NASM.LNK
57 ndisasm.exe: $(NDISASMOBJS) NDISASM.LNK
60 # linker response files
61 # that may take long, too much spawning command.com :)
62 NASM.LNK: makefile.wcw
63 echo N nasm.exe > NASM.LNK
64 echo F nasm.$(OBJ) >> NASM.LNK
65 echo F nasmlib.$(OBJ) >> NASM.LNK
66 echo F eval.$(OBJ) >> NASM.LNK
67 echo F float.$(OBJ) >> NASM.LNK
68 echo F insnsa.$(OBJ) >> NASM.LNK
69 echo F assemble.$(OBJ) >> NASM.LNK
70 echo F labels.$(OBJ) >> NASM.LNK
71 echo F listing.$(OBJ) >> NASM.LNK
72 echo F parser.$(OBJ) >> NASM.LNK
73 echo F preproc.$(OBJ) >> NASM.LNK
74 echo F outform.$(OBJ) >> NASM.LNK
75 echo F output/outbin.$(OBJ) >> NASM.LNK
76 echo F output/outaout.$(OBJ) >> NASM.LNK
77 echo F output/outcoff.$(OBJ) >> NASM.LNK
78 echo F output/outelf.$(OBJ) >> NASM.LNK
79 echo F output/outobj.$(OBJ) >> NASM.LNK
80 echo F output/outas86.$(OBJ) >> NASM.LNK
81 echo F output/outrdf.$(OBJ) >> NASM.LNK
82 echo F output/outrdf2.$(OBJ) >> NASM.LNK
83 echo F output/outieee.$(OBJ) >> NASM.LNK
84 echo F output/outdbg.$(OBJ) >> NASM.LNK
86 NDISASM.LNK: makefile.wcw
87 echo N ndisasm.exe > NDISASM.LNK
88 echo F ndisasm.$(OBJ) >> NDISASM.LNK
89 echo F disasm.$(OBJ) >> NDISASM.LNK
90 echo F sync.$(OBJ) >> NDISASM.LNK
91 echo F nasmlib.$(OBJ) >> NDISASM.LNK
92 echo F insnsd.$(OBJ) >> NDISASM.LNK
94 assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
95 disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
96 eval.$(OBJ): eval.c nasm.h version.h insnsi.h nasmlib.h eval.h
97 float.$(OBJ): float.c nasm.h version.h insnsi.h
98 insnsa.$(OBJ): insnsa.c nasm.h version.h insnsi.h insns.h
99 insnsd.$(OBJ): insnsd.c nasm.h version.h insnsi.h insns.h
100 labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
101 listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
102 nasm.$(OBJ): nasm.c nasm.h version.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
104 nasmlib.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
105 ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
106 output/outas86.$(OBJ): output/outas86.c nasm.h version.h insnsi.h nasmlib.h
107 output/outaout.$(OBJ): output/outaout.c nasm.h version.h insnsi.h nasmlib.h
108 output/outbin.$(OBJ): output/outbin.c nasm.h version.h insnsi.h nasmlib.h
109 output/outcoff.$(OBJ): output/outcoff.c nasm.h version.h insnsi.h nasmlib.h
110 output/outelf.$(OBJ): output/outelf.c nasm.h version.h insnsi.h nasmlib.h
111 output/outobj.$(OBJ): output/outobj.c nasm.h version.h insnsi.h nasmlib.h
112 output/outrdf2.$(OBJ): output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h
113 output/outieee.$(OBJ): output/outieee.c nasm.h version.h insnsi.h nasmlib.h
114 outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
115 parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
116 preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
117 sync.$(OBJ): sync.c sync.h