Apply Nindent to all .c and .h files
[nasm/avx512.git] / Makefile.in
blob445dfe6ac4fb696fd8f912d7ab37fe04a74bd104
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@ @DEFS@ -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.h config.log config.status
131 rm -f Makefile *~ *.bak *.lst *.bin
132 rm -f output/*~ output/*.bak
133 rm -f test/*.lst test/*.bin test/*.$(O) test/*.bin
134 rm -rf autom4te*.cache
135 cd rdoff && $(MAKE) distclean
137 cleaner: clean
138 rm -f $(PERLREQ) *.man nasm.spec
139 cd doc && $(MAKE) clean
141 spotless: distclean cleaner
142 rm -f doc/Makefile doc/*~ doc/*.bak
144 strip:
145 strip --strip-unneeded nasm$(X) ndisasm$(X)
147 rdf:
148 cd rdoff && $(MAKE)
150 rdf_install install_rdf:
151 cd rdoff && $(MAKE) install
153 doc:
154 cd doc && $(MAKE) all
156 doc_install install_doc:
157 cd doc && $(MAKE) install
159 everything: all doc rdf
161 install_everything: everything install install_doc install_rdf
163 dist: spotless perlreq spec
164 autoheader
165 autoconf
166 rm -rf ./autom4te*.cache
168 tar: dist
169 tar cvjf ../nasm-`cat version`-`date +%Y%m%d`.tar.bz2 ../`./nasm-dir`
171 spec: nasm.spec
173 nasm.spec: nasm.spec.in version version.pl
174 sed -e s/@@VERSION@@/`cat $(srcdir)/version`/g \
175 -e s/@@ID@@/`$(PERL) $(srcdir)/version.pl id < $(srcdir)/version`/g \
176 < nasm.spec.in > nasm.spec
178 splint:
179 splint -weak *.c
182 # This build dependencies in *ALL* makefiles. Partially for that reason,
183 # it's expected to be invoked manually.
185 alldeps: perlreq
186 $(PERL) mkdep.pl -M Makefile.in Mkfiles/Makefile.* -- \
187 . output
188 ./config.status
190 #-- Magic hints to mkdep.pl --#
191 # @object-ending: ".$(O)"
192 # @path-separator: "/"
193 #-- Everything below is generated by mkdep.pl - do not edit --#
194 assemble.$(O): assemble.c preproc.h insns.h regs.h version.h nasmlib.h \
195 nasm.h regvals.c assemble.h insnsi.h
196 disasm.$(O): disasm.c insns.h sync.h regdis.c regs.h regs.c version.h nasm.h \
197 insnsn.c names.c insnsi.h disasm.h
198 eval.$(O): eval.c labels.h eval.h regs.h version.h nasmlib.h nasm.h
199 float.$(O): float.c regs.h version.h nasm.h
200 insnsa.$(O): insnsa.c insns.h regs.h version.h nasm.h insnsi.h
201 insnsd.$(O): insnsd.c insns.h regs.h version.h nasm.h insnsi.h
202 insnsn.$(O): insnsn.c
203 labels.$(O): labels.c regs.h version.h nasmlib.h nasm.h
204 listing.$(O): listing.c regs.h version.h nasmlib.h nasm.h listing.h
205 macros.$(O): macros.c
206 names.$(O): names.c regs.c insnsn.c
207 nasm.$(O): nasm.c labels.h preproc.h insns.h parser.h eval.h regs.h \
208 outform.h version.h nasmlib.h nasm.h assemble.h insnsi.h listing.h
209 nasmlib.$(O): nasmlib.c insns.h regs.h regs.c version.h nasmlib.h nasm.h \
210 insnsn.c names.c insnsi.h
211 ndisasm.$(O): ndisasm.c insns.h sync.h regs.h version.h nasmlib.h nasm.h \
212 insnsi.h disasm.h
213 outform.$(O): outform.c regs.h outform.h version.h nasm.h
214 output/outaout.$(O): output/outaout.c regs.h outform.h version.h nasmlib.h \
215 nasm.h
216 output/outas86.$(O): output/outas86.c regs.h outform.h version.h nasmlib.h \
217 nasm.h
218 output/outbin.$(O): output/outbin.c labels.h eval.h regs.h outform.h \
219 version.h nasmlib.h nasm.h
220 output/outcoff.$(O): output/outcoff.c regs.h outform.h version.h nasmlib.h \
221 nasm.h
222 output/outdbg.$(O): output/outdbg.c regs.h outform.h version.h nasmlib.h \
223 nasm.h
224 output/outelf.$(O): output/outelf.c regs.h outform.h version.h nasmlib.h \
225 nasm.h
226 output/outieee.$(O): output/outieee.c regs.h outform.h version.h nasmlib.h \
227 nasm.h
228 output/outobj.$(O): output/outobj.c regs.h outform.h version.h nasmlib.h \
229 nasm.h
230 output/outrdf.$(O): output/outrdf.c regs.h outform.h version.h nasmlib.h \
231 nasm.h
232 output/outrdf2.$(O): output/outrdf2.c rdoff/rdoff.h regs.h outform.h \
233 version.h nasmlib.h nasm.h
234 parser.$(O): parser.c insns.h parser.h float.h regs.h regflags.c version.h \
235 nasmlib.h nasm.h insnsi.h
236 preproc.$(O): preproc.c macros.c regs.h version.h nasmlib.h nasm.h
237 regdis.$(O): regdis.c
238 regflags.$(O): regflags.c
239 regs.$(O): regs.c
240 regvals.$(O): regvals.c
241 sync.$(O): sync.c sync.h