1 # Unix fall-back makefile for the Netwide Assembler. For use if
2 # `configure' fails to generate a workable Makefile.
4 # If `configure' doesn't work for you, *please* inform
5 # <nasm-bugs@lists.sourceforge.net>
7 # The Netwide Assembler is copyright (C) 1996 Simon Tatham and
8 # Julian Hall. All rights reserved. The software is
9 # redistributable under the GNU Lesser General Public License.
11 # You may need to adjust these values.
19 INSTALL_PROGRAM = $(INSTALL)
20 INSTALL_DATA = $(INSTALL) -m 644
22 exec_prefix = $(prefix)
23 bindir = $(exec_prefix)/bin
24 mandir = $(prefix)/man
26 # You _shouldn't_ need to adjust anything below this line.
28 .SUFFIXES: .c .o .h .mac .pl
31 $(CC) -c $(CFLAGS) -o $*.o $<
33 NASM = nasm.o nasmlib.o float.o insnsa.o assemble.o labels.o \
34 parser.o outform.o output/outbin.o output/outaout.o \
35 output/outcoff.o output/outelf.o \
36 output/outobj.o output/outas86.o output/outdbg.o preproc.o listing.o \
37 eval.o output/outrdf2.o output/outieee.o
39 NDISASM = ndisasm.o disasm.o sync.o nasmlib.o insnsd.o
47 $(CC) -o ndisasm $(NDISASM)
49 # These files contains all the standard macros that are derived from
51 version.h: version version.pl
52 $(PERL) version.pl h < version > version.h
54 version.mac: version version.pl
55 $(PERL) version.pl mac < version > version.mac
57 # This source file is generated from the standard macros file
58 # `standard.mac' by another Perl script. Again, it's part of the
59 # standard distribution.
61 macros.c: macros.pl standard.mac version.mac
62 $(PERL) macros.pl standard.mac version.mac
64 insnsa.c: insns.pl insns.dat
65 $(PERL) insns.pl -a insns.dat
67 insnsd.c: insns.pl insns.dat
68 $(PERL) insns.pl -d insns.dat
70 insnsi.h: insns.pl insns.dat
71 $(PERL) insns.pl -i insns.dat
73 insnsn.c: insns.pl insns.dat
74 $(PERL) insns.pl -n insns.dat
76 # These source files are generated from regs.dat by yet another
78 regs.c: regs.dat regs.pl
79 $(PERL) regs.pl c regs.dat > regs.c
80 regflags.c: regs.dat regs.pl
81 $(PERL) regs.pl fc regs.dat > regflags.c
82 regdis.c: regs.dat regs.pl
83 $(PERL) regs.pl dc regs.dat > regdis.c
84 regvals.c: regs.dat regs.pl
85 $(PERL) regs.pl vc regs.dat > regvals.c
86 regs.h: regs.dat regs.pl
87 $(PERL) regs.pl h regs.dat > regs.h
89 # This target generates all files that require perl.
90 # This allows easier generation of distribution (see dist target).
91 PERLREQ = macros.c insnsa.c insnsd.c insnsi.h insnsn.c \
92 regs.c regs.h regflags.c regdis.c regvals.c \
97 $(INSTALL_PROGRAM) nasm $(bindir)/nasm
98 $(INSTALL_PROGRAM) ndisasm $(bindir)/ndisasm
99 $(INSTALL_DATA) nasm.1 $(mandir)/man1/nasm.1
100 $(INSTALL_DATA) ndisasm.1 $(mandir)/man1/ndisasm.1
103 rm -f *.o nasm ndisasm
104 $(MAKE) -C rdoff clean
109 rdf_install install_rdf:
110 $(MAKE) -C rdoff install
112 #-- Magic hints to mkdep.pl --#
113 # @object-ending: ".o"
114 # @path-separator: "/"
115 #-- Everything below is generated by mkdep.pl - do not edit --#
116 assemble.o: assemble.c insns.h assemble.h regvals.c nasm.h regs.h insnsi.h \
118 disasm.o: disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
119 insnsn.c insnsi.h version.h regdis.c
120 eval.o: eval.c nasm.h regs.h labels.h nasmlib.h version.h eval.h
121 float.o: float.c nasm.h regs.h version.h
122 insnsa.o: insnsa.c insns.h nasm.h regs.h insnsi.h version.h
123 insnsd.o: insnsd.c insns.h nasm.h regs.h insnsi.h version.h
125 labels.o: labels.c nasm.h regs.h nasmlib.h version.h
126 listing.o: listing.c listing.h nasm.h regs.h nasmlib.h version.h
128 names.o: names.c regs.c insnsn.c
129 nasm.o: nasm.c listing.h preproc.h insns.h outform.h assemble.h parser.h \
130 nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
131 nasmlib.o: nasmlib.c insns.h regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
133 ndisasm.o: ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
135 outform.o: outform.c outform.h nasm.h regs.h version.h
136 output/outaout.o: output/outaout.c outform.h nasm.h regs.h nasmlib.h \
138 output/outas86.o: output/outas86.c outform.h nasm.h regs.h nasmlib.h \
140 output/outbin.o: output/outbin.c outform.h nasm.h regs.h nasmlib.h version.h
141 output/outcoff.o: output/outcoff.c outform.h nasm.h regs.h nasmlib.h \
143 output/outdbg.o: output/outdbg.c outform.h nasm.h regs.h nasmlib.h version.h
144 output/outelf.o: output/outelf.c outform.h nasm.h regs.h nasmlib.h version.h
145 output/outieee.o: output/outieee.c outform.h nasm.h regs.h nasmlib.h \
147 output/outobj.o: output/outobj.c outform.h nasm.h regs.h nasmlib.h version.h
148 output/outrdf.o: output/outrdf.c outform.h nasm.h regs.h nasmlib.h version.h
149 output/outrdf2.o: output/outrdf2.c outform.h nasm.h regs.h nasmlib.h \
151 parser.o: parser.c insns.h parser.h nasm.h regs.h insnsi.h regflags.c \
152 float.h nasmlib.h version.h
153 preproc.o: preproc.c nasm.h macros.c regs.h nasmlib.h version.h
155 regflags.o: regflags.c
158 sync.o: sync.c sync.h