Placated unreferenced types.
[nasm/sigaren-mirror.git] / Makefile.in
blob978e7c5f398568e4c8aa9432d48ad955f9322604
1 # $Id$
3 # Auto-configuring 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 srcdir = @srcdir@
11 VPATH = @srcdir@
12 prefix = @prefix@
13 exec_prefix = @exec_prefix@
14 bindir = @bindir@
15 mandir = @mandir@
17 CC = @CC@
18 CFLAGS = @CFLAGS@
19 BUILD_CFLAGS = $(CFLAGS) @GCCFLAGS@ @DEFS@
20 INTERNAL_CFLAGS = -I$(srcdir) -I.
21 ALL_CFLAGS = $(BUILD_CFLAGS) $(INTERNAL_CFLAGS)
22 LDFLAGS = @LDFLAGS@
23 LIBS = @LIBS@
24 PERL = perl
26 INSTALL = @INSTALL@
27 INSTALL_PROGRAM = @INSTALL_PROGRAM@
28 INSTALL_DATA = @INSTALL_DATA@
30 NROFF = @NROFF@
32 # Binary suffixes
33 O = @OBJEXT@
34 X = @EXEEXT@
36 .SUFFIXES: .c .i .s .$(O) .1 .man
38 .PHONY: all doc rdf install clean distclean cleaner spotless install_rdf
39 .PHONY: install_doc everything install_everything strip perlreq dist
41 .c.$(O):
42 $(CC) -c $(ALL_CFLAGS) -o $@ $<
44 .c.s:
45 $(CC) -S $(ALL_CFLAGS) -o $@ $<
47 .c.i:
48 $(CC) -E $(ALL_CFLAGS) -o $@ $<
50 .1.man:
51 $(NROFF) -man $< > $@
53 NASM = nasm.$(O) nasmlib.$(O) float.$(O) insnsa.$(O) assemble.$(O) \
54 labels.$(O) parser.$(O) outform.$(O) output/outbin.$(O) \
55 output/outaout.$(O) output/outcoff.$(O) output/outelf.$(O) \
56 output/outobj.$(O) output/outas86.$(O) output/outrdf2.$(O) \
57 output/outdbg.$(O) output/outieee.$(O) output/outmacho.$(O) \
58 preproc.$(O) listing.$(O) eval.$(O)
60 NDISASM = ndisasm.$(O) disasm.$(O) sync.$(O) nasmlib.$(O) insnsd.$(O)
62 all: nasm$(X) ndisasm$(X) nasm.man ndisasm.man
63 cd rdoff && $(MAKE) all
65 nasm$(X): $(NASM)
66 $(CC) $(LDFLAGS) -o nasm$(X) $(NASM) $(LIBS)
68 ndisasm$(X): $(NDISASM)
69 $(CC) $(LDFLAGS) -o ndisasm$(X) $(NDISASM) $(LIBS)
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: insns.dat insns.pl
77 $(PERL) $(srcdir)/insns.pl -a $(srcdir)/insns.dat
78 insnsd.c: insns.dat insns.pl
79 $(PERL) $(srcdir)/insns.pl -d $(srcdir)/insns.dat
80 insnsi.h: insns.dat insns.pl
81 $(PERL) $(srcdir)/insns.pl -i $(srcdir)/insns.dat
82 insnsn.c: insns.dat insns.pl
83 $(PERL) $(srcdir)/insns.pl -n $(srcdir)/insns.dat
85 # These files contains all the standard macros that are derived from
86 # the version number.
87 version.h: version version.pl
88 $(PERL) $(srcdir)/version.pl h < $(srcdir)/version > version.h
90 version.mac: version version.pl
91 $(PERL) $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
93 # This source file is generated from the standard macros file
94 # `standard.mac' by another Perl script. Again, it's part of the
95 # standard distribution.
97 macros.c: macros.pl standard.mac version.mac
98 $(PERL) $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac
100 # These source files are generated from regs.dat by yet another
101 # perl script.
102 regs.c: regs.dat regs.pl
103 $(PERL) $(srcdir)/regs.pl c $(srcdir)/regs.dat > regs.c
104 regflags.c: regs.dat regs.pl
105 $(PERL) $(srcdir)/regs.pl fc $(srcdir)/regs.dat > regflags.c
106 regdis.c: regs.dat regs.pl
107 $(PERL) $(srcdir)/regs.pl dc $(srcdir)/regs.dat > regdis.c
108 regvals.c: regs.dat regs.pl
109 $(PERL) $(srcdir)/regs.pl vc $(srcdir)/regs.dat > regvals.c
110 regs.h: regs.dat regs.pl
111 $(PERL) $(srcdir)/regs.pl h $(srcdir)/regs.dat > regs.h
113 # This target generates all files that require perl.
114 # This allows easier generation of distribution (see dist target).
115 PERLREQ = macros.c insnsa.c insnsd.c insnsi.h insnsn.c \
116 regs.c regs.h regflags.c regdis.c regvals.c \
117 version.h version.mac
118 perlreq: $(PERLREQ)
120 install: nasm$(X) ndisasm$(X)
121 $(INSTALL_PROGRAM) nasm$(X) $(INSTALLROOT)$(bindir)/nasm$(X)
122 $(INSTALL_PROGRAM) ndisasm$(X) $(INSTALLROOT)$(bindir)/ndisasm$(X)
123 $(INSTALL_DATA) $(srcdir)/nasm.1 $(INSTALLROOT)$(mandir)/man1/nasm.1
124 $(INSTALL_DATA) $(srcdir)/ndisasm.1 $(INSTALLROOT)$(mandir)/man1/ndisasm.1
126 clean:
127 rm -f *.$(O) *.s *.i
128 rm -f output/*.$(O) output/*.s output/*.i
129 rm -f nasm$(X) ndisasm$(X)
130 cd rdoff && $(MAKE) clean
132 distclean: clean
133 rm -f config.h config.log config.status
134 rm -f Makefile *~ *.bak *.lst *.bin
135 rm -f output/*~ output/*.bak
136 rm -f test/*.lst test/*.bin test/*.$(O) test/*.bin
137 rm -rf autom4te*.cache
138 cd rdoff && $(MAKE) distclean
140 cleaner: clean
141 rm -f $(PERLREQ) *.man nasm.spec
142 cd doc && $(MAKE) clean
144 spotless: distclean cleaner
145 rm -f doc/Makefile doc/*~ doc/*.bak
147 strip:
148 strip --strip-unneeded nasm$(X) ndisasm$(X)
150 rdf:
151 cd rdoff && $(MAKE)
153 rdf_install install_rdf:
154 cd rdoff && $(MAKE) install
156 doc:
157 cd doc && $(MAKE) all
159 doc_install install_doc:
160 cd doc && $(MAKE) install
162 everything: all doc rdf
164 install_everything: everything install install_doc install_rdf
166 dist: spotless perlreq spec
167 autoheader
168 autoconf
169 rm -rf ./autom4te*.cache
171 tar: dist
172 tar cvjf ../nasm-`cat version`-`date +%Y%m%d`.tar.bz2 ../`./nasm-dir`
174 spec: nasm.spec
176 nasm.spec: nasm.spec.in version version.pl
177 sed -e s/@@VERSION@@/`cat $(srcdir)/version`/g \
178 -e s/@@ID@@/`$(PERL) $(srcdir)/version.pl id < $(srcdir)/version`/g \
179 < nasm.spec.in > nasm.spec
181 splint:
182 splint -weak *.c
185 # This build dependencies in *ALL* makefiles. Partially for that reason,
186 # it's expected to be invoked manually.
188 alldeps: perlreq
189 $(PERL) mkdep.pl -M Makefile.in Mkfiles/Makefile.* -- \
190 . output
191 ./config.status
193 #-- Magic hints to mkdep.pl --#
194 # @object-ending: ".$(O)"
195 # @path-separator: "/"
196 #-- Everything below is generated by mkdep.pl - do not edit --#
197 assemble.$(O): assemble.c preproc.h insns.h regs.h version.h nasmlib.h \
198 nasm.h regvals.c assemble.h insnsi.h
199 disasm.$(O): disasm.c insns.h sync.h regdis.c regs.h regs.c version.h nasm.h \
200 insnsn.c names.c insnsi.h disasm.h
201 eval.$(O): eval.c labels.h eval.h regs.h version.h nasmlib.h nasm.h
202 float.$(O): float.c regs.h version.h nasm.h
203 insnsa.$(O): insnsa.c insns.h regs.h version.h nasm.h insnsi.h
204 insnsd.$(O): insnsd.c insns.h regs.h version.h nasm.h insnsi.h
205 insnsn.$(O): insnsn.c
206 labels.$(O): labels.c regs.h version.h nasmlib.h nasm.h
207 listing.$(O): listing.c regs.h version.h nasmlib.h nasm.h listing.h
208 macros.$(O): macros.c
209 names.$(O): names.c regs.c insnsn.c
210 nasm.$(O): nasm.c labels.h preproc.h insns.h parser.h eval.h regs.h \
211 outform.h version.h nasmlib.h nasm.h assemble.h insnsi.h listing.h
212 nasmlib.$(O): nasmlib.c insns.h regs.h regs.c version.h nasmlib.h nasm.h \
213 insnsn.c names.c insnsi.h
214 ndisasm.$(O): ndisasm.c insns.h sync.h regs.h version.h nasmlib.h nasm.h \
215 insnsi.h disasm.h
216 outform.$(O): outform.c regs.h outform.h version.h nasm.h
217 output/outaout.$(O): output/outaout.c regs.h outform.h version.h nasmlib.h \
218 nasm.h
219 output/outas86.$(O): output/outas86.c regs.h outform.h version.h nasmlib.h \
220 nasm.h
221 output/outbin.$(O): output/outbin.c labels.h eval.h regs.h outform.h \
222 version.h nasmlib.h nasm.h
223 output/outcoff.$(O): output/outcoff.c regs.h outform.h version.h nasmlib.h \
224 nasm.h
225 output/outdbg.$(O): output/outdbg.c regs.h outform.h version.h nasmlib.h \
226 nasm.h
227 output/outelf.$(O): output/outelf.c regs.h outform.h version.h nasmlib.h \
228 nasm.h
229 output/outieee.$(O): output/outieee.c regs.h outform.h version.h nasmlib.h \
230 nasm.h
231 output/outobj.$(O): output/outobj.c regs.h outform.h version.h nasmlib.h \
232 nasm.h
233 output/outrdf.$(O): output/outrdf.c regs.h outform.h version.h nasmlib.h \
234 nasm.h
235 output/outrdf2.$(O): output/outrdf2.c rdoff/rdoff.h regs.h outform.h \
236 version.h nasmlib.h nasm.h
237 parser.$(O): parser.c insns.h parser.h float.h regs.h regflags.c version.h \
238 nasmlib.h nasm.h insnsi.h
239 preproc.$(O): preproc.c macros.c regs.h version.h nasmlib.h nasm.h
240 regdis.$(O): regdis.c
241 regflags.$(O): regflags.c
242 regs.$(O): regs.c
243 regvals.$(O): regvals.c
244 sync.$(O): sync.c sync.h