saa: fix indentation
[nasm.git] / Makefile.in
blobf8f336141d56a524015cc971847f71a54b8af6bd
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 #-- Begin File Lists --#
62 NASM = nasm.$(O) nasmlib.$(O) raa.$(O) saa.$(O) \
63 float.$(O) insnsa.$(O) insnsb.$(O) \
64 assemble.$(O) labels.$(O) hashtbl.$(O) crc64.$(O) parser.$(O) \
65 outform.$(O) output/outbin.$(O) \
66 output/outaout.$(O) output/outcoff.$(O) \
67 output/outelf32.$(O) output/outelf64.$(O) \
68 output/outobj.$(O) output/outas86.$(O) output/outrdf2.$(O) \
69 output/outdbg.$(O) output/outieee.$(O) output/outmacho.$(O) \
70 preproc.$(O) quote.$(O) pptok.$(O) macros.$(O) \
71 listing.$(O) eval.$(O) exprlib.$(O) stdscan.$(O) strfunc.$(O) \
72 tokhash.$(O) regvals.$(O) regflags.$(O)
74 NDISASM = ndisasm.$(O) disasm.$(O) sync.$(O) nasmlib.$(O) \
75 insnsd.$(O) insnsb.$(O) insnsn.$(O) regs.$(O) regdis.$(O)
76 #-- End File Lists --#
78 all: nasm$(X) ndisasm$(X) nasm.man ndisasm.man
79 cd rdoff && $(MAKE) all
81 nasm$(X): $(NASM) $(XOBJS)
82 $(CC) $(LDFLAGS) -o nasm$(X) $(NASM) $(XOBJS) $(LIBS)
84 ndisasm$(X): $(NDISASM) $(XOBJS)
85 $(CC) $(LDFLAGS) -o ndisasm$(X) $(NDISASM) $(XOBJS) $(LIBS)
87 # These source files are automagically generated from a single
88 # instruction-table file by a Perl script. They're distributed,
89 # though, so it isn't necessary to have Perl just to recompile NASM
90 # from the distribution.
92 insnsb.c: insns.dat insns.pl
93 $(PERL) $(srcdir)/insns.pl -b $(srcdir)/insns.dat
94 insnsa.c: insns.dat insns.pl
95 $(PERL) $(srcdir)/insns.pl -a $(srcdir)/insns.dat
96 insnsd.c: insns.dat insns.pl
97 $(PERL) $(srcdir)/insns.pl -d $(srcdir)/insns.dat
98 insnsi.h: insns.dat insns.pl
99 $(PERL) $(srcdir)/insns.pl -i $(srcdir)/insns.dat
100 insnsn.c: insns.dat insns.pl
101 $(PERL) $(srcdir)/insns.pl -n $(srcdir)/insns.dat
103 # These files contains all the standard macros that are derived from
104 # the version number.
105 version.h: version version.pl
106 $(PERL) $(srcdir)/version.pl h < $(srcdir)/version > version.h
108 version.mac: version version.pl
109 $(PERL) $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
111 version.sed: version version.pl
112 $(PERL) $(srcdir)/version.pl sed < $(srcdir)/version > version.sed
114 # This source file is generated from the standard macros file
115 # `standard.mac' by another Perl script. Again, it's part of the
116 # standard distribution.
117 macros.c: macros.pl pptok.ph standard.mac version.mac $(srcdir)/macros/*.mac
118 $(PERL) $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac \
119 $(srcdir)/macros/*.mac
121 # These source files are generated from regs.dat by yet another
122 # perl script.
123 regs.c: regs.dat regs.pl
124 $(PERL) $(srcdir)/regs.pl c $(srcdir)/regs.dat > regs.c
125 regflags.c: regs.dat regs.pl
126 $(PERL) $(srcdir)/regs.pl fc $(srcdir)/regs.dat > regflags.c
127 regdis.c: regs.dat regs.pl
128 $(PERL) $(srcdir)/regs.pl dc $(srcdir)/regs.dat > regdis.c
129 regdis.h: regs.dat regs.pl
130 $(PERL) $(srcdir)/regs.pl dh $(srcdir)/regs.dat > regdis.h
131 regvals.c: regs.dat regs.pl
132 $(PERL) $(srcdir)/regs.pl vc $(srcdir)/regs.dat > regvals.c
133 regs.h: regs.dat regs.pl
134 $(PERL) $(srcdir)/regs.pl h $(srcdir)/regs.dat > regs.h
136 # Assembler token hash
137 tokhash.c: insns.dat regs.dat tokens.dat tokhash.pl perllib/phash.ph
138 $(PERL) $(srcdir)/tokhash.pl c $(srcdir)/insns.dat $(srcdir)/regs.dat \
139 $(srcdir)/tokens.dat > tokhash.c
141 # Assembler token metadata
142 tokens.h: insns.dat regs.dat tokens.dat tokhash.pl perllib/phash.ph
143 $(PERL) $(srcdir)/tokhash.pl h $(srcdir)/insns.dat $(srcdir)/regs.dat \
144 $(srcdir)/tokens.dat > tokens.h
146 # Preprocessor token hash
147 pptok.h: pptok.dat pptok.pl perllib/phash.ph
148 $(PERL) $(srcdir)/pptok.pl h $(srcdir)/pptok.dat pptok.h
149 pptok.c: pptok.dat pptok.pl perllib/phash.ph
150 $(PERL) $(srcdir)/pptok.pl c $(srcdir)/pptok.dat pptok.c
151 pptok.ph: pptok.dat pptok.pl perllib/phash.ph
152 $(PERL) $(srcdir)/pptok.pl ph $(srcdir)/pptok.dat pptok.ph
154 # This target generates all files that require perl.
155 # This allows easier generation of distribution (see dist target).
156 PERLREQ = macros.c insnsb.c insnsa.c insnsd.c insnsi.h insnsn.c \
157 regs.c regs.h regflags.c regdis.c regdis.h regvals.c \
158 tokhash.c tokens.h pptok.h pptok.c pptok.ph \
159 version.h version.mac
160 perlreq: $(PERLREQ)
162 install: nasm$(X) ndisasm$(X)
163 $(MKDIR) -p $(INSTALLROOT)$(bindir)
164 $(INSTALL_PROGRAM) nasm$(X) $(INSTALLROOT)$(bindir)/nasm$(X)
165 $(INSTALL_PROGRAM) ndisasm$(X) $(INSTALLROOT)$(bindir)/ndisasm$(X)
166 $(MKDIR) -p $(INSTALLROOT)$(mandir)/man1
167 $(INSTALL_DATA) $(srcdir)/nasm.1 $(INSTALLROOT)$(mandir)/man1/nasm.1
168 $(INSTALL_DATA) $(srcdir)/ndisasm.1 $(INSTALLROOT)$(mandir)/man1/ndisasm.1
170 clean:
171 $(RM) -f *.$(O) *.s *.i
172 $(RM) -f output/*.$(O) output/*.s output/*.i
173 $(RM) -f nasm$(X) ndisasm$(X)
174 cd rdoff && $(MAKE) clean
176 distclean: clean
177 $(RM) -f config.h config.log config.status
178 $(RM) -f Makefile *~ *.bak *.lst *.bin
179 $(RM) -f output/*~ output/*.bak
180 $(RM) -f test/*.lst test/*.bin test/*.$(O) test/*.bin
181 $(RM) -rf autom4te*.cache
182 cd rdoff && $(MAKE) distclean
184 cleaner: clean
185 $(RM) -f $(PERLREQ) *.man nasm.spec
186 cd doc && $(MAKE) clean
188 spotless: distclean cleaner
189 $(RM) -f doc/Makefile doc/*~ doc/*.bak
191 strip:
192 $(STRIP) --strip-unneeded nasm$(X) ndisasm$(X)
194 rdf:
195 cd rdoff && $(MAKE)
197 rdf_install install_rdf:
198 cd rdoff && $(MAKE) install
200 doc:
201 cd doc && $(MAKE) all
203 doc_install install_doc:
204 cd doc && $(MAKE) install
206 everything: all doc rdf
208 install_everything: everything install install_doc install_rdf
210 dist: spotless perlreq spec
211 autoheader
212 autoconf
213 $(RM) -rf ./autom4te*.cache
215 tar: dist
216 tar -cvj --exclude CVS -C .. -f ../nasm-`cat version`-`date +%Y%m%d`.tar.bz2 `basename \`pwd\``
218 spec: nasm.spec
220 nasm.spec: nasm.spec.in version.sed
221 sed -f version.sed < nasm.spec.in > nasm.spec
223 splint:
224 splint -weak *.c
227 # This build dependencies in *ALL* makefiles. Partially for that reason,
228 # it's expected to be invoked manually.
230 alldeps: perlreq
231 $(PERL) syncfiles.pl Makefile.in Mkfiles/*.mak
232 $(PERL) mkdep.pl -M Makefile.in Mkfiles/*.mak -- \
233 . output lib
234 ./config.status
236 #-- Magic hints to mkdep.pl --#
237 # @object-ending: ".$(O)"
238 # @path-separator: "/"
239 #-- Everything below is generated by mkdep.pl - do not edit --#
240 assemble.$(O): assemble.c assemble.h compiler.h config.h insns.h insnsi.h \
241 nasm.h nasmlib.h regs.h tables.h tokens.h version.h
242 crc64.$(O): crc64.c compiler.h config.h nasmlib.h
243 disasm.$(O): disasm.c compiler.h config.h disasm.h insns.h insnsi.h nasm.h \
244 nasmlib.h regdis.h regs.h sync.h tables.h tokens.h version.h
245 eval.$(O): eval.c compiler.h config.h eval.h float.h insnsi.h labels.h \
246 nasm.h nasmlib.h regs.h version.h
247 exprlib.$(O): exprlib.c compiler.h config.h insnsi.h nasm.h nasmlib.h regs.h \
248 version.h
249 float.$(O): float.c compiler.h config.h float.h insnsi.h nasm.h nasmlib.h \
250 regs.h version.h
251 hashtbl.$(O): hashtbl.c compiler.h config.h hashtbl.h insnsi.h nasm.h \
252 nasmlib.h regs.h version.h
253 insnsa.$(O): insnsa.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
254 regs.h tokens.h version.h
255 insnsb.$(O): insnsb.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
256 regs.h tokens.h version.h
257 insnsd.$(O): insnsd.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
258 regs.h tokens.h version.h
259 insnsn.$(O): insnsn.c compiler.h config.h insnsi.h tables.h
260 labels.$(O): labels.c compiler.h config.h hashtbl.h insnsi.h nasm.h \
261 nasmlib.h regs.h version.h
262 lib/snprintf.$(O): lib/snprintf.c compiler.h config.h nasmlib.h
263 lib/vsnprintf.$(O): lib/vsnprintf.c compiler.h config.h nasmlib.h
264 listing.$(O): listing.c compiler.h config.h insnsi.h listing.h nasm.h \
265 nasmlib.h regs.h version.h
266 macros.$(O): macros.c compiler.h config.h hashtbl.h insnsi.h nasmlib.h \
267 tables.h
268 nasm.$(O): nasm.c assemble.h compiler.h config.h eval.h float.h insns.h \
269 insnsi.h labels.h listing.h nasm.h nasmlib.h outform.h parser.h pptok.h \
270 preproc.h raa.h regs.h saa.h stdscan.h tokens.h version.h
271 nasmlib.$(O): nasmlib.c compiler.h config.h insns.h insnsi.h nasm.h \
272 nasmlib.h regs.h tokens.h version.h
273 ndisasm.$(O): ndisasm.c compiler.h config.h disasm.h insns.h insnsi.h nasm.h \
274 nasmlib.h regs.h sync.h tokens.h version.h
275 outform.$(O): outform.c compiler.h config.h insnsi.h nasm.h nasmlib.h \
276 outform.h regs.h version.h
277 output/outaout.$(O): output/outaout.c compiler.h config.h insnsi.h nasm.h \
278 nasmlib.h outform.h raa.h regs.h saa.h stdscan.h version.h
279 output/outas86.$(O): output/outas86.c compiler.h config.h insnsi.h nasm.h \
280 nasmlib.h outform.h raa.h regs.h saa.h version.h
281 output/outbin.$(O): output/outbin.c compiler.h config.h eval.h insnsi.h \
282 labels.h nasm.h nasmlib.h outform.h regs.h saa.h stdscan.h version.h
283 output/outcoff.$(O): output/outcoff.c compiler.h config.h insnsi.h nasm.h \
284 nasmlib.h outform.h raa.h regs.h saa.h version.h
285 output/outdbg.$(O): output/outdbg.c compiler.h config.h insnsi.h nasm.h \
286 nasmlib.h outform.h regs.h version.h
287 output/outelf32.$(O): output/outelf32.c compiler.h config.h insnsi.h nasm.h \
288 nasmlib.h outform.h raa.h regs.h saa.h stdscan.h version.h
289 output/outelf64.$(O): output/outelf64.c compiler.h config.h insnsi.h nasm.h \
290 nasmlib.h outform.h raa.h regs.h saa.h stdscan.h version.h
291 output/outieee.$(O): output/outieee.c compiler.h config.h insnsi.h nasm.h \
292 nasmlib.h outform.h regs.h version.h
293 output/outmacho.$(O): output/outmacho.c compiler.h config.h insnsi.h nasm.h \
294 nasmlib.h outform.h raa.h regs.h saa.h version.h
295 output/outobj.$(O): output/outobj.c compiler.h config.h insnsi.h nasm.h \
296 nasmlib.h outform.h regs.h stdscan.h version.h
297 output/outrdf.$(O): output/outrdf.c compiler.h config.h insnsi.h nasm.h \
298 nasmlib.h outform.h regs.h version.h
299 output/outrdf2.$(O): output/outrdf2.c compiler.h config.h insnsi.h nasm.h \
300 nasmlib.h outform.h rdoff/rdoff.h regs.h saa.h version.h
301 parser.$(O): parser.c compiler.h config.h float.h insns.h insnsi.h nasm.h \
302 nasmlib.h parser.h regs.h stdscan.h tables.h tokens.h version.h
303 pptok.$(O): pptok.c compiler.h config.h hashtbl.h nasmlib.h pptok.h \
304 preproc.h
305 preproc.$(O): preproc.c compiler.h config.h hashtbl.h insnsi.h nasm.h \
306 nasmlib.h pptok.h preproc.h quote.h regs.h stdscan.h tables.h tokens.h \
307 version.h
308 quote.$(O): quote.c compiler.h config.h nasmlib.h quote.h
309 raa.$(O): raa.c compiler.h config.h nasmlib.h raa.h
310 regdis.$(O): regdis.c regdis.h regs.h
311 regflags.$(O): regflags.c compiler.h config.h insnsi.h nasm.h nasmlib.h \
312 regs.h tables.h version.h
313 regs.$(O): regs.c compiler.h config.h insnsi.h tables.h
314 regvals.$(O): regvals.c compiler.h config.h insnsi.h tables.h
315 saa.$(O): saa.c compiler.h config.h nasmlib.h saa.h
316 stdscan.$(O): stdscan.c compiler.h config.h insns.h insnsi.h nasm.h \
317 nasmlib.h quote.h regs.h stdscan.h tokens.h version.h
318 strfunc.$(O): strfunc.c compiler.h config.h insnsi.h nasm.h nasmlib.h regs.h \
319 version.h
320 sync.$(O): sync.c compiler.h config.h nasmlib.h sync.h
321 tokhash.$(O): tokhash.c compiler.h config.h hashtbl.h insns.h insnsi.h \
322 nasm.h nasmlib.h regs.h tokens.h version.h