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 outbin.o outaout.o outcoff.o outelf.o \
48 outobj.o outas86.o outrdf.o outrdf2.o outdbg.o zoutieee.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 insnsi.h nasmlib.h assemble.h insns.h
63 disasm.o: disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
64 eval.o: eval.c eval.h nasm.h insnsi.h nasmlib.h
65 float.o: float.c nasm.h insnsi.h
66 insnsa.o: insnsa.c nasm.h insnsi.h insns.h
67 insnsd.o: insnsd.c nasm.h insnsi.h insns.h
68 labels.o: labels.c nasm.h insnsi.h nasmlib.h
69 listing.o: listing.c nasm.h insnsi.h nasmlib.h listing.h
70 nasm.o: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
72 nasmlib.o: nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
73 ndisasm.o: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
74 outaout.o: outaout.c nasm.h insnsi.h nasmlib.h outform.h
75 outas86.o: outas86.c nasm.h insnsi.h nasmlib.h outform.h
76 outbin.o: outbin.c nasm.h insnsi.h nasmlib.h outform.h
77 outcoff.o: outcoff.c nasm.h insnsi.h nasmlib.h outform.h
78 outdbg.o: outdbg.c nasm.h insnsi.h nasmlib.h outform.h
79 outelf.o: outelf.c nasm.h insnsi.h nasmlib.h outform.h
80 outform.o: outform.c outform.h nasm.h insnsi.h
81 outobj.o: outobj.c nasm.h insnsi.h nasmlib.h outform.h
82 outrdf.o: outrdf.c nasm.h insnsi.h nasmlib.h outform.h
83 outrdf2.o: outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
84 parser.o: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
85 preproc.o: preproc.c nasm.h insnsi.h nasmlib.h macros.c
87 zoutieee.o: zoutieee.c nasm.h insnsi.h nasmlib.h outform.h
89 # These source files are automagically generated from a single
90 # instruction-table file by a Perl script. They're distributed,
91 # though, so it isn't necessary to have Perl just to recompile NASM
92 # from the distribution.
94 insnsa.c: insns.dat insns.pl
95 perl $(srcdir)/insns.pl -a $(srcdir)/insns.dat
96 insnsd.c: insns.dat insns.pl
97 perl $(srcdir)/insns.pl -d $(srcdir)/insns.dat
98 insnsi.h: insns.dat insns.pl
99 perl $(srcdir)/insns.pl -i $(srcdir)/insns.dat
100 insnsn.c: insns.dat insns.pl
101 perl $(srcdir)/insns.pl -n $(srcdir)/insns.dat
103 # This source file is generated from the standard macros file
104 # `standard.mac' by another Perl script. Again, it's part of the
105 # standard distribution.
107 macros.c: standard.mac macros.pl
108 perl $(srcdir)/macros.pl $(srcdir)/standard.mac
110 install: nasm ndisasm
111 $(INSTALL_PROGRAM) nasm $(INSTALLROOT)$(bindir)/nasm
112 $(INSTALL_PROGRAM) ndisasm $(INSTALLROOT)$(bindir)/ndisasm
113 $(INSTALL_DATA) $(srcdir)/nasm.1 $(INSTALLROOT)$(mandir)/man1/nasm.1
114 $(INSTALL_DATA) $(srcdir)/ndisasm.1 $(INSTALLROOT)$(mandir)/man1/ndisasm.1
117 rm -f *.o *.s *.i nasm ndisasm
118 cd rdoff && $(MAKE) clean
121 rm -f config.* Makefile *~ *.bak *.lst *.bin
122 cd rdoff && $(MAKE) distclean
125 rm -f insnsa.c insnsd.c insnsi.h insnsn.c macros.c *.man
126 cd doc && $(MAKE) clean
128 spotless: distclean cleaner
133 rdf_install install_rdf:
134 cd rdoff && $(MAKE) install
137 cd doc && $(MAKE) all
139 doc_install install_doc:
140 cd doc && $(MAKE) install
142 everything: all doc rdf
144 install_everything: everything install install_doc install_rdf