insns.pl: fix regex subgroup of /is4= codes
[nasm/perl-rewrite.git] / Makefile.in
blob914c8741e0a03be1326c0cf62787963ad0f63a67
2 # Auto-configuring Makefile for the Netwide Assembler.
4 # The Netwide Assembler is copyright (C) 1996 Simon Tatham and
5 # Julian Hall. All rights reserved. The software is
6 # redistributable under the license given in the file "LICENSE"
7 # distributed in the NASM archive.
9 top_srcdir = @top_srcdir@
10 srcdir = @srcdir@
11 VPATH = @srcdir@
12 prefix = @prefix@
13 exec_prefix = @exec_prefix@
14 bindir = @bindir@
15 mandir = @mandir@
16 datarootdir = @datarootdir@
18 CC = @CC@
19 CFLAGS = @CFLAGS@
20 BUILD_CFLAGS = $(CFLAGS) @DEFS@
21 INTERNAL_CFLAGS = -I$(srcdir) -I.
22 ALL_CFLAGS = $(BUILD_CFLAGS) $(INTERNAL_CFLAGS)
23 LDFLAGS = @LDFLAGS@
24 LIBS = @LIBS@
25 PERL = perl -I$(srcdir)/perllib
27 XOBJS = @XOBJS@
29 INSTALL = @INSTALL@
30 INSTALL_PROGRAM = @INSTALL_PROGRAM@
31 INSTALL_DATA = @INSTALL_DATA@
33 NROFF = @NROFF@
35 MKDIR = mkdir
36 RM = rm
38 STRIP = strip
40 # Binary suffixes
41 O = @OBJEXT@
42 X = @EXEEXT@
44 .SUFFIXES: .c .i .s .$(O) .1 .man
46 .PHONY: all doc rdf install clean distclean cleaner spotless install_rdf
47 .PHONY: install_doc everything install_everything strip perlreq dist
49 .c.$(O):
50 $(CC) -c $(ALL_CFLAGS) -o $@ $<
52 .c.s:
53 $(CC) -S $(ALL_CFLAGS) -o $@ $<
55 .c.i:
56 $(CC) -E $(ALL_CFLAGS) -o $@ $<
58 .1.man:
59 $(NROFF) -man $< > $@
61 NASM = nasm.$(O) nasmlib.$(O) float.$(O) insnsa.$(O) insnsb.$(O) \
62 assemble.$(O) labels.$(O) hashtbl.$(O) crc64.$(O) parser.$(O) \
63 outform.$(O) output/outbin.$(O) \
64 output/outaout.$(O) output/outcoff.$(O) \
65 output/outelf32.$(O) output/outelf64.$(O) \
66 output/outobj.$(O) output/outas86.$(O) output/outrdf2.$(O) \
67 output/outdbg.$(O) output/outieee.$(O) output/outmacho.$(O) \
68 preproc.$(O) pptok.$(O) \
69 listing.$(O) eval.$(O) exprlib.$(O) stdscan.$(O) tokhash.$(O)
71 NDISASM = ndisasm.$(O) disasm.$(O) sync.$(O) nasmlib.$(O) \
72 insnsd.$(O) insnsb.$(O)
74 all: nasm$(X) ndisasm$(X) nasm.man ndisasm.man
75 cd rdoff && $(MAKE) all
77 nasm$(X): $(NASM) $(XOBJS)
78 $(CC) $(LDFLAGS) -o nasm$(X) $(NASM) $(XOBJS) $(LIBS)
80 ndisasm$(X): $(NDISASM) $(XOBJS)
81 $(CC) $(LDFLAGS) -o ndisasm$(X) $(NDISASM) $(XOBJS) $(LIBS)
83 # These source files are automagically generated from a single
84 # instruction-table file by a Perl script. They're distributed,
85 # though, so it isn't necessary to have Perl just to recompile NASM
86 # from the distribution.
88 insnsb.c: insns.dat insns.pl
89 $(PERL) $(srcdir)/insns.pl -b $(srcdir)/insns.dat
90 insnsa.c: insns.dat insns.pl
91 $(PERL) $(srcdir)/insns.pl -a $(srcdir)/insns.dat
92 insnsd.c: insns.dat insns.pl
93 $(PERL) $(srcdir)/insns.pl -d $(srcdir)/insns.dat
94 insnsi.h: insns.dat insns.pl
95 $(PERL) $(srcdir)/insns.pl -i $(srcdir)/insns.dat
96 insnsn.c: insns.dat insns.pl
97 $(PERL) $(srcdir)/insns.pl -n $(srcdir)/insns.dat
99 # These files contains all the standard macros that are derived from
100 # the version number.
101 version.h: version version.pl
102 $(PERL) $(srcdir)/version.pl h < $(srcdir)/version > version.h
104 version.mac: version version.pl
105 $(PERL) $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
107 version.sed: version version.pl
108 $(PERL) $(srcdir)/version.pl sed < $(srcdir)/version > version.sed
110 # This source file is generated from the standard macros file
111 # `standard.mac' by another Perl script. Again, it's part of the
112 # standard distribution.
114 macros.c: macros.pl standard.mac version.mac
115 $(PERL) $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac
117 # These source files are generated from regs.dat by yet another
118 # perl script.
119 regs.c: regs.dat regs.pl
120 $(PERL) $(srcdir)/regs.pl c $(srcdir)/regs.dat > regs.c
121 regflags.c: regs.dat regs.pl
122 $(PERL) $(srcdir)/regs.pl fc $(srcdir)/regs.dat > regflags.c
123 regdis.c: regs.dat regs.pl
124 $(PERL) $(srcdir)/regs.pl dc $(srcdir)/regs.dat > regdis.c
125 regvals.c: regs.dat regs.pl
126 $(PERL) $(srcdir)/regs.pl vc $(srcdir)/regs.dat > regvals.c
127 regs.h: regs.dat regs.pl
128 $(PERL) $(srcdir)/regs.pl h $(srcdir)/regs.dat > regs.h
130 # Assembler token hash
131 tokhash.c: insns.dat regs.dat tokens.dat tokhash.pl perllib/phash.ph
132 $(PERL) $(srcdir)/tokhash.pl c $(srcdir)/insns.dat $(srcdir)/regs.dat \
133 $(srcdir)/tokens.dat > tokhash.c
135 # Assembler token metadata
136 tokens.h: insns.dat regs.dat tokens.dat tokhash.pl perllib/phash.ph
137 $(PERL) $(srcdir)/tokhash.pl h $(srcdir)/insns.dat $(srcdir)/regs.dat \
138 $(srcdir)/tokens.dat > tokens.h
140 # Preprocessor token hash
141 pptok.h: pptok.dat pptok.pl perllib/phash.ph
142 $(PERL) $(srcdir)/pptok.pl h $(srcdir)/pptok.dat pptok.h
143 pptok.c: pptok.dat pptok.pl perllib/phash.ph
144 $(PERL) $(srcdir)/pptok.pl c $(srcdir)/pptok.dat pptok.c
146 # This target generates all files that require perl.
147 # This allows easier generation of distribution (see dist target).
148 PERLREQ = macros.c insnsb.c insnsa.c insnsd.c insnsi.h insnsn.c \
149 regs.c regs.h regflags.c regdis.c regvals.c tokhash.c tokens.h \
150 version.h version.mac pptok.h pptok.c
151 perlreq: $(PERLREQ)
153 install: nasm$(X) ndisasm$(X)
154 $(MKDIR) -p $(INSTALLROOT)$(bindir)
155 $(INSTALL_PROGRAM) nasm$(X) $(INSTALLROOT)$(bindir)/nasm$(X)
156 $(INSTALL_PROGRAM) ndisasm$(X) $(INSTALLROOT)$(bindir)/ndisasm$(X)
157 $(MKDIR) -p $(INSTALLROOT)$(mandir)/man1
158 $(INSTALL_DATA) $(srcdir)/nasm.1 $(INSTALLROOT)$(mandir)/man1/nasm.1
159 $(INSTALL_DATA) $(srcdir)/ndisasm.1 $(INSTALLROOT)$(mandir)/man1/ndisasm.1
161 clean:
162 $(RM) -f *.$(O) *.s *.i
163 $(RM) -f output/*.$(O) output/*.s output/*.i
164 $(RM) -f nasm$(X) ndisasm$(X)
165 cd rdoff && $(MAKE) clean
167 distclean: clean
168 $(RM) -f config.h config.log config.status
169 $(RM) -f Makefile *~ *.bak *.lst *.bin
170 $(RM) -f output/*~ output/*.bak
171 $(RM) -f test/*.lst test/*.bin test/*.$(O) test/*.bin
172 $(RM) -rf autom4te*.cache
173 cd rdoff && $(MAKE) distclean
175 cleaner: clean
176 $(RM) -f $(PERLREQ) *.man nasm.spec
177 cd doc && $(MAKE) clean
179 spotless: distclean cleaner
180 $(RM) -f doc/Makefile doc/*~ doc/*.bak
182 strip:
183 $(STRIP) --strip-unneeded nasm$(X) ndisasm$(X)
185 rdf:
186 cd rdoff && $(MAKE)
188 rdf_install install_rdf:
189 cd rdoff && $(MAKE) install
191 doc:
192 cd doc && $(MAKE) all
194 doc_install install_doc:
195 cd doc && $(MAKE) install
197 everything: all doc rdf
199 install_everything: everything install install_doc install_rdf
201 dist: spotless perlreq spec
202 autoheader
203 autoconf
204 $(RM) -rf ./autom4te*.cache
206 tar: dist
207 tar -cvj --exclude CVS -C .. -f ../nasm-`cat version`-`date +%Y%m%d`.tar.bz2 `basename \`pwd\``
209 spec: nasm.spec
211 nasm.spec: nasm.spec.in version.sed
212 sed -f version.sed < nasm.spec.in > nasm.spec
214 splint:
215 splint -weak *.c
218 # This build dependencies in *ALL* makefiles. Partially for that reason,
219 # it's expected to be invoked manually.
221 alldeps: perlreq
222 $(PERL) mkdep.pl -M Makefile.in Mkfiles/*.mak -- \
223 . output lib
224 ./config.status
226 #-- Magic hints to mkdep.pl --#
227 # @object-ending: ".$(O)"
228 # @path-separator: "/"
229 #-- Everything below is generated by mkdep.pl - do not edit --#
230 assemble.$(O): assemble.c assemble.h compiler.h config.h insns.h insnsi.h \
231 nasm.h nasmlib.h pptok.h preproc.h regflags.c regs.h regvals.c tokens.h \
232 version.h
233 crc64.$(O): crc64.c compiler.h config.h
234 disasm.$(O): disasm.c compiler.h config.h disasm.h insns.h insnsi.h insnsn.c \
235 names.c nasm.h nasmlib.h regdis.c regs.c regs.h sync.h tokens.h version.h
236 eval.$(O): eval.c compiler.h config.h eval.h float.h insnsi.h labels.h \
237 nasm.h nasmlib.h regs.h version.h
238 exprlib.$(O): exprlib.c compiler.h config.h insnsi.h nasm.h nasmlib.h regs.h \
239 version.h
240 float.$(O): float.c compiler.h config.h float.h insnsi.h nasm.h nasmlib.h \
241 regs.h version.h
242 hashtbl.$(O): hashtbl.c compiler.h config.h hashtbl.h insnsi.h nasm.h \
243 nasmlib.h regs.h version.h
244 insnsa.$(O): insnsa.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
245 regs.h tokens.h version.h
246 insnsb.$(O): insnsb.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
247 regs.h tokens.h version.h
248 insnsd.$(O): insnsd.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
249 regs.h tokens.h version.h
250 insnsn.$(O): insnsn.c
251 labels.$(O): labels.c compiler.h config.h hashtbl.h insnsi.h nasm.h \
252 nasmlib.h regs.h version.h
253 lib/snprintf.$(O): lib/snprintf.c compiler.h config.h nasmlib.h
254 lib/vsnprintf.$(O): lib/vsnprintf.c compiler.h config.h nasmlib.h
255 listing.$(O): listing.c compiler.h config.h insnsi.h listing.h nasm.h \
256 nasmlib.h regs.h version.h
257 macros.$(O): macros.c compiler.h config.h
258 names.$(O): names.c compiler.h config.h insnsn.c regs.c
259 nasm.$(O): nasm.c assemble.h compiler.h config.h eval.h float.h insns.h \
260 insnsi.h labels.h listing.h nasm.h nasmlib.h outform.h parser.h pptok.h \
261 preproc.h regs.h stdscan.h tokens.h version.h
262 nasmlib.$(O): nasmlib.c compiler.h config.h insns.h insnsi.h nasm.h \
263 nasmlib.h regs.h tokens.h version.h
264 ndisasm.$(O): ndisasm.c compiler.h config.h disasm.h insns.h insnsi.h nasm.h \
265 nasmlib.h regs.h sync.h tokens.h version.h
266 outform.$(O): outform.c compiler.h config.h insnsi.h nasm.h nasmlib.h \
267 outform.h regs.h version.h
268 output/outaout.$(O): output/outaout.c compiler.h config.h insnsi.h nasm.h \
269 nasmlib.h outform.h regs.h stdscan.h version.h
270 output/outas86.$(O): output/outas86.c compiler.h config.h insnsi.h nasm.h \
271 nasmlib.h outform.h regs.h version.h
272 output/outbin.$(O): output/outbin.c compiler.h config.h eval.h insnsi.h \
273 labels.h nasm.h nasmlib.h outform.h regs.h stdscan.h version.h
274 output/outcoff.$(O): output/outcoff.c compiler.h config.h insnsi.h nasm.h \
275 nasmlib.h outform.h regs.h version.h
276 output/outdbg.$(O): output/outdbg.c compiler.h config.h insnsi.h nasm.h \
277 nasmlib.h outform.h regs.h version.h
278 output/outelf32.$(O): output/outelf32.c compiler.h config.h insnsi.h nasm.h \
279 nasmlib.h outform.h regs.h stdscan.h version.h wsaa.h
280 output/outelf64.$(O): output/outelf64.c compiler.h config.h insnsi.h nasm.h \
281 nasmlib.h outform.h regs.h stdscan.h version.h wsaa.h
282 output/outieee.$(O): output/outieee.c compiler.h config.h insnsi.h nasm.h \
283 nasmlib.h outform.h regs.h version.h
284 output/outmacho.$(O): output/outmacho.c compiler.h config.h insnsi.h nasm.h \
285 nasmlib.h outform.h regs.h version.h
286 output/outobj.$(O): output/outobj.c compiler.h config.h insnsi.h nasm.h \
287 nasmlib.h outform.h regs.h stdscan.h version.h
288 output/outrdf.$(O): output/outrdf.c compiler.h config.h insnsi.h nasm.h \
289 nasmlib.h outform.h regs.h version.h
290 output/outrdf2.$(O): output/outrdf2.c compiler.h config.h insnsi.h nasm.h \
291 nasmlib.h outform.h rdoff/rdoff.h regs.h version.h
292 parser.$(O): parser.c compiler.h config.h float.h insns.h insnsi.h nasm.h \
293 nasmlib.h parser.h regflags.c regs.h stdscan.h tokens.h version.h
294 pptok.$(O): pptok.c compiler.h config.h hashtbl.h nasmlib.h pptok.h \
295 preproc.h
296 preproc.$(O): preproc.c compiler.h config.h hashtbl.h insnsi.h macros.c \
297 nasm.h nasmlib.h pptok.h preproc.h regs.h stdscan.h tokens.h version.h
298 regdis.$(O): regdis.c
299 regflags.$(O): regflags.c
300 regs.$(O): regs.c compiler.h config.h
301 regvals.$(O): regvals.c
302 stdscan.$(O): stdscan.c compiler.h config.h insns.h insnsi.h nasm.h \
303 nasmlib.h regs.h stdscan.h tokens.h version.h
304 sync.$(O): sync.c compiler.h config.h nasmlib.h sync.h
305 tokhash.$(O): tokhash.c compiler.h config.h hashtbl.h insns.h insnsi.h \
306 nasm.h nasmlib.h regs.h tokens.h version.h