Makefile 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  1. #
  2. # Auto-configuring Makefile for the Netwide Assembler.
  3. #
  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.
  8. top_srcdir = .
  9. srcdir = .
  10. objdir = .
  11. prefix = /usr
  12. exec_prefix = ${prefix}
  13. bindir = ${exec_prefix}/bin
  14. mandir = ${datarootdir}/man
  15. datarootdir = ${prefix}/share
  16. CC = gcc
  17. CFLAGS = -g -O3 -fwrapv -U__STRICT_ANSI__ -fno-common -Werror=attributes -fvisibility=hidden -W -Wall -pedantic -Wc90-c99-compat -Wno-long-long -Wno-shift-negative-value -Werror=implicit -Werror=missing-braces -Werror=return-type -Werror=trigraphs -Werror=pointer-arith -Werror=missing-prototypes -Werror=missing-declarations -Werror=comment -Werror=vla
  18. CPPFLAGS =
  19. BUILD_CFLAGS = $(CPPFLAGS) $(CFLAGS) -DHAVE_CONFIG_H
  20. INTERNAL_CFLAGS = -I$(srcdir) -I$(objdir) \
  21. -I$(srcdir)/include -I$(objdir)/include \
  22. -I$(srcdir)/x86 -I$(objdir)/x86 \
  23. -I$(srcdir)/asm -I$(objdir)/asm \
  24. -I$(srcdir)/disasm -I$(objdir)/disasm \
  25. -I$(srcdir)/output -I$(objdir)/output
  26. ALL_CFLAGS = $(BUILD_CFLAGS) $(INTERNAL_CFLAGS)
  27. LDFLAGS = -fvisibility=hidden
  28. LIBS =
  29. AR = ar
  30. RANLIB = ranlib
  31. STRIP = strip
  32. PERL = perl
  33. PERLFLAGS = -I$(srcdir)/perllib -I$(srcdir)
  34. RUNPERL = $(PERL) $(PERLFLAGS)
  35. INSTALL = /usr/bin/install -c
  36. INSTALL_PROGRAM = ${INSTALL}
  37. INSTALL_DATA = ${INSTALL} -m 644
  38. NROFF = false
  39. ASCIIDOC = false
  40. XMLTO = false
  41. MAKENSIS = makensis
  42. MKDIR = mkdir -p
  43. RM_F = rm -f
  44. RM_RF = rm -rf
  45. LN_S = ln -s
  46. FIND = find
  47. # Binary suffixes
  48. O = o
  49. X =
  50. A = a
  51. # Debug stuff
  52. ifeq ($(TRACE),1)
  53. CFLAGS += -DNASM_TRACE
  54. endif
  55. .SUFFIXES:
  56. .SUFFIXES: $(X) .$(O) .$(A) .xml .1 .c .i .s .txt
  57. .PHONY: all doc rdf install clean distclean cleaner spotless install_rdf test
  58. .PHONY: install_doc everything install_everything strip perlreq dist tags TAGS
  59. .PHONY: manpages nsis
  60. .c.$(O):
  61. $(CC) -c $(ALL_CFLAGS) -o $@ $<
  62. .c.s:
  63. $(CC) -S $(ALL_CFLAGS) -o $@ $<
  64. .c.i:
  65. $(CC) -E $(ALL_CFLAGS) -o $@ $<
  66. .txt.xml:
  67. $(ASCIIDOC) -b docbook -d manpage -o $@ $<
  68. .xml.1:
  69. $(XMLTO) man --skip-validation $< 2>/dev/null
  70. #-- Begin File Lists --#
  71. NASM = asm/nasm.$(O)
  72. NDISASM = disasm/ndisasm.$(O)
  73. LIBOBJ = stdlib/snprintf.$(O) stdlib/vsnprintf.$(O) stdlib/strlcpy.$(O) \
  74. stdlib/strnlen.$(O) stdlib/strrchrnul.$(O) \
  75. \
  76. nasmlib/ver.$(O) \
  77. nasmlib/crc64.$(O) nasmlib/malloc.$(O) nasmlib/errfile.$(O) \
  78. nasmlib/md5c.$(O) nasmlib/string.$(O) \
  79. nasmlib/file.$(O) nasmlib/mmap.$(O) nasmlib/ilog2.$(O) \
  80. nasmlib/realpath.$(O) nasmlib/path.$(O) \
  81. nasmlib/filename.$(O) nasmlib/srcfile.$(O) \
  82. nasmlib/zerobuf.$(O) nasmlib/readnum.$(O) nasmlib/bsi.$(O) \
  83. nasmlib/rbtree.$(O) nasmlib/hashtbl.$(O) \
  84. nasmlib/raa.$(O) nasmlib/saa.$(O) \
  85. nasmlib/strlist.$(O) \
  86. nasmlib/perfhash.$(O) nasmlib/badenum.$(O) \
  87. \
  88. common/common.$(O) \
  89. \
  90. x86/insnsa.$(O) x86/insnsb.$(O) x86/insnsd.$(O) x86/insnsn.$(O) \
  91. x86/regs.$(O) x86/regvals.$(O) x86/regflags.$(O) x86/regdis.$(O) \
  92. x86/disp8.$(O) x86/iflag.$(O) \
  93. \
  94. asm/error.$(O) \
  95. asm/float.$(O) \
  96. asm/directiv.$(O) asm/directbl.$(O) \
  97. asm/pragma.$(O) \
  98. asm/assemble.$(O) asm/labels.$(O) asm/parser.$(O) \
  99. asm/preproc.$(O) asm/quote.$(O) asm/pptok.$(O) \
  100. asm/listing.$(O) asm/eval.$(O) asm/exprlib.$(O) asm/exprdump.$(O) \
  101. asm/stdscan.$(O) \
  102. asm/strfunc.$(O) asm/tokhash.$(O) \
  103. asm/segalloc.$(O) \
  104. asm/preproc-nop.$(O) \
  105. asm/rdstrnum.$(O) \
  106. \
  107. macros/macros.$(O) \
  108. \
  109. output/outform.$(O) output/outlib.$(O) output/legacy.$(O) \
  110. output/strtbl.$(O) \
  111. output/nulldbg.$(O) output/nullout.$(O) \
  112. output/outbin.$(O) output/outaout.$(O) output/outcoff.$(O) \
  113. output/outelf.$(O) \
  114. output/outobj.$(O) output/outas86.$(O) output/outrdf2.$(O) \
  115. output/outdbg.$(O) output/outieee.$(O) output/outmacho.$(O) \
  116. output/codeview.$(O) \
  117. \
  118. disasm/disasm.$(O) disasm/sync.$(O)
  119. SUBDIRS = stdlib nasmlib output asm disasm x86 common macros
  120. XSUBDIRS = test doc nsis rdoff
  121. DEPDIRS = . include config x86 rdoff $(SUBDIRS)
  122. #-- End File Lists --#
  123. all: nasm$(X) ndisasm$(X) rdf
  124. NASMLIB = libnasm.$(A)
  125. $(NASMLIB): $(LIBOBJ)
  126. $(RM_F) $(NASMLIB)
  127. $(AR) cq $(NASMLIB) $(LIBOBJ)
  128. $(RANLIB) $(NASMLIB)
  129. nasm$(X): $(NASM) $(NASMLIB)
  130. $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o nasm$(X) $(NASM) $(NASMLIB) $(LIBS)
  131. ndisasm$(X): $(NDISASM) $(NASMLIB)
  132. $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o ndisasm$(X) $(NDISASM) $(NASMLIB) $(LIBS)
  133. #-- Begin Generated File Rules --#
  134. # These source files are automagically generated from data files using
  135. # Perl scripts. They're distributed, though, so it isn't necessary to
  136. # have Perl just to recompile NASM from the distribution.
  137. # Perl-generated source files
  138. PERLREQ = x86/insnsb.c x86/insnsa.c x86/insnsd.c x86/insnsi.h x86/insnsn.c \
  139. x86/regs.c x86/regs.h x86/regflags.c x86/regdis.c x86/regdis.h \
  140. x86/regvals.c asm/tokhash.c asm/tokens.h asm/pptok.h asm/pptok.c \
  141. x86/iflag.c x86/iflaggen.h \
  142. macros/macros.c \
  143. asm/pptok.ph asm/directbl.c asm/directiv.h \
  144. version.h version.mac version.mak nsis/version.nsh
  145. INSDEP = x86/insns.dat x86/insns.pl x86/insns-iflags.ph
  146. x86/iflag.c: $(INSDEP)
  147. $(RUNPERL) $(srcdir)/x86/insns.pl -fc \
  148. $(srcdir)/x86/insns.dat x86/iflag.c
  149. x86/iflaggen.h: $(INSDEP)
  150. $(RUNPERL) $(srcdir)/x86/insns.pl -fh \
  151. $(srcdir)/x86/insns.dat x86/iflaggen.h
  152. x86/insnsb.c: $(INSDEP)
  153. $(RUNPERL) $(srcdir)/x86/insns.pl -b \
  154. $(srcdir)/x86/insns.dat x86/insnsb.c
  155. x86/insnsa.c: $(INSDEP)
  156. $(RUNPERL) $(srcdir)/x86/insns.pl -a \
  157. $(srcdir)/x86/insns.dat x86/insnsa.c
  158. x86/insnsd.c: $(INSDEP)
  159. $(RUNPERL) $(srcdir)/x86/insns.pl -d \
  160. $(srcdir)/x86/insns.dat x86/insnsd.c
  161. x86/insnsi.h: $(INSDEP)
  162. $(RUNPERL) $(srcdir)/x86/insns.pl -i \
  163. $(srcdir)/x86/insns.dat x86/insnsi.h
  164. x86/insnsn.c: $(INSDEP)
  165. $(RUNPERL) $(srcdir)/x86/insns.pl -n \
  166. $(srcdir)/x86/insns.dat x86/insnsn.c
  167. # These files contains all the standard macros that are derived from
  168. # the version number.
  169. version.h: version version.pl
  170. $(RUNPERL) $(srcdir)/version.pl h < $(srcdir)/version > version.h
  171. version.mac: version version.pl
  172. $(RUNPERL) $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
  173. version.sed: version version.pl
  174. $(RUNPERL) $(srcdir)/version.pl sed < $(srcdir)/version > version.sed
  175. version.mak: version version.pl
  176. $(RUNPERL) $(srcdir)/version.pl make < $(srcdir)/version > version.mak
  177. nsis/version.nsh: version version.pl
  178. $(RUNPERL) $(srcdir)/version.pl nsis < $(srcdir)/version > nsis/version.nsh
  179. # This source file is generated from the standard macros file
  180. # `standard.mac' by another Perl script. Again, it's part of the
  181. # standard distribution.
  182. macros/macros.c: macros/macros.pl asm/pptok.ph version.mac \
  183. $(srcdir)/macros/*.mac $(srcdir)/output/*.mac
  184. $(RUNPERL) $(srcdir)/macros/macros.pl version.mac \
  185. $(srcdir)/macros/*.mac $(srcdir)/output/*.mac
  186. # These source files are generated from regs.dat by yet another
  187. # perl script.
  188. x86/regs.c: x86/regs.dat x86/regs.pl
  189. $(RUNPERL) $(srcdir)/x86/regs.pl c \
  190. $(srcdir)/x86/regs.dat > x86/regs.c
  191. x86/regflags.c: x86/regs.dat x86/regs.pl
  192. $(RUNPERL) $(srcdir)/x86/regs.pl fc \
  193. $(srcdir)/x86/regs.dat > x86/regflags.c
  194. x86/regdis.c: x86/regs.dat x86/regs.pl
  195. $(RUNPERL) $(srcdir)/x86/regs.pl dc \
  196. $(srcdir)/x86/regs.dat > x86/regdis.c
  197. x86/regdis.h: x86/regs.dat x86/regs.pl
  198. $(RUNPERL) $(srcdir)/x86/regs.pl dh \
  199. $(srcdir)/x86/regs.dat > x86/regdis.h
  200. x86/regvals.c: x86/regs.dat x86/regs.pl
  201. $(RUNPERL) $(srcdir)/x86/regs.pl vc \
  202. $(srcdir)/x86/regs.dat > x86/regvals.c
  203. x86/regs.h: x86/regs.dat x86/regs.pl
  204. $(RUNPERL) $(srcdir)/x86/regs.pl h \
  205. $(srcdir)/x86/regs.dat > x86/regs.h
  206. # Assembler token hash
  207. asm/tokhash.c: x86/insns.dat x86/regs.dat asm/tokens.dat asm/tokhash.pl \
  208. perllib/phash.ph
  209. $(RUNPERL) $(srcdir)/asm/tokhash.pl c \
  210. $(srcdir)/x86/insns.dat $(srcdir)/x86/regs.dat \
  211. $(srcdir)/asm/tokens.dat > asm/tokhash.c
  212. # Assembler token metadata
  213. asm/tokens.h: x86/insns.dat x86/regs.dat asm/tokens.dat asm/tokhash.pl \
  214. perllib/phash.ph
  215. $(RUNPERL) $(srcdir)/asm/tokhash.pl h \
  216. $(srcdir)/x86/insns.dat $(srcdir)/x86/regs.dat \
  217. $(srcdir)/asm/tokens.dat > asm/tokens.h
  218. # Preprocessor token hash
  219. asm/pptok.h: asm/pptok.dat asm/pptok.pl perllib/phash.ph
  220. $(RUNPERL) $(srcdir)/asm/pptok.pl h \
  221. $(srcdir)/asm/pptok.dat asm/pptok.h
  222. asm/pptok.c: asm/pptok.dat asm/pptok.pl perllib/phash.ph
  223. $(RUNPERL) $(srcdir)/asm/pptok.pl c \
  224. $(srcdir)/asm/pptok.dat asm/pptok.c
  225. asm/pptok.ph: asm/pptok.dat asm/pptok.pl perllib/phash.ph
  226. $(RUNPERL) $(srcdir)/asm/pptok.pl ph \
  227. $(srcdir)/asm/pptok.dat asm/pptok.ph
  228. # Directives hash
  229. asm/directiv.h: asm/directiv.dat nasmlib/perfhash.pl perllib/phash.ph
  230. $(RUNPERL) $(srcdir)/nasmlib/perfhash.pl h \
  231. $(srcdir)/asm/directiv.dat asm/directiv.h
  232. asm/directbl.c: asm/directiv.dat nasmlib/perfhash.pl perllib/phash.ph
  233. $(RUNPERL) $(srcdir)/nasmlib/perfhash.pl c \
  234. $(srcdir)/asm/directiv.dat asm/directbl.c
  235. #-- End Generated File Rules --#
  236. perlreq: $(PERLREQ)
  237. # This rule is only used for RDOFF
  238. .$(O)$(X):
  239. $(CC) $(ALL_CFLAGS) -o $@ $< $(LDFLAGS) $(RDFLIB) $(NASMLIB) $(LIBS)
  240. RDFLN = cd rdoff && ln -s
  241. RDFLNPFX =
  242. #-- Begin RDOFF Shared Rules --#
  243. RDFLIBOBJ = rdoff/rdoff.$(O) rdoff/rdfload.$(O) rdoff/symtab.$(O) \
  244. rdoff/collectn.$(O) rdoff/rdlib.$(O) rdoff/segtab.$(O) \
  245. rdoff/hash.$(O)
  246. RDFPROGS = rdoff/rdfdump$(X) rdoff/ldrdf$(X) rdoff/rdx$(X) rdoff/rdflib$(X) \
  247. rdoff/rdf2bin$(X)
  248. RDF2BINLINKS = rdoff/rdf2com$(X) rdoff/rdf2ith$(X) \
  249. rdoff/rdf2ihx$(X) rdoff/rdf2srec$(X)
  250. RDFLIB = rdoff/librdoff.$(A)
  251. RDFLIBS = $(RDFLIB) $(NASMLIB)
  252. rdoff/rdfdump$(X): rdoff/rdfdump.$(O) $(RDFLIBS)
  253. rdoff/ldrdf$(X): rdoff/ldrdf.$(O) $(RDFLIBS)
  254. rdoff/rdx$(X): rdoff/rdx.$(O) $(RDFLIBS)
  255. rdoff/rdflib$(X): rdoff/rdflib.$(O) $(RDFLIBS)
  256. rdoff/rdf2bin$(X): rdoff/rdf2bin.$(O) $(RDFLIBS)
  257. rdoff/rdf2com$(X): rdoff/rdf2bin$(X)
  258. $(RM_F) rdoff/rdf2com$(X)
  259. $(RDFLN) $(RDFLNPFX)rdf2bin$(X) $(RDFLNPFX)rdf2com$(X)
  260. rdoff/rdf2ith$(X): rdoff/rdf2bin$(X)
  261. $(RM_F) rdoff/rdf2ith$(X)
  262. $(RDFLN) $(RDFLNPFX)rdf2bin$(X) $(RDFLNPFX)rdf2ith$(X)
  263. rdoff/rdf2ihx$(X): rdoff/rdf2bin$(X)
  264. $(RM_F) rdoff/rdf2ihx$(X)
  265. $(RDFLN) $(RDFLNPFX)rdf2bin$(X) $(RDFLNPFX)rdf2ihx$(X)
  266. rdoff/rdf2srec$(X): rdoff/rdf2bin$(X)
  267. $(RM_F) rdoff/rdf2srec$(X)
  268. $(RDFLN) $(RDFLNPFX)rdf2bin$(X) $(RDFLNPFX)rdf2srec$(X)
  269. #-- End RDOFF Shared Rules --#
  270. rdf: $(RDFPROGS) $(RDF2BINLINKS)
  271. $(RDFLIB): $(RDFLIBOBJ)
  272. $(RM_F) $(RDFLIB)
  273. $(AR) cq $(RDFLIB) $(RDFLIBOBJ)
  274. $(RANLIB) $(RDFLIB)
  275. #-- Begin NSIS Rules --#
  276. # NSIS is not built except by explicit request, as it only applies to
  277. # Windows platforms
  278. nsis/arch.nsh: nsis/getpearch.pl nasm$(X)
  279. $(PERL) $(srcdir)/nsis/getpearch.pl nasm$(X) > nsis/arch.nsh
  280. # Should only be done after "make everything".
  281. # The use of redirection here keeps makensis from moving the cwd to the
  282. # source directory.
  283. nsis: nsis/nasm.nsi nsis/arch.nsh nsis/version.nsh
  284. $(MAKENSIS) -Dsrcdir="$(srcdir)" -Dobjdir="$(objdir)" - < nsis/nasm.nsi
  285. #-- End NSIS Rules --#
  286. # Generated manpages, also pregenerated for distribution
  287. manpages: nasm.1 ndisasm.1
  288. install: nasm$(X) ndisasm$(X)
  289. $(MKDIR) $(DESTDIR)$(bindir)
  290. $(INSTALL_PROGRAM) nasm$(X) $(DESTDIR)$(bindir)/nasm$(X)
  291. $(INSTALL_PROGRAM) ndisasm$(X) $(DESTDIR)$(bindir)/ndisasm$(X)
  292. $(MKDIR) $(DESTDIR)$(mandir)/man1
  293. $(INSTALL_DATA) $(srcdir)/nasm.1 $(DESTDIR)$(mandir)/man1/nasm.1
  294. $(INSTALL_DATA) $(srcdir)/ndisasm.1 $(DESTDIR)$(mandir)/man1/ndisasm.1
  295. clean:
  296. for d in . $(SUBDIRS) $(XSUBDIRS); do \
  297. $(RM_F) "$$d"/*.$(O) "$$d"/*.s "$$d"/*.i "$$d"/*.$(A) ; \
  298. done
  299. $(RM_F) nasm$(X) ndisasm$(X)
  300. $(RM_F) nasm-*-installer-*.exe
  301. $(RM_F) tags TAGS
  302. $(RM_F) nsis/arch.nsh
  303. $(RM_F) perlbreq.si
  304. $(RM_F) $(RDFPROGS) $(RDF2BINLINKS)
  305. distclean: clean
  306. $(RM_F) config.log config.status config/config.h
  307. for d in . $(SUBDIRS) $(XSUBDIRS); do \
  308. $(RM_F) "$$d"/*~ "$$d"/*.bak "$$d"/*.lst "$$d"/*.bin ; \
  309. done
  310. $(RM_F) test/*.$(O)
  311. $(RM_RF) autom4te*.cache
  312. $(RM_F) Makefile *.dep
  313. cleaner: clean
  314. $(RM_F) $(PERLREQ) *.1 nasm.spec
  315. $(MAKE) -C doc clean
  316. $(RM_F) *.dep
  317. spotless: distclean cleaner
  318. $(RM_F) doc/Makefile
  319. strip:
  320. $(STRIP) --strip-unneeded nasm$(X) ndisasm$(X)
  321. TAGS:
  322. $(RM_F) TAGS
  323. $(FIND) . -name '*.[hcS]' -print | xargs etags -a
  324. tags:
  325. $(RM_F) tags
  326. $(FIND) . -name '*.[hcS]' -print | xargs ctags -a
  327. cscope:
  328. $(RM_F) cscope.out cscope.files
  329. $(FIND) . -name '*.[hcS]' -print > cscope.files
  330. cscope -b -f cscope.out
  331. rdf_install install_rdf install_rdoff:
  332. $(MKDIR) $(DESTDIR)$(bindir)
  333. for f in $(RDFPROGS); do \
  334. $(INSTALL_PROGRAM) "$$f" '$(DESTDIR)$(bindir)'/ ; \
  335. done
  336. cd '$(DESTDIR)$(bindir)' && \
  337. for f in $(RDF2BINLINKS); do \
  338. bn=`basename "$$f"` && $(RM_F) "$$bn" && \
  339. $(LN_S) rdf2bin$(X) "$$bn" ; \
  340. done
  341. $(MKDIR) $(DESTDIR)$(mandir)/man1
  342. $(INSTALL_DATA) $(srcdir)/rdoff/*.1 $(DESTDIR)$(mandir)/man1/
  343. doc:
  344. $(MAKE) -C doc all
  345. doc_install install_doc:
  346. $(MAKE) -C doc install
  347. everything: all manpages doc rdf
  348. install_everything: everything install install_doc install_rdf
  349. dist:
  350. $(MAKE) alldeps
  351. $(MAKE) spotless perlreq manpages spec
  352. autoheader
  353. autoconf
  354. $(RM_RF) ./autom4te*.cache
  355. tar: dist
  356. tar -cvj --exclude CVS -C .. -f ../nasm-`cat version`-`date +%Y%m%d`.tar.bz2 `basename \`pwd\``
  357. spec: nasm.spec
  358. ALLPERLSRC := $(shell find $(srcdir) -type f -name '*.p[lh]')
  359. perlbreq.si: $(ALLPERLSRC)
  360. sed -n -r -e 's/^[[:space:]]*use[[:space:]]+([^[:space:];]+).*$$/BuildRequires: perl(\1)/p' $(ALLPERLSRC) | \
  361. sed -r -e '/perl\((strict|warnings|Win32.*)\)/d' | \
  362. sort | uniq > perlbreq.si || ( rm -f perlbreq.si ; false )
  363. nasm.spec: nasm.spec.in nasm.spec.sed version.sed perlbreq.si
  364. sed -f version.sed -f nasm.spec.sed \
  365. < nasm.spec.in > nasm.spec || ( rm -f nasm.spec ; false )
  366. splint:
  367. splint -weak *.c
  368. test: nasm$(X)
  369. cd test && $(RUNPERL) performtest.pl --nasm=../nasm *.asm
  370. golden: nasm$(X)
  371. cd test && $(RUNPERL) performtest.pl --golden --nasm=../nasm *.asm
  372. #
  373. # Rules to run autoreconf if necessary
  374. #
  375. configure: configure.ac aclocal.m4
  376. autoreconf
  377. config.status: configure
  378. @if [ ! -f config.status ]; then \
  379. echo "*** ERROR: Need to run configure!" 1>&2 ; \
  380. exit 1; \
  381. fi
  382. sh config.status --recheck
  383. Makefile: config.status Makefile.in doc/Makefile.in
  384. sh config.status
  385. doc/Makefile: Makefile
  386. config/config.h: config.status
  387. #
  388. # Does this version of this file have external dependencies? This definition
  389. # will be automatically updated by mkdep.pl as needed.
  390. #
  391. EXTERNAL_DEPENDENCIES = 1
  392. #
  393. # Generate dependency information for this Makefile only.
  394. # If this Makefile has external dependency information, then
  395. # the dependency information will remain external, so it doesn't
  396. # pollute the git logs.
  397. #
  398. Makefile.dep: $(PERLREQ) tools/mkdep.pl config.status
  399. $(RUNPERL) tools/mkdep.pl -M Makefile.in -- $(DEPDIRS)
  400. dep: Makefile.dep
  401. #
  402. # This build dependencies in *ALL* makefiles, and forces all
  403. # dependencies to be inserted inline. For that reason, it should only
  404. # be invoked manually or via "make dist". It should be run before
  405. # creating release archives.
  406. #
  407. alldeps: $(PERLREQ) tools/syncfiles.pl tools/mkdep.pl
  408. $(RUNPERL) tools/syncfiles.pl Makefile.in Mkfiles/*.mak
  409. $(RUNPERL) tools/mkdep.pl -i -M Makefile.in Mkfiles/*.mak -- \
  410. $(DEPDIRS)
  411. $(RM_F) *.dep
  412. if [ -f config.status ]; then \
  413. if [ $(EXTERNAL_DEPENDENCIES) -eq 1 ]; then \
  414. sh config.status --recheck; \
  415. fi; \
  416. sh config.status; \
  417. fi
  418. # Strip internal dependency information from all Makefiles; this makes
  419. # the output good for git checkin
  420. cleandeps: $(PERLREQ) tools/syncfiles.pl tools/mkdep.pl
  421. $(RUNPERL) tools/syncfiles.pl Makefile.in Mkfiles/*.mak
  422. $(RUNPERL) tools/mkdep.pl -e -M Makefile.in Mkfiles/*.mak -- \
  423. $(DEPDIRS)
  424. $(RM_F) *.dep
  425. if [ -f config.status ]; then \
  426. if [ $(EXTERNAL_DEPENDENCIES) -eq 0 ]; then \
  427. sh config.status --recheck; \
  428. fi; \
  429. sh config.status; \
  430. fi
  431. #-- Magic hints to mkdep.pl --#
  432. # @object-ending: ".$(O)"
  433. # @path-separator: "/"
  434. # @external: "Makefile.dep"
  435. # @include-command: "-include"
  436. # @selfrule: "1"
  437. #-- Everything below is generated by mkdep.pl - do not edit --#
  438. -include Makefile.dep