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} output/outelf.${OBJ} \
26 output/outobj.${OBJ} output/outas86.${OBJ} output/outrdf.${OBJ} output/outdbg.${OBJ} output/outrdf2.${OBJ} \
27 output/outieee.${OBJ} preproc.${OBJ} listing.${OBJ} eval.${OBJ}
29 NDISASM = ndisasm.${OBJ} disasm.${OBJ} sync.${OBJ} nasmlib.${OBJ} insnsd.${OBJ}
33 # linker response files
34 # that may take long, too much spawning command.com :)
35 NASM.LNK: makefile.lcc
36 echo nasm.$(OBJ) > NASM.LNK
37 echo nasmlib.$(OBJ) >> NASM.LNK
38 echo eval.$(OBJ) >> NASM.LNK
39 echo float.$(OBJ) >> NASM.LNK
40 echo insnsa.$(OBJ) >> NASM.LNK
41 echo assemble.$(OBJ) >> NASM.LNK
42 echo labels.$(OBJ) >> NASM.LNK
43 echo listing.$(OBJ) >> NASM.LNK
44 echo parser.$(OBJ) >> NASM.LNK
45 echo preproc.$(OBJ) >> NASM.LNK
46 echo outform.$(OBJ) >> NASM.LNK
47 echo output/outbin.$(OBJ) >> NASM.LNK
48 echo output/outaout.$(OBJ) >> NASM.LNK
49 echo output/outcoff.$(OBJ) >> NASM.LNK
50 echo output/outelf.$(OBJ) >> NASM.LNK
51 echo output/outobj.$(OBJ) >> NASM.LNK
52 echo output/outas86.$(OBJ) >> NASM.LNK
53 echo output/outrdf.$(OBJ) >> NASM.LNK
54 echo output/outrdf2.$(OBJ) >> NASM.LNK
55 echo output/outieee.$(OBJ) >> NASM.LNK
56 echo output/outdbg.$(OBJ) >> NASM.LNK
58 NDISASM.LNK: makefile.lcc
59 echo ndisasm.$(OBJ) > NDISASM.LNK
60 echo disasm.$(OBJ) >> NDISASM.LNK
61 echo sync.$(OBJ) >> NDISASM.LNK
62 echo nasmlib.$(OBJ) >> NDISASM.LNK
63 echo insnsd.$(OBJ) >> NDISASM.LNK
65 nasm: $(NASM) nasm.lnk
66 $(LD) -o nasm.exe @nasm.lnk
68 ndisasm: $(NDISASM) ndisasm.lnk
69 $(LD) -o ndisasm.exe @ndisasm.lnk
71 # These source files are automagically generated from a single
72 # instruction-table file by a Perl script. They're distributed,
73 # though, so it isn't necessary to have Perl just to recompile NASM
74 # from the distribution.
76 insnsa.c insnsd.c insnsi.h insnsn.c: insns.dat insns.pl
77 perl insns.pl insns.dat
79 # These files contains all the standard macros that are derived from
81 version.h: version version.pl
82 perl version.pl h < version > version.h
84 version.mac: version version.pl
85 perl version.pl mac < version > version.mac
87 # This source file is generated from the standard macros file
88 # `standard.mac' by another Perl script. Again, it's part of the
89 # standard distribution.
91 macros.c: standard.mac macros.pl version.mac
92 perl macros.pl standard.mac version.mac
94 # These source files are generated from regs.dat by yet another
96 regs.c: regs.dat regs.pl
97 perl regs.pl c regs.dat > regs.c
98 regflags.c: regs.dat regs.pl
99 perl regs.pl fc regs.dat > regflags.c
100 regdis.c: regs.dat regs.pl
101 perl regs.pl dc regs.dat > regdis.c
102 regvals.c: regs.dat regs.pl
103 perl regs.pl vc regs.dat > regvals.c
104 regs.h: regs.dat regs.pl
105 perl regs.pl h regs.dat > regs.h
108 rm -f *.${OBJ} nasm.exe ndisasm.exe
110 #-- Magic hints to mkdep.pl --#
111 # @object-ending: ".${OBJ}"
112 # @path-separator: "/"
113 #-- Everything below is generated by mkdep.pl - do not edit --#
114 assemble.${OBJ}: assemble.c preproc.h insns.h regs.h version.h nasmlib.h \
115 nasm.h regvals.c insnsi.h assemble.h
116 disasm.${OBJ}: disasm.c insns.h sync.h regdis.c regs.h regs.c version.h \
117 nasm.h insnsn.c names.c insnsi.h disasm.h
118 eval.${OBJ}: eval.c labels.h eval.h regs.h version.h nasmlib.h nasm.h
119 float.${OBJ}: float.c regs.h version.h nasm.h
120 insnsa.${OBJ}: insnsa.c insns.h regs.h version.h nasm.h insnsi.h
121 insnsd.${OBJ}: insnsd.c insns.h regs.h version.h nasm.h insnsi.h
122 insnsn.${OBJ}: insnsn.c
123 labels.${OBJ}: labels.c regs.h version.h nasmlib.h nasm.h
124 listing.${OBJ}: listing.c regs.h version.h nasmlib.h nasm.h listing.h
125 macros.${OBJ}: macros.c
126 names.${OBJ}: names.c regs.c insnsn.c
127 nasm.${OBJ}: nasm.c labels.h preproc.h insns.h parser.h eval.h regs.h \
128 outform.h version.h nasmlib.h nasm.h assemble.h insnsi.h listing.h
129 nasmlib.${OBJ}: nasmlib.c insns.h regs.h regs.c version.h nasmlib.h nasm.h \
130 insnsn.c names.c insnsi.h
131 ndisasm.${OBJ}: ndisasm.c insns.h sync.h regs.h version.h nasmlib.h nasm.h \
133 outform.${OBJ}: outform.c regs.h outform.h version.h nasm.h
134 output/outaout.${OBJ}: output/outaout.c regs.h outform.h version.h nasmlib.h \
136 output/outas86.${OBJ}: output/outas86.c regs.h outform.h version.h nasmlib.h \
138 output/outbin.${OBJ}: output/outbin.c labels.h eval.h regs.h outform.h \
139 version.h nasmlib.h nasm.h
140 output/outcoff.${OBJ}: output/outcoff.c regs.h outform.h version.h nasmlib.h \
142 output/outdbg.${OBJ}: output/outdbg.c regs.h outform.h version.h nasmlib.h \
144 output/outelf.${OBJ}: output/outelf.c regs.h outform.h version.h nasmlib.h \
146 output/outieee.${OBJ}: output/outieee.c regs.h outform.h version.h nasmlib.h \
148 output/outobj.${OBJ}: output/outobj.c regs.h outform.h version.h nasmlib.h \
150 output/outrdf.${OBJ}: output/outrdf.c regs.h outform.h version.h nasmlib.h \
152 output/outrdf2.${OBJ}: output/outrdf2.c rdoff/rdoff.h regs.h outform.h \
153 version.h nasmlib.h nasm.h
154 parser.${OBJ}: parser.c insns.h parser.h float.h regs.h regflags.c version.h \
155 nasmlib.h nasm.h insnsi.h
156 preproc.${OBJ}: preproc.c macros.c regs.h version.h nasmlib.h nasm.h
157 regdis.${OBJ}: regdis.c
158 regflags.${OBJ}: regflags.c
160 regvals.${OBJ}: regvals.c
161 sync.${OBJ}: sync.c sync.h