1 # Generated automatically from Makefile.in by configure.
4 # Auto-configuring Makefile for the Netwide Assembler.
6 # The Netwide Assembler is copyright (C) 1996 Simon Tatham and
7 # Julian Hall. All rights reserved. The software is
8 # redistributable under the licence given in the file "Licence"
9 # distributed in the NASM archive.
13 exec_prefix = ${prefix}
14 bindir = ${exec_prefix}/bin
15 mandir = ${prefix}/man
18 CFLAGS = -s -Zomf -O2 -fomit-frame-pointer -Wall -pedantic \
19 -I$(srcdir) -I. -DTASM_COMPAT
20 LDFLAGS = -s -Zomf -Zexe -Zcrtdll
23 INSTALL = ./install-sh -c
24 INSTALL_PROGRAM = ${INSTALL}
25 INSTALL_DATA = ${INSTALL} -m 644
30 .SUFFIXES: .c .i .s .o .1 .man
32 .PHONY: all doc rdf install clean distclean cleaner spotless install_rdf
33 .PHONY: install_doc everything install_everything
36 $(CC) -c $(CFLAGS) -o $@ $<
39 $(CC) -S $(CFLAGS) -o $@ $<
42 $(CC) -E $(CFLAGS) -o $@ $<
47 NASM = nasm.o nasmlib.o float.o insnsa.o assemble.o labels.o \
48 parser.o outform.o output/outbin.o output/outaout.o output/outcoff.o \
49 output/outelf32.o output/outelf64.o \
50 output/outobj.o output/outas86.o output/outrdf.o output/outrdf2.o output/outdbg.o output/outieee.o \
51 preproc.o listing.o eval.o
53 NDISASM = ndisasm.o disasm.o sync.o nasmlib.o insnsd.o
55 all: nasm ndisasm nasm.man ndisasm.man
56 $(MAKE) -C rdoff -f Makefile.emx all
59 $(CC) $(LDFLAGS) -o nasm $(NASM) $(LIBS)
62 $(CC) $(LDFLAGS) -o ndisasm $(NDISASM) $(LIBS)
64 # These source files are automagically generated from a single
65 # instruction-table file by a Perl script. They're distributed,
66 # though, so it isn't necessary to have Perl just to recompile NASM
67 # from the distribution.
69 insnsa.c: insns.dat insns.pl
70 $(PERL) $(srcdir)/insns.pl -a $(srcdir)/insns.dat
71 insnsd.c: insns.dat insns.pl
72 $(PERL) $(srcdir)/insns.pl -d $(srcdir)/insns.dat
73 insnsi.h: insns.dat insns.pl
74 $(PERL) $(srcdir)/insns.pl -i $(srcdir)/insns.dat
75 insnsn.c: insns.dat insns.pl
76 $(PERL) $(srcdir)/insns.pl -n $(srcdir)/insns.dat
78 # These files contains all the standard macros that are derived from
80 version.h: version version.pl
81 $(PERL) $(srcdir)/version.pl h < $(srcdir)/version > version.h
83 version.mac: version version.pl
84 $(PERL) $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
86 # This source file is generated from the standard macros file
87 # `standard.mac' by another Perl script. Again, it's part of the
88 # standard distribution.
90 macros.c: standard.mac macros.pl version.mac
91 $(PERL) $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac
93 # These source files are generated from regs.dat by yet another
95 regs.c: regs.dat regs.pl
96 $(PERL) $(srcdir)/regs.pl c $(srcdir)/regs.dat > regs.c
97 regflags.c: regs.dat regs.pl
98 $(PERL) $(srcdir)/regs.pl fc $(srcdir)/regs.dat > regflags.c
99 regdis.c: regs.dat regs.pl
100 $(PERL) $(srcdir)/regs.pl dc $(srcdir)/regs.dat > regdis.c
101 regvals.c: regs.dat regs.pl
102 $(PERL) $(srcdir)/regs.pl vc $(srcdir)/regs.dat > regvals.c
103 regs.h: regs.dat regs.pl
104 $(PERL) $(srcdir)/regs.pl h $(srcdir)/regs.dat > regs.h
106 install: nasm ndisasm
107 $(INSTALL_PROGRAM) nasm $(INSTALLROOT)$(bindir)/nasm
108 $(INSTALL_PROGRAM) ndisasm $(INSTALLROOT)$(bindir)/ndisasm
109 $(INSTALL_DATA) $(srcdir)/nasm.1 $(INSTALLROOT)$(mandir)/man1/nasm.1
110 $(INSTALL_DATA) $(srcdir)/ndisasm.1 $(INSTALLROOT)$(mandir)/man1/ndisasm.1
113 rm -f *.o *.s *.i nasm ndisasm
114 cd rdoff && $(MAKE) clean
117 rm -f config.* Makefile *~ *.bak *.lst *.bin
118 cd rdoff && $(MAKE) distclean
121 rm -f insnsa.c insnsd.c insnsi.h insnsn.c macros.c *.man
122 cd doc && $(MAKE) clean
124 spotless: distclean cleaner
129 rdf_install install_rdf:
130 cd rdoff && $(MAKE) install
133 cd doc && $(MAKE) all
135 doc_install install_doc:
136 cd doc && $(MAKE) install
138 everything: all doc rdf
140 install_everything: everything install install_doc install_rdf
142 #-- Magic hints to mkdep.pl --#
143 # @object-ending: ".o"
144 # @path-separator: "/"
145 #-- Everything below is generated by mkdep.pl - do not edit --#
146 assemble.o: assemble.c preproc.h insns.h regs.h regflags.c config.h \
147 version.h nasmlib.h nasm.h regvals.c insnsi.h assemble.h
148 disasm.o: disasm.c insns.h sync.h regdis.c regs.h config.h regs.c version.h \
149 nasm.h insnsn.c names.c insnsi.h disasm.h
150 eval.o: eval.c labels.h eval.h regs.h config.h version.h nasmlib.h nasm.h
151 float.o: float.c regs.h config.h version.h nasm.h
152 insnsa.o: insnsa.c insns.h regs.h config.h version.h nasm.h insnsi.h
153 insnsd.o: insnsd.c insns.h regs.h config.h version.h nasm.h insnsi.h
155 labels.o: labels.c regs.h config.h version.h nasmlib.h nasm.h
156 listing.o: listing.c regs.h config.h version.h nasmlib.h nasm.h listing.h
158 names.o: names.c regs.c insnsn.c
159 nasm.o: nasm.c labels.h preproc.h insns.h parser.h eval.h regs.h outform.h \
160 config.h version.h nasmlib.h nasm.h stdscan.h assemble.h insnsi.h listing.h
161 nasmlib.o: nasmlib.c insns.h regs.h config.h regs.c version.h nasmlib.h \
162 nasm.h insnsn.c names.c insnsi.h
163 ndisasm.o: ndisasm.c insns.h sync.h regs.h config.h version.h nasmlib.h \
164 nasm.h insnsi.h disasm.h
165 outform.o: outform.c regs.h config.h outform.h version.h nasm.h
166 output/outaout.o: output/outaout.c regs.h outform.h config.h version.h \
167 nasmlib.h nasm.h stdscan.h
168 output/outas86.o: output/outas86.c regs.h outform.h config.h version.h \
170 output/outbin.o: output/outbin.c labels.h eval.h regs.h outform.h config.h \
171 version.h nasmlib.h nasm.h stdscan.h
172 output/outcoff.o: output/outcoff.c regs.h outform.h config.h version.h \
174 output/outdbg.o: output/outdbg.c regs.h outform.h config.h version.h \
176 output/outelf32.o: output/outelf32.c regs.h outform.h config.h version.h \
177 nasmlib.h nasm.h stdscan.h
178 output/outelf64.o: output/outelf64.c regs.h outform.h config.h version.h \
179 nasmlib.h nasm.h stdscan.h
180 output/outieee.o: output/outieee.c regs.h outform.h config.h version.h \
182 output/outmacho.o: output/outmacho.c compiler.h regs.h outform.h config.h \
183 version.h nasmlib.h nasm.h
184 output/outobj.o: output/outobj.c regs.h outform.h config.h version.h \
185 nasmlib.h nasm.h stdscan.h
186 output/outrdf.o: output/outrdf.c regs.h outform.h config.h version.h \
188 output/outrdf2.o: output/outrdf2.c rdoff/rdoff.h regs.h outform.h config.h \
189 version.h nasmlib.h nasm.h
190 parser.o: parser.c insns.h parser.h float.h regs.h regflags.c config.h \
191 version.h nasmlib.h nasm.h stdscan.h insnsi.h
192 preproc.o: preproc.c macros.c regs.h config.h version.h nasmlib.h nasm.h
194 regflags.o: regflags.c
197 stdscan.o: stdscan.c insns.h regs.h config.h version.h nasmlib.h nasm.h \
199 sync.o: sync.c sync.h
200 tokhash.o: tokhash.c insns.h regs.h config.h version.h nasm.h insnsi.h