Make the perfect hash generator an includable module
[nasm/autotest.git] / Mkfiles / Makefile.ms7
blob31b486f4b29be8bc8ecaaa138b31e82445e04937
1 # Makefile for the Netwide Assembler under 16-bit DOS
3 # The Netwide Assembler is copyright (C) 1996 Simon Tatham and
4 # Julian Hall. All rights reserved. The software is
5 # redistributable under the licence given in the file "Licence"
6 # distributed in the NASM archive.
8 # This Makefile is designed to build NASM using a 16-bit DOS C
9 # compiler such as Microsoft C, provided you have a compatible MAKE.
10 # It's been tested with Microsoft C 5.x plus Borland Make. (Yes, I
11 # know it's silly, but...)
13 # update:  MSC 5.1 will not compile 'nasmlib.c'   (arg lists don't match)
14 #          MSC 6.00A will not compile 'insnsa.c'  (qcl is required)
15 #          MSC 7.00 will compile all
17 # GNU software compiled by DJGPP is also required:
19 #    grep  2.4
20 #    perl  5.6.1
22 # Source and DOS/Windows binaries may be downloaded from:
24 #    ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/
26 # Compilation has been tested under Windows 98 & Windows 2000
27 # MSC 7.00 & DJGPP applications require a DPMI interface, which is
28 # a part of MSC 7.00 under DOS.  It is also a part of Windows.
31 # For a 16-bit compiler, we don't need all the formats
33 CONFIG = -DOF_ONLY -DOF_BIN -DOF_OBJ -DOF_WIN32 -DOF_AS86
35 #CC = cl /c /O /AL /Gt
36 #   Compile for a 286, ain't nobody using an 8086 anymore
37 CC = cl /c /Oz /AL /Gt256 /G2 /I.. # MSC 7.00
39 #QCL = qcl /c /AL /Gt
40 QCL = $(CC)                     # MSC 7.00
42 LINK = link
43 LINKFLAGS = /F4000 /Fm
44 LIBRARIES =
45 EXE = .exe#
46 OBJ = obj#
48 .c.$(OBJ):
49         $(CC) $(CONFIG) /Fo$@ $*.c
51 NASMOBJS1 = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
52            assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ)
53 NASMOBJS2 = output\outbin.$(OBJ) output\outaout.$(OBJ) output\outcoff.$(OBJ)
54 NASMOBJS3 = output\outelf32.$(OBJ) output\outelf64.$(OBJ) output\outobj.$(OBJ) output\outas86.$(OBJ)
55 NASMOBJS4 = output\outrdf.$(OBJ) output\outrdf2.$(OBJ) output\outieee.$(OBJ)
56 NASMOBJS5 = output\outdbg.$(OBJ) preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ)
58 NASMOBJS = $(NASMOBJS1) $(NASMOBJS2) $(NASMOBJS3) $(NASMOBJS4) $(NASMOBJS5)
60 NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
61               insnsd.$(OBJ)
63 all : nasm$(EXE) ndisasm$(EXE)
65 # We have to have a horrible kludge here to get round the 128 character
66 # limit, as usual...
67 LINKOBJS = a*.obj e*.obj f*.obj insnsa.obj l*.obj na*.obj o*.obj p*.obj
68 nasm$(EXE): $(NASMOBJS)
69         echo $(NASMOBJS1) + >foo
70         echo $(NASMOBJS2) + >>foo
71         echo $(NASMOBJS3) + >>foo
72         echo $(NASMOBJS4) + >>foo
73         echo $(NASMOBJS5)   >> foo
74         $(LINK) /st:4096 @foo,nasm;
76 ndisasm$(EXE): $(NDISASMOBJS)
77         $(LINK) $(NDISASMOBJS), ndisasm;
79 output\version.h: version.h
80         copy version.h output
82 output\nasm.h: nasm.h
83         copy nasm.h output
85 output\insnsi.h: insnsi.h
86         copy insnsi.h output
88 output\nasmlib.h: nasmlib.h
89         copy nasmlib.h output
91 output\outform.h: outform.h
92         copy outform.h output
94 # These files contains all the standard macros that are derived from
95 # the version number.
96 version.h: version version.pl
97         perl version.pl h < version > version.h
99 version.mac: version version.pl
100         perl version.pl mac < version > version.mac
102 # This source file is generated from the standard macros file
103 # `standard.mac' by another Perl script. Again, it's part of the
104 # standard distribution.
106 macros.c: macros.pl standard.mac version.mac
107         perl macros.pl standard.mac version.mac
109 insnsa.c insnsd.c insnsi.h insnsn.c: insns16.dat insns.pl
110         perl insns.pl insns16.dat
112 insns16.dat:  insns.dat
113         grep -v WILLAMETTE insns.dat | grep -v KATMAI | grep -v SSE | \
114             grep -v MMX | grep -v 3DNOW | grep -v UNDOC >insns16.dat
116 # These source files are generated from regs.dat by yet another
117 # perl script.
118  regs.c: regs.dat regs.pl
119         perl regs.pl c regs.dat > regs.c
120 regflags.c: regs.dat regs.pl
121         perl regs.pl fc regs.dat > regflags.c
122 regdis.c: regs.dat regs.pl
123         perl regs.pl dc regs.dat > regdis.c
124 regvals.c: regs.dat regs.pl
125         perl regs.pl vc regs.dat > regvals.c
126 regs.h: regs.dat regs.pl
127         perl regs.pl h regs.dat > regs.h
129 # Another grotty hack: QC is less likely to run out of memory than
130 # CL proper; and we don't need any optimisation in these modules
131 # since they're just data.
132 insnsa.$(OBJ): insnsa.c nasm.h version.h insnsi.h insns.h
133         $(QCL) insnsa.c
135 insnsd.$(OBJ): insnsd.c nasm.h version.h insnsi.h insns.h
136         $(QCL) insnsd.c
138 tidy:
139         del output\*.h
140         del *.$(OBJ)
141         del output\*.$(OBJ)
143 clean :  tidy
144         del nasm$(EXE)
145         del ndisasm$(EXE)
147 spotless:  clean
148         del insns16.dat
149         del insnsa.c
150         del insnsd.c
151         del insnsi.h
152         del insnsn.c
153         del version.h
155 #-- Magic hints to mkdep.pl --#
156 # @object-ending: ".$(OBJ)"
157 # @path-separator: "\"
158 #-- Everything below is generated by mkdep.pl - do not edit --#
159 assemble.$(OBJ): assemble.c preproc.h insns.h regs.h regflags.c config.h \
160  version.h nasmlib.h nasm.h regvals.c insnsi.h assemble.h
161 disasm.$(OBJ): disasm.c insns.h sync.h regdis.c regs.h config.h regs.c \
162  version.h nasm.h insnsn.c names.c insnsi.h disasm.h
163 eval.$(OBJ): eval.c labels.h eval.h regs.h config.h version.h nasmlib.h \
164  nasm.h
165 float.$(OBJ): float.c regs.h config.h version.h nasm.h
166 insnsa.$(OBJ): insnsa.c insns.h regs.h config.h version.h nasm.h insnsi.h
167 insnsd.$(OBJ): insnsd.c insns.h regs.h config.h version.h nasm.h insnsi.h
168 insnsn.$(OBJ): insnsn.c
169 labels.$(OBJ): labels.c regs.h config.h version.h nasmlib.h nasm.h
170 listing.$(OBJ): listing.c regs.h config.h version.h nasmlib.h nasm.h \
171  listing.h
172 macros.$(OBJ): macros.c
173 names.$(OBJ): names.c regs.c insnsn.c
174 nasm.$(OBJ): nasm.c labels.h preproc.h insns.h parser.h eval.h regs.h \
175  outform.h config.h version.h nasmlib.h nasm.h assemble.h insnsi.h listing.h
176 nasmlib.$(OBJ): nasmlib.c insns.h regs.h config.h regs.c version.h nasmlib.h \
177  nasm.h insnsn.c names.c insnsi.h
178 ndisasm.$(OBJ): ndisasm.c insns.h sync.h regs.h config.h version.h nasmlib.h \
179  nasm.h insnsi.h disasm.h
180 outform.$(OBJ): outform.c regs.h config.h outform.h version.h nasm.h
181 output\outaout.$(OBJ): output\outaout.c regs.h outform.h config.h version.h \
182  nasmlib.h nasm.h
183 output\outas86.$(OBJ): output\outas86.c regs.h outform.h config.h version.h \
184  nasmlib.h nasm.h
185 output\outbin.$(OBJ): output\outbin.c labels.h eval.h regs.h outform.h \
186  config.h version.h nasmlib.h nasm.h
187 output\outcoff.$(OBJ): output\outcoff.c regs.h outform.h config.h version.h \
188  nasmlib.h nasm.h
189 output\outdbg.$(OBJ): output\outdbg.c regs.h outform.h config.h version.h \
190  nasmlib.h nasm.h
191 output\outelf32.$(OBJ): output\outelf32.c regs.h outform.h config.h \
192  version.h nasmlib.h nasm.h
193 output\outelf64.$(OBJ): output\outelf64.c regs.h outform.h config.h \
194  version.h nasmlib.h nasm.h
195 output\outieee.$(OBJ): output\outieee.c regs.h outform.h config.h version.h \
196  nasmlib.h nasm.h
197 output\outmacho.$(OBJ): output\outmacho.c compiler.h regs.h outform.h \
198  config.h version.h nasmlib.h nasm.h
199 output\outobj.$(OBJ): output\outobj.c regs.h outform.h config.h version.h \
200  nasmlib.h nasm.h
201 output\outrdf.$(OBJ): output\outrdf.c regs.h outform.h config.h version.h \
202  nasmlib.h nasm.h
203 output\outrdf2.$(OBJ): output\outrdf2.c rdoff\rdoff.h regs.h outform.h \
204  config.h version.h nasmlib.h nasm.h
205 parser.$(OBJ): parser.c insns.h parser.h float.h regs.h regflags.c config.h \
206  version.h nasmlib.h nasm.h insnsi.h
207 preproc.$(OBJ): preproc.c macros.c regs.h config.h version.h nasmlib.h \
208  nasm.h
209 regdis.$(OBJ): regdis.c
210 regflags.$(OBJ): regflags.c
211 regs.$(OBJ): regs.c
212 regvals.$(OBJ): regvals.c
213 sync.$(OBJ): sync.c sync.h