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) \
44 output/outelf32.$(OBJ) output/outelf64.$(OBJ) \
45 output/outobj.$(OBJ) output/outas86.$(OBJ) output/outrdf.$(OBJ) output/outdbg.$(OBJ) \
46 preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ) output/outrdf2.$(OBJ) \
49 NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
52 all : nasm.exe ndisasm.exe
53 echo This is dummy command for dumb make
55 nasm.exe: $(NASMOBJS) NASM.LNK
58 ndisasm.exe: $(NDISASMOBJS) NDISASM.LNK
61 # linker response files
62 # that may take long, too much spawning command.com :)
63 NASM.LNK: makefile.wcw
64 echo N nasm.exe > NASM.LNK
65 echo F nasm.$(OBJ) >> NASM.LNK
66 echo F nasmlib.$(OBJ) >> NASM.LNK
67 echo F eval.$(OBJ) >> NASM.LNK
68 echo F float.$(OBJ) >> NASM.LNK
69 echo F insnsa.$(OBJ) >> NASM.LNK
70 echo F assemble.$(OBJ) >> NASM.LNK
71 echo F labels.$(OBJ) >> NASM.LNK
72 echo F listing.$(OBJ) >> NASM.LNK
73 echo F parser.$(OBJ) >> NASM.LNK
74 echo F preproc.$(OBJ) >> NASM.LNK
75 echo F outform.$(OBJ) >> NASM.LNK
76 echo F output/outbin.$(OBJ) >> NASM.LNK
77 echo F output/outaout.$(OBJ) >> NASM.LNK
78 echo F output/outcoff.$(OBJ) >> NASM.LNK
79 echo F output/outelf32.$(OBJ) >> NASM.LNK
80 echo F output/outelf64.$(OBJ) >> NASM.LNK
81 echo F output/outobj.$(OBJ) >> NASM.LNK
82 echo F output/outas86.$(OBJ) >> NASM.LNK
83 echo F output/outrdf.$(OBJ) >> NASM.LNK
84 echo F output/outrdf2.$(OBJ) >> NASM.LNK
85 echo F output/outieee.$(OBJ) >> NASM.LNK
86 echo F output/outdbg.$(OBJ) >> NASM.LNK
88 NDISASM.LNK: makefile.wcw
89 echo N ndisasm.exe > NDISASM.LNK
90 echo F ndisasm.$(OBJ) >> NDISASM.LNK
91 echo F disasm.$(OBJ) >> NDISASM.LNK
92 echo F sync.$(OBJ) >> NDISASM.LNK
93 echo F nasmlib.$(OBJ) >> NDISASM.LNK
94 echo F insnsd.$(OBJ) >> NDISASM.LNK
102 #-- Magic hints to mkdep.pl --#
103 # @object-ending: ".$(OBJ)"
104 # @path-separator: "/"
105 #-- Everything below is generated by mkdep.pl - do not edit --#
106 assemble.$(OBJ): assemble.c preproc.h insns.h regs.h regflags.c config.h \
107 version.h nasmlib.h nasm.h regvals.c insnsi.h assemble.h
108 disasm.$(OBJ): disasm.c insns.h sync.h regdis.c regs.h config.h regs.c \
109 version.h nasm.h insnsn.c names.c insnsi.h disasm.h
110 eval.$(OBJ): eval.c labels.h eval.h regs.h config.h version.h nasmlib.h \
112 float.$(OBJ): float.c regs.h config.h version.h nasm.h
113 insnsa.$(OBJ): insnsa.c insns.h regs.h config.h version.h nasm.h insnsi.h
114 insnsd.$(OBJ): insnsd.c insns.h regs.h config.h version.h nasm.h insnsi.h
115 insnsn.$(OBJ): insnsn.c
116 labels.$(OBJ): labels.c regs.h config.h version.h nasmlib.h nasm.h
117 listing.$(OBJ): listing.c regs.h config.h version.h nasmlib.h nasm.h \
119 macros.$(OBJ): macros.c
120 names.$(OBJ): names.c regs.c insnsn.c
121 nasm.$(OBJ): nasm.c labels.h preproc.h insns.h parser.h eval.h regs.h \
122 outform.h config.h version.h nasmlib.h nasm.h stdscan.h assemble.h insnsi.h \
124 nasmlib.$(OBJ): nasmlib.c insns.h regs.h config.h regs.c version.h nasmlib.h \
125 nasm.h insnsn.c names.c insnsi.h
126 ndisasm.$(OBJ): ndisasm.c insns.h sync.h regs.h config.h version.h nasmlib.h \
127 nasm.h insnsi.h disasm.h
128 outform.$(OBJ): outform.c regs.h config.h outform.h version.h nasm.h
129 output/outaout.$(OBJ): output/outaout.c regs.h outform.h config.h version.h \
130 nasmlib.h nasm.h stdscan.h
131 output/outas86.$(OBJ): output/outas86.c regs.h outform.h config.h version.h \
133 output/outbin.$(OBJ): output/outbin.c labels.h eval.h regs.h outform.h \
134 config.h version.h nasmlib.h nasm.h stdscan.h
135 output/outcoff.$(OBJ): output/outcoff.c regs.h outform.h config.h version.h \
137 output/outdbg.$(OBJ): output/outdbg.c regs.h outform.h config.h version.h \
139 output/outelf32.$(OBJ): output/outelf32.c regs.h outform.h config.h \
140 version.h nasmlib.h nasm.h stdscan.h
141 output/outelf64.$(OBJ): output/outelf64.c regs.h outform.h config.h \
142 version.h nasmlib.h nasm.h stdscan.h
143 output/outieee.$(OBJ): output/outieee.c regs.h outform.h config.h version.h \
145 output/outmacho.$(OBJ): output/outmacho.c compiler.h regs.h outform.h \
146 config.h version.h nasmlib.h nasm.h
147 output/outobj.$(OBJ): output/outobj.c regs.h outform.h config.h version.h \
148 nasmlib.h nasm.h stdscan.h
149 output/outrdf.$(OBJ): output/outrdf.c regs.h outform.h config.h version.h \
151 output/outrdf2.$(OBJ): output/outrdf2.c rdoff/rdoff.h regs.h outform.h \
152 config.h version.h nasmlib.h nasm.h
153 parser.$(OBJ): parser.c insns.h parser.h float.h regs.h regflags.c config.h \
154 version.h nasmlib.h nasm.h stdscan.h insnsi.h
155 preproc.$(OBJ): preproc.c macros.c regs.h config.h version.h nasmlib.h \
157 regdis.$(OBJ): regdis.c
158 regflags.$(OBJ): regflags.c
160 regvals.$(OBJ): regvals.c
161 stdscan.$(OBJ): stdscan.c insns.h regs.h config.h version.h nasmlib.h nasm.h \
163 sync.$(OBJ): sync.c sync.h
164 tokhash.$(OBJ): tokhash.c insns.h regs.h config.h version.h nasm.h insnsi.h