2 # target: windows nt/95
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 # makefile designed for lcc-win32
11 # lcc-win32 is lcc (c compiler coded by guys from princeton uni)
12 # ported to win32 by jacob navia
13 # available at http://www.remcomp.com/lcc-win32/
16 CC = lcc.exe $(CFLAGS)
17 LFLAGS = -subsystem console -s
18 LD = lcclnk.exe $(LFLAGS)
24 NASM = nasm.${OBJ} nasmlib.${OBJ} float.${OBJ} insnsa.${OBJ} assemble.${OBJ} labels.${OBJ} \
25 parser.${OBJ} outform.${OBJ} output/outbin.${OBJ} output/outaout.${OBJ} output/outcoff.${OBJ} \
26 output/outelf32.${OBJ} output/outelf64.${OBJ} \
27 output/outobj.${OBJ} output/outas86.${OBJ} output/outrdf.${OBJ} output/outdbg.${OBJ} output/outrdf2.${OBJ} \
28 output/outieee.${OBJ} preproc.${OBJ} listing.${OBJ} eval.${OBJ}
30 NDISASM = ndisasm.${OBJ} disasm.${OBJ} sync.${OBJ} nasmlib.${OBJ} insnsd.${OBJ}
34 # linker response files
35 # that may take long, too much spawning command.com :)
36 NASM.LNK: makefile.lcc
37 echo nasm.$(OBJ) > NASM.LNK
38 echo nasmlib.$(OBJ) >> NASM.LNK
39 echo eval.$(OBJ) >> NASM.LNK
40 echo float.$(OBJ) >> NASM.LNK
41 echo insnsa.$(OBJ) >> NASM.LNK
42 echo assemble.$(OBJ) >> NASM.LNK
43 echo labels.$(OBJ) >> NASM.LNK
44 echo listing.$(OBJ) >> NASM.LNK
45 echo parser.$(OBJ) >> NASM.LNK
46 echo preproc.$(OBJ) >> NASM.LNK
47 echo outform.$(OBJ) >> NASM.LNK
48 echo output/outbin.$(OBJ) >> NASM.LNK
49 echo output/outaout.$(OBJ) >> NASM.LNK
50 echo output/outcoff.$(OBJ) >> NASM.LNK
51 echo output/outelf32.$(OBJ) >> NASM.LNK
52 echo output/outelf64.$(OBJ) >> NASM.LNK
53 echo output/outobj.$(OBJ) >> NASM.LNK
54 echo output/outas86.$(OBJ) >> NASM.LNK
55 echo output/outrdf.$(OBJ) >> NASM.LNK
56 echo output/outrdf2.$(OBJ) >> NASM.LNK
57 echo output/outieee.$(OBJ) >> NASM.LNK
58 echo output/outdbg.$(OBJ) >> NASM.LNK
60 NDISASM.LNK: makefile.lcc
61 echo ndisasm.$(OBJ) > NDISASM.LNK
62 echo disasm.$(OBJ) >> NDISASM.LNK
63 echo sync.$(OBJ) >> NDISASM.LNK
64 echo nasmlib.$(OBJ) >> NDISASM.LNK
65 echo insnsd.$(OBJ) >> NDISASM.LNK
67 nasm: $(NASM) nasm.lnk
68 $(LD) -o nasm.exe @nasm.lnk
70 ndisasm: $(NDISASM) ndisasm.lnk
71 $(LD) -o ndisasm.exe @ndisasm.lnk
73 # These source files are automagically generated from a single
74 # instruction-table file by a Perl script. They're distributed,
75 # though, so it isn't necessary to have Perl just to recompile NASM
76 # from the distribution.
78 insnsa.c insnsd.c insnsi.h insnsn.c: insns.dat insns.pl
79 perl insns.pl insns.dat
81 # These files contains all the standard macros that are derived from
83 version.h: version version.pl
84 perl version.pl h < version > version.h
86 version.mac: version version.pl
87 perl version.pl mac < version > version.mac
89 # This source file is generated from the standard macros file
90 # `standard.mac' by another Perl script. Again, it's part of the
91 # standard distribution.
93 macros.c: standard.mac macros.pl version.mac
94 perl macros.pl standard.mac version.mac
96 # These source files are generated from regs.dat by yet another
98 regs.c: regs.dat regs.pl
99 perl regs.pl c regs.dat > regs.c
100 regflags.c: regs.dat regs.pl
101 perl regs.pl fc regs.dat > regflags.c
102 regdis.c: regs.dat regs.pl
103 perl regs.pl dc regs.dat > regdis.c
104 regvals.c: regs.dat regs.pl
105 perl regs.pl vc regs.dat > regvals.c
106 regs.h: regs.dat regs.pl
107 perl regs.pl h regs.dat > regs.h
110 rm -f *.${OBJ} nasm.exe ndisasm.exe
112 #-- Magic hints to mkdep.pl --#
113 # @object-ending: ".${OBJ}"
114 # @path-separator: "/"
115 #-- Everything below is generated by mkdep.pl - do not edit --#
116 assemble.${OBJ}: assemble.c preproc.h insns.h regs.h regflags.c config.h \
117 version.h nasmlib.h nasm.h regvals.c insnsi.h assemble.h
118 disasm.${OBJ}: disasm.c insns.h sync.h regdis.c regs.h config.h regs.c \
119 version.h nasm.h insnsn.c names.c insnsi.h disasm.h
120 eval.${OBJ}: eval.c labels.h eval.h regs.h config.h version.h nasmlib.h \
122 float.${OBJ}: float.c regs.h config.h version.h nasm.h
123 insnsa.${OBJ}: insnsa.c insns.h regs.h config.h version.h nasm.h insnsi.h
124 insnsd.${OBJ}: insnsd.c insns.h regs.h config.h version.h nasm.h insnsi.h
125 insnsn.${OBJ}: insnsn.c
126 labels.${OBJ}: labels.c regs.h config.h version.h nasmlib.h nasm.h
127 listing.${OBJ}: listing.c regs.h config.h version.h nasmlib.h nasm.h \
129 macros.${OBJ}: macros.c
130 names.${OBJ}: names.c regs.c insnsn.c
131 nasm.${OBJ}: nasm.c labels.h preproc.h insns.h parser.h eval.h regs.h \
132 outform.h config.h version.h nasmlib.h nasm.h stdscan.h assemble.h insnsi.h \
134 nasmlib.${OBJ}: nasmlib.c insns.h regs.h config.h regs.c version.h nasmlib.h \
135 nasm.h insnsn.c names.c insnsi.h
136 ndisasm.${OBJ}: ndisasm.c insns.h sync.h regs.h config.h version.h nasmlib.h \
137 nasm.h insnsi.h disasm.h
138 outform.${OBJ}: outform.c regs.h config.h outform.h version.h nasm.h
139 output/outaout.${OBJ}: output/outaout.c regs.h outform.h config.h version.h \
140 nasmlib.h nasm.h stdscan.h
141 output/outas86.${OBJ}: output/outas86.c regs.h outform.h config.h version.h \
143 output/outbin.${OBJ}: output/outbin.c labels.h eval.h regs.h outform.h \
144 config.h version.h nasmlib.h nasm.h stdscan.h
145 output/outcoff.${OBJ}: output/outcoff.c regs.h outform.h config.h version.h \
147 output/outdbg.${OBJ}: output/outdbg.c regs.h outform.h config.h version.h \
149 output/outelf32.${OBJ}: output/outelf32.c regs.h outform.h config.h \
150 version.h nasmlib.h nasm.h stdscan.h
151 output/outelf64.${OBJ}: output/outelf64.c regs.h outform.h config.h \
152 version.h nasmlib.h nasm.h stdscan.h
153 output/outieee.${OBJ}: output/outieee.c regs.h outform.h config.h version.h \
155 output/outmacho.${OBJ}: output/outmacho.c compiler.h regs.h outform.h \
156 config.h version.h nasmlib.h nasm.h
157 output/outobj.${OBJ}: output/outobj.c regs.h outform.h config.h version.h \
158 nasmlib.h nasm.h stdscan.h
159 output/outrdf.${OBJ}: output/outrdf.c regs.h outform.h config.h version.h \
161 output/outrdf2.${OBJ}: output/outrdf2.c rdoff/rdoff.h regs.h outform.h \
162 config.h version.h nasmlib.h nasm.h
163 parser.${OBJ}: parser.c insns.h parser.h float.h regs.h regflags.c config.h \
164 version.h nasmlib.h nasm.h stdscan.h insnsi.h
165 preproc.${OBJ}: preproc.c macros.c regs.h config.h version.h nasmlib.h \
167 regdis.${OBJ}: regdis.c
168 regflags.${OBJ}: regflags.c
170 regvals.${OBJ}: regvals.c
171 stdscan.${OBJ}: stdscan.c insns.h regs.h config.h version.h nasmlib.h nasm.h \
173 sync.${OBJ}: sync.c sync.h
174 tokhash.${OBJ}: tokhash.c insns.h regs.h config.h version.h nasm.h insnsi.h