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 = -g -O2 -Wall -ansi -pedantic -I$(srcdir) -I.
21 INSTALL = /usr/bin/install -c
22 INSTALL_PROGRAM = ${INSTALL}
23 INSTALL_DATA = ${INSTALL} -m 644
27 .SUFFIXES: .c .i .s .o .1 .man
29 .PHONY: all doc rdf install clean distclean cleaner spotless install_rdf
30 .PHONY: install_doc everything install_everything
33 $(CC) -c $(CFLAGS) -o $@ $<
36 $(CC) -S $(CFLAGS) -o $@ $<
39 $(CC) -E $(CFLAGS) -o $@ $<
44 NASM = nasm.o nasmlib.o float.o insnsa.o assemble.o labels.o \
45 parser.o outform.o outbin.o outaout.o outcoff.o outelf.o \
46 outobj.o outas86.o outrdf.o outrdf2.o outdbg.o zoutieee.o \
47 preproc.o listing.o eval.o
49 NDISASM = ndisasm.o disasm.o sync.o nasmlib.o insnsd.o
51 all: nasm ndisasm nasm.man ndisasm.man
55 $(CC) $(LDFLAGS) -o nasm $(NASM)
58 $(CC) $(LDFLAGS) -o ndisasm $(NDISASM)
60 assemble.o: assemble.c nasm.h insnsi.h nasmlib.h assemble.h insns.h
61 disasm.o: disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
62 eval.o: eval.c eval.h nasm.h insnsi.h nasmlib.h
63 float.o: float.c nasm.h insnsi.h
64 insnsa.o: insnsa.c nasm.h insnsi.h insns.h
65 insnsd.o: insnsd.c nasm.h insnsi.h insns.h
66 labels.o: labels.c nasm.h insnsi.h nasmlib.h
67 listing.o: listing.c nasm.h insnsi.h nasmlib.h listing.h
68 nasm.o: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
70 nasmlib.o: nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
71 ndisasm.o: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
72 outaout.o: outaout.c nasm.h insnsi.h nasmlib.h outform.h
73 outas86.o: outas86.c nasm.h insnsi.h nasmlib.h outform.h
74 outbin.o: outbin.c nasm.h insnsi.h nasmlib.h outform.h
75 outcoff.o: outcoff.c nasm.h insnsi.h nasmlib.h outform.h
76 outdbg.o: outdbg.c nasm.h insnsi.h nasmlib.h outform.h
77 outelf.o: outelf.c nasm.h insnsi.h nasmlib.h outform.h
78 outform.o: outform.c outform.h nasm.h insnsi.h
79 outobj.o: outobj.c nasm.h insnsi.h nasmlib.h outform.h
80 outrdf.o: outrdf.c nasm.h insnsi.h nasmlib.h outform.h
81 outrdf2.o: outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
82 parser.o: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
83 preproc.o: preproc.c nasm.h insnsi.h nasmlib.h macros.c
85 zoutieee.o: zoutieee.c nasm.h insnsi.h nasmlib.h outform.h
87 # These source files are automagically generated from a single
88 # instruction-table file by a Perl script. They're distributed,
89 # though, so it isn't necessary to have Perl just to recompile NASM
90 # from the distribution.
92 insnsa.c: insns.dat insns.pl
93 perl $(srcdir)/insns.pl -a $(srcdir)/insns.dat
94 insnsd.c: insns.dat insns.pl
95 perl $(srcdir)/insns.pl -d $(srcdir)/insns.dat
96 insnsi.h: insns.dat insns.pl
97 perl $(srcdir)/insns.pl -i $(srcdir)/insns.dat
98 insnsn.c: insns.dat insns.pl
99 perl $(srcdir)/insns.pl -n $(srcdir)/insns.dat
101 # This source file is generated from the standard macros file
102 # `standard.mac' by another Perl script. Again, it's part of the
103 # standard distribution.
105 macros.c: standard.mac macros.pl
106 perl $(srcdir)/macros.pl $(srcdir)/standard.mac
108 install: nasm ndisasm
109 $(INSTALL_PROGRAM) nasm $(INSTALLROOT)$(bindir)/nasm
110 $(INSTALL_PROGRAM) ndisasm $(INSTALLROOT)$(bindir)/ndisasm
111 $(INSTALL_DATA) $(srcdir)/nasm.1 $(INSTALLROOT)$(mandir)/man1/nasm.1
112 $(INSTALL_DATA) $(srcdir)/ndisasm.1 $(INSTALLROOT)$(mandir)/man1/ndisasm.1
115 rm -f *.o *.s *.i nasm ndisasm
116 cd rdoff && $(MAKE) clean
119 rm -f config.* Makefile *~ *.bak *.lst *.bin
120 cd rdoff && $(MAKE) distclean
123 rm -f insnsa.c insnsd.c insnsi.h insnsn.c macros.c *.man
124 cd doc && $(MAKE) clean
126 spotless: distclean cleaner
131 rdf_install install_rdf:
132 cd rdoff && $(MAKE) install
135 cd doc && $(MAKE) all
137 doc_install install_doc:
138 cd doc && $(MAKE) install
140 everything: all doc rdf
142 install_everything: everything install install_doc install_rdf