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 output/outelf.o \
49 output/outobj.o output/outas86.o output/outrdf.o output/outrdf2.o output/outdbg.o output/outieee.o \
50 preproc.o listing.o eval.o
52 NDISASM = ndisasm.o disasm.o sync.o nasmlib.o insnsd.o
54 all: nasm ndisasm nasm.man ndisasm.man
55 $(MAKE) -C rdoff -f Makefile.emx all
58 $(CC) $(LDFLAGS) -o nasm $(NASM) $(LIBS)
61 $(CC) $(LDFLAGS) -o ndisasm $(NDISASM) $(LIBS)
63 # These source files are automagically generated from a single
64 # instruction-table file by a Perl script. They're distributed,
65 # though, so it isn't necessary to have Perl just to recompile NASM
66 # from the distribution.
68 insnsa.c: insns.dat insns.pl
69 $(PERL) $(srcdir)/insns.pl -a $(srcdir)/insns.dat
70 insnsd.c: insns.dat insns.pl
71 $(PERL) $(srcdir)/insns.pl -d $(srcdir)/insns.dat
72 insnsi.h: insns.dat insns.pl
73 $(PERL) $(srcdir)/insns.pl -i $(srcdir)/insns.dat
74 insnsn.c: insns.dat insns.pl
75 $(PERL) $(srcdir)/insns.pl -n $(srcdir)/insns.dat
77 # These files contains all the standard macros that are derived from
79 version.h: version version.pl
80 $(PERL) $(srcdir)/version.pl h < $(srcdir)/version > version.h
82 version.mac: version version.pl
83 $(PERL) $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
85 # This source file is generated from the standard macros file
86 # `standard.mac' by another Perl script. Again, it's part of the
87 # standard distribution.
89 macros.c: standard.mac macros.pl version.mac
90 $(PERL) $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac
92 # These source files are generated from regs.dat by yet another
94 regs.c: regs.dat regs.pl
95 $(PERL) $(srcdir)/regs.pl c $(srcdir)/regs.dat > regs.c
96 regflags.c: regs.dat regs.pl
97 $(PERL) $(srcdir)/regs.pl fc $(srcdir)/regs.dat > regflags.c
98 regdis.c: regs.dat regs.pl
99 $(PERL) $(srcdir)/regs.pl dc $(srcdir)/regs.dat > regdis.c
100 regvals.c: regs.dat regs.pl
101 $(PERL) $(srcdir)/regs.pl vc $(srcdir)/regs.dat > regvals.c
102 regs.h: regs.dat regs.pl
103 $(PERL) $(srcdir)/regs.pl h $(srcdir)/regs.dat > regs.h
105 install: nasm ndisasm
106 $(INSTALL_PROGRAM) nasm $(INSTALLROOT)$(bindir)/nasm
107 $(INSTALL_PROGRAM) ndisasm $(INSTALLROOT)$(bindir)/ndisasm
108 $(INSTALL_DATA) $(srcdir)/nasm.1 $(INSTALLROOT)$(mandir)/man1/nasm.1
109 $(INSTALL_DATA) $(srcdir)/ndisasm.1 $(INSTALLROOT)$(mandir)/man1/ndisasm.1
112 rm -f *.o *.s *.i nasm ndisasm
113 cd rdoff && $(MAKE) clean
116 rm -f config.* Makefile *~ *.bak *.lst *.bin
117 cd rdoff && $(MAKE) distclean
120 rm -f insnsa.c insnsd.c insnsi.h insnsn.c macros.c *.man
121 cd doc && $(MAKE) clean
123 spotless: distclean cleaner
128 rdf_install install_rdf:
129 cd rdoff && $(MAKE) install
132 cd doc && $(MAKE) all
134 doc_install install_doc:
135 cd doc && $(MAKE) install
137 everything: all doc rdf
139 install_everything: everything install install_doc install_rdf
141 #-- Magic hints to mkdep.pl --#
142 # @object-ending: ".o"
143 # @path-separator: "/"
144 #-- Everything below is generated by mkdep.pl - do not edit --#
145 assemble.o: assemble.c insns.h assemble.h regvals.c nasm.h regs.h insnsi.h \
147 disasm.o: disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
148 insnsn.c insnsi.h version.h regdis.c
149 eval.o: eval.c nasm.h regs.h labels.h nasmlib.h version.h eval.h
150 float.o: float.c nasm.h regs.h version.h
151 insnsa.o: insnsa.c insns.h nasm.h regs.h insnsi.h version.h
152 insnsd.o: insnsd.c insns.h nasm.h regs.h insnsi.h version.h
154 labels.o: labels.c nasm.h regs.h nasmlib.h version.h
155 listing.o: listing.c listing.h nasm.h regs.h nasmlib.h version.h
157 names.o: names.c regs.c insnsn.c
158 nasm.o: nasm.c listing.h preproc.h insns.h outform.h assemble.h parser.h \
159 nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
160 nasmlib.o: nasmlib.c insns.h regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
162 ndisasm.o: ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
164 outform.o: outform.c outform.h nasm.h regs.h version.h
165 output/outaout.o: output/outaout.c outform.h nasm.h regs.h nasmlib.h \
167 output/outas86.o: output/outas86.c outform.h nasm.h regs.h nasmlib.h \
169 output/outbin.o: output/outbin.c outform.h nasm.h regs.h nasmlib.h version.h
170 output/outcoff.o: output/outcoff.c outform.h nasm.h regs.h nasmlib.h \
172 output/outdbg.o: output/outdbg.c outform.h nasm.h regs.h nasmlib.h version.h
173 output/outelf.o: output/outelf.c outform.h nasm.h regs.h nasmlib.h version.h
174 output/outieee.o: output/outieee.c outform.h nasm.h regs.h nasmlib.h \
176 output/outobj.o: output/outobj.c outform.h nasm.h regs.h nasmlib.h version.h
177 output/outrdf.o: output/outrdf.c outform.h nasm.h regs.h nasmlib.h version.h
178 output/outrdf2.o: output/outrdf2.c outform.h nasm.h regs.h nasmlib.h \
180 parser.o: parser.c insns.h parser.h nasm.h regs.h insnsi.h regflags.c \
181 float.h nasmlib.h version.h
182 preproc.o: preproc.c nasm.h macros.c regs.h nasmlib.h version.h
184 regflags.o: regflags.c
187 sync.o: sync.c sync.h