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
29 .SUFFIXES: .c .i .s .o .1 .man
31 .PHONY: all doc rdf install clean distclean cleaner spotless install_rdf
32 .PHONY: install_doc everything install_everything
35 $(CC) -c $(CFLAGS) -o $@ $<
38 $(CC) -S $(CFLAGS) -o $@ $<
41 $(CC) -E $(CFLAGS) -o $@ $<
46 NASM = nasm.o nasmlib.o float.o insnsa.o assemble.o labels.o \
47 parser.o outform.o output/outbin.o output/outaout.o output/outcoff.o output/outelf.o \
48 output/outobj.o output/outas86.o output/outrdf.o output/outrdf2.o output/outdbg.o output/outieee.o \
49 preproc.o listing.o eval.o
51 NDISASM = ndisasm.o disasm.o sync.o nasmlib.o insnsd.o
53 all: nasm ndisasm nasm.man ndisasm.man
54 $(MAKE) -C rdoff -f Makefile.emx all
57 $(CC) $(LDFLAGS) -o nasm $(NASM) $(LIBS)
60 $(CC) $(LDFLAGS) -o ndisasm $(NDISASM) $(LIBS)
62 assemble.o: assemble.c nasm.h version.h insnsi.h nasmlib.h assemble.h insns.h
63 disasm.o: disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
64 eval.o: eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
65 float.o: float.c nasm.h version.h insnsi.h
66 insnsa.o: insnsa.c nasm.h version.h insnsi.h insns.h
67 insnsd.o: insnsd.c nasm.h version.h insnsi.h insns.h
68 labels.o: labels.c nasm.h version.h insnsi.h nasmlib.h
69 listing.o: listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
70 nasm.o: nasm.c nasm.h version.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
72 nasmlib.o: nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
73 ndisasm.o: ndisasm.c nasm.h version.h insnsi.h nasmlib.h sync.h disasm.h
74 output/outaout.o: output/outaout.c nasm.h version.h insnsi.h nasmlib.h outform.h
75 output/outas86.o: output/outas86.c nasm.h version.h insnsi.h nasmlib.h outform.h
76 output/outbin.o: output/outbin.c nasm.h version.h insnsi.h nasmlib.h outform.h
77 output/outcoff.o: output/outcoff.c nasm.h version.h insnsi.h nasmlib.h outform.h
78 output/outdbg.o: output/outdbg.c nasm.h version.h insnsi.h nasmlib.h outform.h
79 output/outelf.o: output/outelf.c nasm.h version.h insnsi.h nasmlib.h outform.h
80 outform.o: outform.c outform.h nasm.h version.h insnsi.h
81 output/outobj.o: output/outobj.c nasm.h version.h insnsi.h nasmlib.h outform.h
82 output/outrdf2.o: output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h outform.h
83 parser.o: parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
84 preproc.o: preproc.c nasm.h version.h insnsi.h nasmlib.h macros.c
86 output/outieee.o: output/outieee.c nasm.h version.h insnsi.h nasmlib.h outform.h
88 # These source files are automagically generated from a single
89 # instruction-table file by a Perl script. They're distributed,
90 # though, so it isn't necessary to have Perl just to recompile NASM
91 # from the distribution.
93 insnsa.c: insns.dat insns.pl
94 perl $(srcdir)/insns.pl -a $(srcdir)/insns.dat
95 insnsd.c: insns.dat insns.pl
96 perl $(srcdir)/insns.pl -d $(srcdir)/insns.dat
97 insnsi.h: insns.dat insns.pl
98 perl $(srcdir)/insns.pl -i $(srcdir)/insns.dat
99 insnsn.c: insns.dat insns.pl
100 perl $(srcdir)/insns.pl -n $(srcdir)/insns.dat
102 # These files contains all the standard macros that are derived from
103 # the version number.
104 version.h: version version.pl
105 perl $(srcdir)/version.pl h < $(srcdir)/version > version.h
107 version.mac: version version.pl
108 perl $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
110 # This source file is generated from the standard macros file
111 # `standard.mac' by another Perl script. Again, it's part of the
112 # standard distribution.
114 macros.c: standard.mac macros.pl version.mac
115 perl $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac
117 install: nasm ndisasm
118 $(INSTALL_PROGRAM) nasm $(INSTALLROOT)$(bindir)/nasm
119 $(INSTALL_PROGRAM) ndisasm $(INSTALLROOT)$(bindir)/ndisasm
120 $(INSTALL_DATA) $(srcdir)/nasm.1 $(INSTALLROOT)$(mandir)/man1/nasm.1
121 $(INSTALL_DATA) $(srcdir)/ndisasm.1 $(INSTALLROOT)$(mandir)/man1/ndisasm.1
124 rm -f *.o *.s *.i nasm ndisasm
125 cd rdoff && $(MAKE) clean
128 rm -f config.* Makefile *~ *.bak *.lst *.bin
129 cd rdoff && $(MAKE) distclean
132 rm -f insnsa.c insnsd.c insnsi.h insnsn.c macros.c *.man
133 cd doc && $(MAKE) clean
135 spotless: distclean cleaner
140 rdf_install install_rdf:
141 cd rdoff && $(MAKE) install
144 cd doc && $(MAKE) all
146 doc_install install_doc:
147 cd doc && $(MAKE) install
149 everything: all doc rdf
151 install_everything: everything install install_doc install_rdf