Add support for the new instructions in Prescott
[nasm.git] / Makefile.in
blobca7103d948e60374e0610828bef8292ce688d497
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@ @GCCFLAGS@ -I$(srcdir) -I.
19 LDFLAGS = @LDFLAGS@
20 LIBS = @LIBS@
21 PERL = perl
23 INSTALL = @INSTALL@
24 INSTALL_PROGRAM = @INSTALL_PROGRAM@
25 INSTALL_DATA = @INSTALL_DATA@
27 NROFF = @NROFF@
29 # Binary suffixes
30 O = @OBJEXT@
31 X = @EXEEXT@
33 .SUFFIXES: .c .i .s .$(O) .1 .man
35 .PHONY: all doc rdf install clean distclean cleaner spotless install_rdf
36 .PHONY: install_doc everything install_everything strip perlreq dist
38 .c.$(O):
39 $(CC) -c $(CFLAGS) -o $@ $<
41 .c.s:
42 $(CC) -S $(CFLAGS) -o $@ $<
44 .c.i:
45 $(CC) -E $(CFLAGS) -o $@ $<
47 .1.man:
48 $(NROFF) -man $< > $@
50 NASM = nasm.$(O) nasmlib.$(O) float.$(O) insnsa.$(O) assemble.$(O) \
51 labels.$(O) parser.$(O) outform.$(O) output/outbin.$(O) \
52 output/outaout.$(O) output/outcoff.$(O) output/outelf.$(O) \
53 output/outobj.$(O) output/outas86.$(O) output/outrdf2.$(O) \
54 output/outdbg.$(O) output/outieee.$(O) \
55 preproc.$(O) listing.$(O) eval.$(O)
57 NDISASM = ndisasm.$(O) disasm.$(O) sync.$(O) nasmlib.$(O) insnsd.$(O)
59 all: nasm$(X) ndisasm$(X) nasm.man ndisasm.man
60 cd rdoff && $(MAKE) all
62 nasm$(X): $(NASM)
63 $(CC) $(LDFLAGS) -o nasm$(X) $(NASM) $(LIBS)
65 ndisasm$(X): $(NDISASM)
66 $(CC) $(LDFLAGS) -o ndisasm$(X) $(NDISASM) $(LIBS)
68 # These source files are automagically generated from a single
69 # instruction-table file by a Perl script. They're distributed,
70 # though, so it isn't necessary to have Perl just to recompile NASM
71 # from the distribution.
73 insnsa.c: insns.dat insns.pl
74 $(PERL) $(srcdir)/insns.pl -a $(srcdir)/insns.dat
75 insnsd.c: insns.dat insns.pl
76 $(PERL) $(srcdir)/insns.pl -d $(srcdir)/insns.dat
77 insnsi.h: insns.dat insns.pl
78 $(PERL) $(srcdir)/insns.pl -i $(srcdir)/insns.dat
79 insnsn.c: insns.dat insns.pl
80 $(PERL) $(srcdir)/insns.pl -n $(srcdir)/insns.dat
82 # These files contains all the standard macros that are derived from
83 # the version number.
84 version.h: version version.pl
85 $(PERL) $(srcdir)/version.pl h < $(srcdir)/version > version.h
87 version.mac: version version.pl
88 $(PERL) $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
90 # This source file is generated from the standard macros file
91 # `standard.mac' by another Perl script. Again, it's part of the
92 # standard distribution.
94 macros.c: macros.pl standard.mac version.mac
95 $(PERL) $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac
97 # These source files are generated from regs.dat by yet another
98 # perl script.
99 regs.c: regs.dat regs.pl
100 $(PERL) $(srcdir)/regs.pl c $(srcdir)/regs.dat > regs.c
101 regflags.c: regs.dat regs.pl
102 $(PERL) $(srcdir)/regs.pl fc $(srcdir)/regs.dat > regflags.c
103 regdis.c: regs.dat regs.pl
104 $(PERL) $(srcdir)/regs.pl dc $(srcdir)/regs.dat > regdis.c
105 regvals.c: regs.dat regs.pl
106 $(PERL) $(srcdir)/regs.pl vc $(srcdir)/regs.dat > regvals.c
107 regs.h: regs.dat regs.pl
108 $(PERL) $(srcdir)/regs.pl h $(srcdir)/regs.dat > regs.h
110 # This target generates all files that require perl.
111 # This allows easier generation of distribution (see dist target).
112 PERLREQ = macros.c insnsa.c insnsd.c insnsi.h insnsn.c \
113 regs.c regs.h regflags.c regdis.c regvals.c \
114 version.h version.mac
115 perlreq: $(PERLREQ)
117 install: nasm$(X) ndisasm$(X)
118 $(INSTALL_PROGRAM) nasm$(X) $(INSTALLROOT)$(bindir)/nasm$(X)
119 $(INSTALL_PROGRAM) ndisasm$(X) $(INSTALLROOT)$(bindir)/ndisasm$(X)
120 $(INSTALL_DATA) $(srcdir)/nasm.1 $(INSTALLROOT)$(mandir)/man1/nasm.1
121 $(INSTALL_DATA) $(srcdir)/ndisasm.1 $(INSTALLROOT)$(mandir)/man1/ndisasm.1
123 clean:
124 rm -f *.$(O) *.s *.i
125 rm -f output/*.$(O) output/*.s output/*.i
126 rm -f nasm$(X) ndisasm$(X)
127 cd rdoff && $(MAKE) clean
129 distclean: clean
130 rm -f config.* Makefile *~ *.bak *.lst *.bin
131 rm -f output/*~ output/*.bak
132 rm -f test/*.lst test/*.bin test/*.$(O) test/*.bin
133 rm -rf autom4te*.cache
134 cd rdoff && $(MAKE) distclean
136 cleaner: clean
137 rm -f $(PERLREQ) *.man nasm.spec
138 cd doc && $(MAKE) clean
140 spotless: distclean cleaner
141 rm -f doc/Makefile doc/*~ doc/*.bak
143 strip:
144 strip --strip-unneeded nasm$(X) ndisasm$(X)
146 rdf:
147 cd rdoff && $(MAKE)
149 rdf_install install_rdf:
150 cd rdoff && $(MAKE) install
152 doc:
153 cd doc && $(MAKE) all
155 doc_install install_doc:
156 cd doc && $(MAKE) install
158 everything: all doc rdf
160 install_everything: everything install install_doc install_rdf
162 dist: spotless perlreq
163 autoconf
164 rm -rf ./autom4te*.cache
166 tar: dist
167 tar cvjf ../nasm-`cat version`-`date +%Y%m%d`.tar.bz2 ../`./nasm-dir`
169 spec: nasm.spec
171 nasm.spec: nasm.spec.in version version.pl
172 sed -e s/@@VERSION@@/`cat $(srcdir)/version`/g \
173 -e s/@@ID@@/`$(PERL) $(srcdir)/version.pl id < $(srcdir)/version`/g \
174 < nasm.spec.in > nasm.spec
177 # This build dependencies in *ALL* makefiles. Partially for that reason,
178 # it's expected to be invoked manually.
180 alldeps: perlreq
181 $(PERL) mkdep.pl -M Makefile.in Mkfiles/Makefile.* -- \
182 . output
183 ./config.status
185 #-- Magic hints to mkdep.pl --#
186 # @object-ending: ".$(O)"
187 # @path-separator: "/"
188 #-- Everything below is generated by mkdep.pl - do not edit --#
189 assemble.$(O): assemble.c insns.h insnsi.h assemble.h nasmlib.h version.h \
190 regvals.c nasm.h regs.h
191 disasm.$(O): disasm.c insns.h regs.c insnsn.c insnsi.h sync.h version.h \
192 names.c nasm.h regdis.c disasm.h regs.h
193 eval.$(O): eval.c labels.h nasmlib.h version.h nasm.h eval.h regs.h
194 float.$(O): float.c version.h nasm.h regs.h
195 insnsa.$(O): insnsa.c insns.h insnsi.h version.h nasm.h regs.h
196 insnsd.$(O): insnsd.c insns.h insnsi.h version.h nasm.h regs.h
197 insnsn.$(O): insnsn.c
198 labels.$(O): labels.c nasmlib.h version.h nasm.h regs.h
199 listing.$(O): listing.c listing.h nasmlib.h version.h nasm.h regs.h
200 macros.$(O): macros.c
201 names.$(O): names.c insnsn.c regs.c
202 nasm.$(O): nasm.c listing.h preproc.h insns.h outform.h assemble.h parser.h \
203 nasm.h regs.h labels.h insnsi.h version.h nasmlib.h eval.h
204 nasmlib.$(O): nasmlib.c insns.h regs.c names.c nasm.h regs.h insnsn.c \
205 insnsi.h nasmlib.h version.h
206 ndisasm.$(O): ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
207 nasmlib.h version.h
208 outform.$(O): outform.c outform.h nasm.h regs.h version.h
209 output/outaout.$(O): output/outaout.c outform.h nasm.h regs.h nasmlib.h \
210 version.h
211 output/outas86.$(O): output/outas86.c outform.h nasm.h regs.h nasmlib.h \
212 version.h
213 output/outbin.$(O): output/outbin.c outform.h nasm.h regs.h nasmlib.h \
214 version.h
215 output/outcoff.$(O): output/outcoff.c outform.h nasm.h regs.h nasmlib.h \
216 version.h
217 output/outdbg.$(O): output/outdbg.c outform.h nasm.h regs.h nasmlib.h \
218 version.h
219 output/outelf.$(O): output/outelf.c outform.h nasm.h regs.h nasmlib.h \
220 version.h
221 output/outieee.$(O): output/outieee.c outform.h nasm.h regs.h nasmlib.h \
222 version.h
223 output/outobj.$(O): output/outobj.c outform.h nasm.h regs.h nasmlib.h \
224 version.h
225 output/outrdf.$(O): output/outrdf.c outform.h nasm.h regs.h nasmlib.h \
226 version.h
227 output/outrdf2.$(O): output/outrdf2.c outform.h nasm.h regs.h nasmlib.h \
228 version.h
229 parser.$(O): parser.c insns.h parser.h nasm.h regs.h insnsi.h regflags.c \
230 float.h nasmlib.h version.h
231 preproc.$(O): preproc.c nasm.h macros.c regs.h nasmlib.h version.h
232 regdis.$(O): regdis.c
233 regflags.$(O): regflags.c
234 regs.$(O): regs.c
235 regvals.$(O): regvals.c
236 sync.$(O): sync.c sync.h