2 # target: dos 16bit and 32bit
3 # Makefile for the Netwide Assembler
5 # This is a modification (by John Fine) of makefile.dj
7 # It uses the syntax of "Opus Make", which is the make program I prefer.
9 # It builds five targets:
11 # nasm16.exe 16-bit built with Turbo-C
12 # nasm.exe 32-bit built with DJGPP
13 # nasmd.exe nasm.exe with debug information (for use with gdb etc.)
14 # nasml.exe nasm.exe with logging version of malloc (to find memory leaks)
15 # ndisasm.exe NASM disassembler (DJGPP version)
18 .SUFFIXES: .exe .ol .o .obj .c .dat .pl
20 # The Netwide Assembler is copyright (C) 1996 Simon Tatham and
21 # Julian Hall. All rights reserved. The software is
22 # redistributable under the licence given in the file "Licence"
23 # distributed in the NASM archive.
25 # makefile designed for djgpp 2.xx
26 # djgpp is GNU C compiler ported by mighty DJ Delorie
27 # www.delorie.com and any simtel mirror
33 # redir -eo $(CC) -g -c -O2 -finline-functions -Wall -ansi -pedantic $*.c >$*.err
34 $(CC) -g -c -O2 -finline-functions -Wall -ansi -pedantic $*.c
37 $(CC) -DLOGALLOC -g -c -o $*.ol $(CFLAGS) $*.c
40 tcc -O -Z -c -ml -d -DOF_ONLY -DOF_BIN -DOF_OBJ -If:\public\turboc -I. $*.c >$*.err
42 NASM = nasm.o nasmlib.o float.o insnsa.o assemble.o labels.o \
43 parser.o outform.o outbin.o outaout.o outcoff.o outelf.o \
44 outobj.o outas86.o outrdf.o outrdf2.o zoutieee.o outdbg.o preproc.o listing.o \
47 NASML = nasm.ol nasmlib.ol float.ol insnsa.ol assemble.ol labels.ol \
48 parser.ol outform.ol outbin.ol outaout.ol outcoff.ol outelf.ol \
49 outobj.ol outas86.ol outrdf.ol outrdf2.ol zoutieee.ol outdbg.ol preproc.ol listing.ol \
52 NASM16 = nasm.obj nasmlib.obj float.obj insnsa.obj assemble.obj labels.obj \
53 parser.obj outform.obj outbin.obj \
54 outobj.obj preproc.obj listing.obj \
57 NDISASM = ndisasm.o disasm.o sync.o nasmlib.o insnsd.o
65 ndisasm.exe: $(NDISASM)
78 f:\public\turboc\lib\c0l.obj $(NASM16)
81 f:\public\turboc\lib\cl.lib
90 assemble.o: assemble.c nasm.h insnsi.h nasmlib.h assemble.h insns.h
91 disasm.o: disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
92 eval.o: eval.c eval.h nasm.h insnsi.h nasmlib.h
93 float.o: float.c nasm.h insnsi.h
94 insnsa.o: insnsa.c nasm.h insnsi.h insns.h
95 insnsd.o: insnsd.c nasm.h insnsi.h insns.h
96 labels.o: labels.c nasm.h insnsi.h nasmlib.h
97 listing.o: listing.c nasm.h insnsi.h nasmlib.h listing.h
98 nasm.o: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
100 nasmlib.o: nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
101 ndisasm.o: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
102 outaout.o: outaout.c nasm.h insnsi.h nasmlib.h outform.h
103 outas86.o: outas86.c nasm.h insnsi.h nasmlib.h outform.h
104 outbin.o: outbin.c nasm.h insnsi.h nasmlib.h outform.h
105 outcoff.o: outcoff.c nasm.h insnsi.h nasmlib.h outform.h
106 outdbg.o: outdbg.c nasm.h insnsi.h nasmlib.h outform.h
107 outelf.o: outelf.c nasm.h insnsi.h nasmlib.h outform.h
108 outform.o: outform.c outform.h nasm.h insnsi.h
109 outobj.o: outobj.c nasm.h insnsi.h nasmlib.h outform.h
110 outrdf.o: outrdf.c nasm.h insnsi.h nasmlib.h outform.h
111 outrdf2.o: outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
112 parser.o: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
113 preproc.o: preproc.c nasm.h insnsi.h nasmlib.h macros.c
114 sync.o: sync.c sync.h
115 zoutieee.o: zoutieee.c nasm.h insnsi.h nasmlib.h outform.h
117 assemble.ol: assemble.c nasm.h insnsi.h nasmlib.h assemble.h insns.h
118 disasm.ol: disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
119 eval.ol: eval.c eval.h nasm.h insnsi.h nasmlib.h
120 float.ol: float.c nasm.h insnsi.h
121 insnsa.ol: insnsa.c nasm.h insnsi.h insns.h
122 insnsd.ol: insnsd.c nasm.h insnsi.h insns.h
123 labels.ol: labels.c nasm.h insnsi.h nasmlib.h
124 listing.ol: listing.c nasm.h insnsi.h nasmlib.h listing.h
125 nasm.ol: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
127 nasmlib.ol: nasmlib.c nasm.h insnsi.h nasmlib.h
128 ndisasm.ol: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
129 outaout.ol: outaout.c nasm.h insnsi.h nasmlib.h outform.h
130 outas86.ol: outas86.c nasm.h insnsi.h nasmlib.h outform.h
131 outbin.ol: outbin.c nasm.h insnsi.h nasmlib.h outform.h
132 outcoff.ol: outcoff.c nasm.h insnsi.h nasmlib.h outform.h
133 outdbg.ol: outdbg.c nasm.h insnsi.h nasmlib.h outform.h
134 outelf.ol: outelf.c nasm.h insnsi.h nasmlib.h outform.h
135 outform.ol: outform.c outform.h nasm.h insnsi.h
136 outobj.ol: outobj.c nasm.h insnsi.h nasmlib.h outform.h
137 outrdf.ol: outrdf.c nasm.h insnsi.h nasmlib.h outform.h
138 outrdf2.ol: outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
139 parser.ol: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
140 preproc.ol: preproc.c nasm.h insnsi.h nasmlib.h macros.c
141 sync.ol: sync.c sync.h
142 zoutieee.ol: zoutieee.c nasm.h insnsi.h nasmlib.h outform.h
144 assemble.obj: assemble.c nasm.h insnsi.h nasmlib.h assemble.h insns.h
145 disasm.obj: disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
146 eval.obj: eval.c eval.h nasm.h insnsi.h nasmlib.h
147 float.obj: float.c nasm.h insnsi.h
148 insnsa.obj: insnsa.c nasm.h insnsi.h insns.h
149 insnsd.obj: insnsd.c nasm.h insnsi.h insns.h
150 labels.obj: labels.c nasm.h insnsi.h nasmlib.h
151 listing.obj: listing.c nasm.h insnsi.h nasmlib.h listing.h
152 nasm.obj: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
154 nasmlib.obj: nasmlib.c nasm.h insnsi.h nasmlib.h
155 ndisasm.obj: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
156 outaout.obj: outaout.c nasm.h insnsi.h nasmlib.h outform.h
157 outas86.obj: outas86.c nasm.h insnsi.h nasmlib.h outform.h
158 outbin.obj: outbin.c nasm.h insnsi.h nasmlib.h outform.h
159 outcoff.obj: outcoff.c nasm.h insnsi.h nasmlib.h outform.h
160 outdbg.obj: outdbg.c nasm.h insnsi.h nasmlib.h outform.h
161 outelf.obj: outelf.c nasm.h insnsi.h nasmlib.h outform.h
162 outform.obj: outform.c outform.h nasm.h insnsi.h
163 outobj.obj: outobj.c nasm.h insnsi.h nasmlib.h outform.h
164 outrdf.obj: outrdf.c nasm.h insnsi.h nasmlib.h outform.h
165 outrdf2.obj: outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
166 parser.obj: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
167 preproc.obj: preproc.c nasm.h insnsi.h nasmlib.h macros.c
168 sync.obj: sync.c sync.h
169 zoutieee.obj: zoutieee.c nasm.h insnsi.h nasmlib.h outform.h
171 # These four source files are automagically generated from a single
172 # instruction-table file by a Perl script. They're distributed,
173 # though, so it isn't necessary to have Perl just to recompile NASM
174 # from the distribution.
176 insnsa.c insnsd.c insnsi.h insnsn.c: insns.dat insns.pl
177 perl insns.pl insns.dat
179 # This source file is generated from the standard macros file
180 # `standard.mac' by another Perl script. Again, it's part of the
181 # standard distribution.
183 macros.c: standard.mac macros.pl
184 perl macros.pl standard.mac
187 rm -f *.o nasm ndisasm