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 $*.c
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/outelf32.o output/outelf64.o \
36 output/outobj.o output/outas86.o output/outdbg.o preproc.o listing.o \
37 eval.o output/outrdf2.o output/outieee.o output/outmacho.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 preproc.h insns.h pptok.h regs.h regflags.c config.h \
117 version.h nasmlib.h nasm.h regvals.c insnsi.h assemble.h
118 disasm.o: disasm.c insns.h sync.h regdis.c regs.h config.h regs.c version.h \
119 nasm.h insnsn.c names.c insnsi.h disasm.h
120 eval.o: eval.c labels.h eval.h regs.h config.h version.h nasmlib.h nasm.h
121 float.o: float.c regs.h config.h version.h nasm.h
122 insnsa.o: insnsa.c insns.h regs.h config.h version.h nasm.h insnsi.h
123 insnsd.o: insnsd.c insns.h regs.h config.h version.h nasm.h insnsi.h
125 labels.o: labels.c regs.h config.h version.h nasmlib.h nasm.h
126 listing.o: listing.c regs.h config.h version.h nasmlib.h nasm.h listing.h
128 names.o: names.c regs.c insnsn.c
129 nasm.o: nasm.c labels.h preproc.h insns.h parser.h eval.h pptok.h regs.h \
130 outform.h config.h version.h nasmlib.h nasm.h stdscan.h assemble.h insnsi.h \
132 nasmlib.o: nasmlib.c insns.h regs.h config.h version.h nasmlib.h nasm.h \
134 ndisasm.o: ndisasm.c insns.h sync.h regs.h config.h version.h nasmlib.h \
135 nasm.h insnsi.h disasm.h
136 outform.o: outform.c regs.h config.h outform.h version.h nasm.h
137 output/outaout.o: output/outaout.c regs.h outform.h config.h version.h \
138 nasmlib.h nasm.h stdscan.h
139 output/outas86.o: output/outas86.c regs.h outform.h config.h version.h \
141 output/outbin.o: output/outbin.c labels.h eval.h regs.h outform.h config.h \
142 version.h nasmlib.h nasm.h stdscan.h
143 output/outcoff.o: output/outcoff.c regs.h outform.h config.h version.h \
145 output/outdbg.o: output/outdbg.c regs.h outform.h config.h version.h \
147 output/outelf32.o: output/outelf32.c regs.h outform.h config.h version.h \
148 nasmlib.h nasm.h stdscan.h
149 output/outelf64.o: output/outelf64.c regs.h outform.h config.h version.h \
150 nasmlib.h nasm.h stdscan.h
151 output/outieee.o: output/outieee.c regs.h outform.h config.h version.h \
153 output/outmacho.o: output/outmacho.c compiler.h regs.h outform.h config.h \
154 version.h nasmlib.h nasm.h
155 output/outobj.o: output/outobj.c regs.h outform.h config.h version.h \
156 nasmlib.h nasm.h stdscan.h
157 output/outrdf.o: output/outrdf.c regs.h outform.h config.h version.h \
159 output/outrdf2.o: output/outrdf2.c rdoff/rdoff.h regs.h outform.h config.h \
160 version.h nasmlib.h nasm.h
161 parser.o: parser.c insns.h parser.h float.h regs.h regflags.c config.h \
162 version.h nasmlib.h nasm.h stdscan.h insnsi.h
164 preproc.o: preproc.c preproc.h macros.c pptok.h regs.h config.h version.h \
167 regflags.o: regflags.c
170 stdscan.o: stdscan.c insns.h regs.h config.h version.h nasmlib.h nasm.h \
172 sync.o: sync.c sync.h
173 tokhash.o: tokhash.c insns.h regs.h config.h version.h nasm.h insnsi.h