Provide 64-bit support for ORG directive
[nasm/avx512.git] / Makefile.in
blob0651b8e794476317100fb9a20e1a84ac0e0abdab
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 top_srcdir = @top_srcdir@
11 srcdir = @srcdir@
12 VPATH = @srcdir@
13 prefix = @prefix@
14 exec_prefix = @exec_prefix@
15 bindir = @bindir@
16 mandir = @mandir@
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 INSTALL = @INSTALL@
28 INSTALL_PROGRAM = @INSTALL_PROGRAM@
29 INSTALL_DATA = @INSTALL_DATA@
31 NROFF = @NROFF@
33 # Binary suffixes
34 O = @OBJEXT@
35 X = @EXEEXT@
37 .SUFFIXES: .c .i .s .$(O) .1 .man
39 .PHONY: all doc rdf install clean distclean cleaner spotless install_rdf
40 .PHONY: install_doc everything install_everything strip perlreq dist
42 .c.$(O):
43 $(CC) -c $(ALL_CFLAGS) -o $@ $<
45 .c.s:
46 $(CC) -S $(ALL_CFLAGS) -o $@ $<
48 .c.i:
49 $(CC) -E $(ALL_CFLAGS) -o $@ $<
51 .1.man:
52 $(NROFF) -man $< > $@
54 NASM = nasm.$(O) nasmlib.$(O) float.$(O) insnsa.$(O) assemble.$(O) \
55 labels.$(O) parser.$(O) outform.$(O) output/outbin.$(O) \
56 output/outaout.$(O) output/outcoff.$(O) \
57 output/outelf32.$(O) output/outelf64.$(O) \
58 output/outobj.$(O) output/outas86.$(O) output/outrdf2.$(O) \
59 output/outdbg.$(O) output/outieee.$(O) output/outmacho.$(O) \
60 preproc.$(O) listing.$(O) eval.$(O) stdscan.$(O) tokhash.$(O)
62 NDISASM = ndisasm.$(O) disasm.$(O) sync.$(O) nasmlib.$(O) insnsd.$(O)
64 all: nasm$(X) ndisasm$(X) nasm.man ndisasm.man
65 cd rdoff && $(MAKE) all
67 nasm$(X): $(NASM)
68 $(CC) $(LDFLAGS) -o nasm$(X) $(NASM) $(LIBS)
70 ndisasm$(X): $(NDISASM)
71 $(CC) $(LDFLAGS) -o ndisasm$(X) $(NDISASM) $(LIBS)
73 # These source files are automagically generated from a single
74 # instruction-table file by a Perl script. They're distributed,
75 # though, so it isn't necessary to have Perl just to recompile NASM
76 # from the distribution.
78 insnsa.c: insns.dat insns.pl
79 $(PERL) $(srcdir)/insns.pl -a $(srcdir)/insns.dat
80 insnsd.c: insns.dat insns.pl
81 $(PERL) $(srcdir)/insns.pl -d $(srcdir)/insns.dat
82 insnsi.h: insns.dat insns.pl
83 $(PERL) $(srcdir)/insns.pl -i $(srcdir)/insns.dat
84 insnsn.c: insns.dat insns.pl
85 $(PERL) $(srcdir)/insns.pl -n $(srcdir)/insns.dat
87 # These files contains all the standard macros that are derived from
88 # the version number.
89 version.h: version version.pl
90 $(PERL) $(srcdir)/version.pl h < $(srcdir)/version > version.h
92 version.mac: version version.pl
93 $(PERL) $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
95 # This source file is generated from the standard macros file
96 # `standard.mac' by another Perl script. Again, it's part of the
97 # standard distribution.
99 macros.c: macros.pl standard.mac version.mac
100 $(PERL) $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac
102 # These source files are generated from regs.dat by yet another
103 # perl script.
104 regs.c: regs.dat regs.pl
105 $(PERL) $(srcdir)/regs.pl c $(srcdir)/regs.dat > regs.c
106 regflags.c: regs.dat regs.pl
107 $(PERL) $(srcdir)/regs.pl fc $(srcdir)/regs.dat > regflags.c
108 regdis.c: regs.dat regs.pl
109 $(PERL) $(srcdir)/regs.pl dc $(srcdir)/regs.dat > regdis.c
110 regvals.c: regs.dat regs.pl
111 $(PERL) $(srcdir)/regs.pl vc $(srcdir)/regs.dat > regvals.c
112 regs.h: regs.dat regs.pl
113 $(PERL) $(srcdir)/regs.pl h $(srcdir)/regs.dat > regs.h
115 # Token hash
116 tokhash.c: insns.dat regs.dat tokens.dat tokhash.pl perllib/phash.ph
117 $(PERL) $(srcdir)/tokhash.pl $(srcdir)/insns.dat $(srcdir)/regs.dat \
118 $(srcdir)/tokens.dat > tokhash.c
120 # This target generates all files that require perl.
121 # This allows easier generation of distribution (see dist target).
122 PERLREQ = macros.c insnsa.c insnsd.c insnsi.h insnsn.c \
123 regs.c regs.h regflags.c regdis.c regvals.c tokhash.c \
124 version.h version.mac
125 perlreq: $(PERLREQ)
127 install: nasm$(X) ndisasm$(X)
128 $(INSTALL_PROGRAM) nasm$(X) $(INSTALLROOT)$(bindir)/nasm$(X)
129 $(INSTALL_PROGRAM) ndisasm$(X) $(INSTALLROOT)$(bindir)/ndisasm$(X)
130 $(INSTALL_DATA) $(srcdir)/nasm.1 $(INSTALLROOT)$(mandir)/man1/nasm.1
131 $(INSTALL_DATA) $(srcdir)/ndisasm.1 $(INSTALLROOT)$(mandir)/man1/ndisasm.1
133 clean:
134 rm -f *.$(O) *.s *.i
135 rm -f output/*.$(O) output/*.s output/*.i
136 rm -f nasm$(X) ndisasm$(X)
137 cd rdoff && $(MAKE) clean
139 distclean: clean
140 rm -f config.h config.log config.status
141 rm -f Makefile *~ *.bak *.lst *.bin
142 rm -f output/*~ output/*.bak
143 rm -f test/*.lst test/*.bin test/*.$(O) test/*.bin
144 rm -rf autom4te*.cache
145 cd rdoff && $(MAKE) distclean
147 cleaner: clean
148 rm -f $(PERLREQ) *.man nasm.spec
149 cd doc && $(MAKE) clean
151 spotless: distclean cleaner
152 rm -f doc/Makefile doc/*~ doc/*.bak
154 strip:
155 strip --strip-unneeded nasm$(X) ndisasm$(X)
157 rdf:
158 cd rdoff && $(MAKE)
160 rdf_install install_rdf:
161 cd rdoff && $(MAKE) install
163 doc:
164 cd doc && $(MAKE) all
166 doc_install install_doc:
167 cd doc && $(MAKE) install
169 everything: all doc rdf
171 install_everything: everything install install_doc install_rdf
173 dist: spotless perlreq spec
174 autoheader
175 autoconf
176 rm -rf ./autom4te*.cache
178 tar: dist
179 tar cvjf ../nasm-`cat version`-`date +%Y%m%d`.tar.bz2 ../`./nasm-dir`
181 spec: nasm.spec
183 nasm.spec: nasm.spec.in version version.pl
184 sed -e s/@@VERSION@@/`cat $(srcdir)/version`/g \
185 -e s/@@ID@@/`$(PERL) $(srcdir)/version.pl id < $(srcdir)/version`/g \
186 < nasm.spec.in > nasm.spec
188 splint:
189 splint -weak *.c
192 # This build dependencies in *ALL* makefiles. Partially for that reason,
193 # it's expected to be invoked manually.
195 alldeps: perlreq
196 $(PERL) mkdep.pl -M Makefile.in Mkfiles/Makefile.* -- \
197 . output
198 ./config.status
200 #-- Magic hints to mkdep.pl --#
201 # @object-ending: ".$(O)"
202 # @path-separator: "/"
203 #-- Everything below is generated by mkdep.pl - do not edit --#
204 assemble.$(O): assemble.c preproc.h insns.h regs.h regflags.c config.h \
205 version.h nasmlib.h nasm.h regvals.c assemble.h insnsi.h
206 disasm.$(O): disasm.c insns.h sync.h regdis.c regs.h config.h regs.c \
207 version.h nasm.h insnsn.c names.c insnsi.h disasm.h
208 eval.$(O): eval.c labels.h eval.h regs.h config.h version.h nasmlib.h nasm.h
209 float.$(O): float.c regs.h config.h version.h nasm.h
210 insnsa.$(O): insnsa.c insns.h regs.h config.h version.h nasm.h insnsi.h
211 insnsd.$(O): insnsd.c insns.h regs.h config.h version.h nasm.h insnsi.h
212 insnsn.$(O): insnsn.c
213 labels.$(O): labels.c regs.h config.h version.h nasmlib.h nasm.h
214 listing.$(O): listing.c regs.h config.h version.h nasmlib.h nasm.h listing.h
215 macros.$(O): macros.c
216 names.$(O): names.c regs.c insnsn.c
217 nasm.$(O): nasm.c labels.h preproc.h insns.h parser.h eval.h regs.h \
218 outform.h config.h version.h nasmlib.h nasm.h stdscan.h assemble.h insnsi.h \
219 listing.h
220 nasmlib.$(O): nasmlib.c insns.h regs.h config.h regs.c version.h nasmlib.h \
221 nasm.h insnsn.c names.c insnsi.h
222 ndisasm.$(O): ndisasm.c insns.h sync.h regs.h config.h version.h nasmlib.h \
223 nasm.h insnsi.h disasm.h
224 outform.$(O): outform.c regs.h config.h outform.h version.h nasm.h
225 output/outaout.$(O): output/outaout.c regs.h outform.h config.h version.h \
226 nasmlib.h nasm.h stdscan.h
227 output/outas86.$(O): output/outas86.c regs.h outform.h config.h version.h \
228 nasmlib.h nasm.h
229 output/outbin.$(O): output/outbin.c labels.h eval.h regs.h outform.h \
230 config.h version.h nasmlib.h nasm.h stdscan.h
231 output/outcoff.$(O): output/outcoff.c regs.h outform.h config.h version.h \
232 nasmlib.h nasm.h
233 output/outdbg.$(O): output/outdbg.c regs.h outform.h config.h version.h \
234 nasmlib.h nasm.h
235 output/outelf32.$(O): output/outelf32.c regs.h outform.h config.h version.h \
236 nasmlib.h nasm.h stdscan.h
237 output/outelf64.$(O): output/outelf64.c regs.h outform.h config.h version.h \
238 nasmlib.h nasm.h stdscan.h
239 output/outieee.$(O): output/outieee.c regs.h outform.h config.h version.h \
240 nasmlib.h nasm.h
241 output/outmacho.$(O): output/outmacho.c compiler.h regs.h outform.h config.h \
242 version.h nasmlib.h nasm.h
243 output/outobj.$(O): output/outobj.c regs.h outform.h config.h version.h \
244 nasmlib.h nasm.h stdscan.h
245 output/outrdf.$(O): output/outrdf.c regs.h outform.h config.h version.h \
246 nasmlib.h nasm.h
247 output/outrdf2.$(O): output/outrdf2.c rdoff/rdoff.h regs.h outform.h \
248 config.h version.h nasmlib.h nasm.h
249 parser.$(O): parser.c insns.h parser.h float.h regs.h regflags.c config.h \
250 version.h nasmlib.h nasm.h stdscan.h insnsi.h
251 preproc.$(O): preproc.c macros.c regs.h config.h version.h nasmlib.h nasm.h
252 regdis.$(O): regdis.c
253 regflags.$(O): regflags.c
254 regs.$(O): regs.c
255 regvals.$(O): regvals.c
256 stdscan.$(O): stdscan.c insns.h regs.h config.h version.h nasmlib.h nasm.h \
257 stdscan.h insnsi.h
258 sync.$(O): sync.c sync.h
259 tokhash.$(O): tokhash.c insns.h regs.h config.h version.h nasm.h insnsi.h