1 # host: watcom c (dos, windows, os/2)
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 dos version of Watcom C 32 bit
11 # compiler, it generates dos 32 bit 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=dos target system - dos
26 # -oilrt mega cool optimization :)
28 CC = wcc386.exe $(CFLAGS)
32 # target system - dos4gw
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 :)
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.wc
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
100 #-- Magic hints to mkdep.pl --#
101 # @object-ending: ".$(OBJ)"
102 # @path-separator: "/"
103 #-- Everything below is generated by mkdep.pl - do not edit --#
104 assemble.$(OBJ): assemble.c insns.h assemble.h regvals.c nasm.h regs.h \
105 insnsi.h nasmlib.h version.h
106 disasm.$(OBJ): disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
107 insnsn.c insnsi.h version.h regdis.c
108 eval.$(OBJ): eval.c nasm.h regs.h labels.h nasmlib.h version.h eval.h
109 float.$(OBJ): float.c nasm.h regs.h version.h
110 insnsa.$(OBJ): insnsa.c insns.h nasm.h regs.h insnsi.h version.h
111 insnsd.$(OBJ): insnsd.c insns.h nasm.h regs.h insnsi.h version.h
112 insnsn.$(OBJ): insnsn.c
113 labels.$(OBJ): labels.c nasm.h regs.h nasmlib.h version.h
114 listing.$(OBJ): listing.c listing.h nasm.h regs.h nasmlib.h version.h
115 macros.$(OBJ): macros.c
116 names.$(OBJ): names.c regs.c insnsn.c
117 nasm.$(OBJ): nasm.c listing.h preproc.h insns.h outform.h assemble.h \
118 parser.h nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
119 nasmlib.$(OBJ): nasmlib.c insns.h regs.c names.c nasm.h regs.h insnsn.c \
120 insnsi.h nasmlib.h version.h
121 ndisasm.$(OBJ): ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
123 outform.$(OBJ): outform.c outform.h nasm.h regs.h version.h
124 output/outaout.$(OBJ): output/outaout.c outform.h nasm.h regs.h nasmlib.h \
126 output/outas86.$(OBJ): output/outas86.c outform.h nasm.h regs.h nasmlib.h \
128 output/outbin.$(OBJ): output/outbin.c outform.h nasm.h regs.h nasmlib.h \
130 output/outcoff.$(OBJ): output/outcoff.c outform.h nasm.h regs.h nasmlib.h \
132 output/outdbg.$(OBJ): output/outdbg.c outform.h nasm.h regs.h nasmlib.h \
134 output/outelf.$(OBJ): output/outelf.c outform.h nasm.h regs.h nasmlib.h \
136 output/outieee.$(OBJ): output/outieee.c outform.h nasm.h regs.h nasmlib.h \
138 output/outobj.$(OBJ): output/outobj.c outform.h nasm.h regs.h nasmlib.h \
140 output/outrdf.$(OBJ): output/outrdf.c outform.h nasm.h regs.h nasmlib.h \
142 output/outrdf2.$(OBJ): output/outrdf2.c outform.h nasm.h regs.h nasmlib.h \
144 parser.$(OBJ): parser.c insns.h parser.h nasm.h regs.h insnsi.h regflags.c \
145 float.h nasmlib.h version.h
146 preproc.$(OBJ): preproc.c nasm.h macros.c regs.h nasmlib.h version.h
147 regdis.$(OBJ): regdis.c
148 regflags.$(OBJ): regflags.c
150 regvals.$(OBJ): regvals.c
151 sync.$(OBJ): sync.c sync.h