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 two targets:
11 # nasm.exe 32-bit built with DJGPP
12 # ndisasm.exe NASM disassembler (DJGPP version)
15 .SUFFIXES: .exe .ol .o .obj .c .dat .pl
17 # The Netwide Assembler is copyright (C) 1996 Simon Tatham and
18 # Julian Hall. All rights reserved. The software is
19 # redistributable under the licence given in the file "Licence"
20 # distributed in the NASM archive.
22 # makefile designed for djgpp 2.xx
23 # djgpp is GNU C compiler ported by mighty DJ Delorie
24 # www.delorie.com and any simtel mirror
30 # redir -eo $(CC) -g -c -O2 -finline-functions -Wall -ansi -pedantic $*.c >$*.err
31 $(CC) -g -c -O2 -finline-functions -Wall -ansi -pedantic $*.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 output/outcoff.o \
35 output/outelf32.o output/outelf64.o \
36 output/outobj.o output/outas86.o output/outrdf.o output/outrdf2.o output/outieee.o output/outdbg.o preproc.o listing.o \
39 NDISASM = ndisasm.o disasm.o sync.o nasmlib.o insnsd.o
47 ndisasm.exe: $(NDISASM)
53 # These four source files are automagically generated from a single
54 # instruction-table file by a Perl script. They're distributed,
55 # though, so it isn't necessary to have Perl just to recompile NASM
56 # from the distribution.
58 insnsa.c insnsd.c insnsi.h insnsn.c: insns.dat insns.pl
59 perl insns.pl insns.dat
61 # These files contains all the standard macros that are derived from
63 version.h: version version.pl
64 perl $(srcdir)/version.pl h < $(srcdir)/version > version.h
66 version.mac: version version.pl
67 perl $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
69 # This source file is generated from the standard macros file
70 # `standard.mac' by another Perl script. Again, it's part of the
71 # standard distribution.
73 macros.c: standard.mac macros.pl version.mac
74 perl macros.pl standard.mac version.mac
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
90 rm -f *.o nasm ndisasm
92 #-- Magic hints to mkdep.pl --#
93 # @object-ending: ".o"
94 # @path-separator: "/"
95 #-- Everything below is generated by mkdep.pl - do not edit --#
96 assemble.o: assemble.c preproc.h insns.h regs.h regflags.c config.h \
97 version.h nasmlib.h nasm.h regvals.c insnsi.h assemble.h
98 disasm.o: disasm.c insns.h sync.h regdis.c regs.h config.h regs.c version.h \
99 nasm.h insnsn.c names.c insnsi.h disasm.h
100 eval.o: eval.c labels.h eval.h regs.h config.h version.h nasmlib.h nasm.h
101 float.o: float.c regs.h config.h version.h nasm.h
102 insnsa.o: insnsa.c insns.h regs.h config.h version.h nasm.h insnsi.h
103 insnsd.o: insnsd.c insns.h regs.h config.h version.h nasm.h insnsi.h
105 labels.o: labels.c regs.h config.h version.h nasmlib.h nasm.h
106 listing.o: listing.c regs.h config.h version.h nasmlib.h nasm.h listing.h
108 names.o: names.c regs.c insnsn.c
109 nasm.o: nasm.c labels.h preproc.h insns.h parser.h eval.h regs.h outform.h \
110 config.h version.h nasmlib.h nasm.h stdscan.h assemble.h insnsi.h listing.h
111 nasmlib.o: nasmlib.c insns.h regs.h config.h regs.c version.h nasmlib.h \
112 nasm.h insnsn.c names.c insnsi.h
113 ndisasm.o: ndisasm.c insns.h sync.h regs.h config.h version.h nasmlib.h \
114 nasm.h insnsi.h disasm.h
115 outform.o: outform.c regs.h config.h outform.h version.h nasm.h
116 output/outaout.o: output/outaout.c regs.h outform.h config.h version.h \
117 nasmlib.h nasm.h stdscan.h
118 output/outas86.o: output/outas86.c regs.h outform.h config.h version.h \
120 output/outbin.o: output/outbin.c labels.h eval.h regs.h outform.h config.h \
121 version.h nasmlib.h nasm.h stdscan.h
122 output/outcoff.o: output/outcoff.c regs.h outform.h config.h version.h \
124 output/outdbg.o: output/outdbg.c regs.h outform.h config.h version.h \
126 output/outelf32.o: output/outelf32.c regs.h outform.h config.h version.h \
127 nasmlib.h nasm.h stdscan.h
128 output/outelf64.o: output/outelf64.c regs.h outform.h config.h version.h \
129 nasmlib.h nasm.h stdscan.h
130 output/outieee.o: output/outieee.c regs.h outform.h config.h version.h \
132 output/outmacho.o: output/outmacho.c compiler.h regs.h outform.h config.h \
133 version.h nasmlib.h nasm.h
134 output/outobj.o: output/outobj.c regs.h outform.h config.h version.h \
135 nasmlib.h nasm.h stdscan.h
136 output/outrdf.o: output/outrdf.c regs.h outform.h config.h version.h \
138 output/outrdf2.o: output/outrdf2.c rdoff/rdoff.h regs.h outform.h config.h \
139 version.h nasmlib.h nasm.h
140 parser.o: parser.c insns.h parser.h float.h regs.h regflags.c config.h \
141 version.h nasmlib.h nasm.h stdscan.h insnsi.h
142 preproc.o: preproc.c macros.c regs.h config.h version.h nasmlib.h nasm.h
144 regflags.o: regflags.c
147 stdscan.o: stdscan.c insns.h regs.h config.h version.h nasmlib.h nasm.h \
149 sync.o: sync.c sync.h
150 tokhash.o: tokhash.c insns.h regs.h config.h version.h nasm.h insnsi.h