Make the perfect hash generator an includable module
[nasm/autotest.git] / Mkfiles / Makefile.b32
blobec5fe9b60a3a875dec1fc164160165544233c516
1 # Makefile for the Netwide Assembler under 32 bit NT console
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 with the latest
9 # version of Borland C++Builder and has been tested with 
10 # Borland C++ 5.5 (Borland C++Builder 5.0) in combination
11 # Borland MAKE 5.2
13 # Additionally, the free Borland C++ Compiler 5.5 is supported;
14 # see
16 #   http://www.borland.com/bcppbuilder/freecompiler/
18 # MAKEFILE is maintained by Stefan.Hoffmeister@Econos.de
21 PERL=perl
23 srcdir=.
24 #BINDIR=e:\devel\bcb5\cbuilder5\bin
26 # If "BINDIR=C:\...." has not been defined on the command line
27 # assume that the binary files are in the same directory as the
28 # MAKE utility
29 !message ****************************************************
30 !message Note:
31 !message -----
32 !if $d(BINDIR)
33   !message Path to tools set to $(BINDIR)
34 !else
35   BINDIR=$(MAKEDIR)
36   !message Assuming path to tools to be $(BINDIR)
37   !message
38   !message You can change this assumption by specifying
39   !message   -DBINDIR=C:\my_path
40   !message as a command line paramter for MAKE
41 !endif
42 !message ****************************************************
45 CC=$(BINDIR)\bcc32
46 CCFLAGS=-q -Q -tWC -c -O2 -A -d -w-8057
47   # /q:    Suppress compiler identification banner
48   # /Q:    Extended compiler error information
49   # /-tWC: Windows console mode application
50   # /c:    Compile, do not link
51   # /O2:   Optimize for speed
52   # /A:    ANSI compatible code only
53   # /d:    Merge duplicate strings
54   # /-w-8057: Turn off "Parameter <param> never used in function <func>" warning
56 LINK=$(BINDIR)\ilink32
57 LINKFLAGS=/V4.0 /q /x /c /ap /L$(BINDIR)\..\LIB     # /L -> default LIB directory
58   # /V4.0: marked as Win95 / NT application in PE header
59   # /q:    suppress command-line banner
60   # /x:    no map file
61   # /c:    case sensitive link
62   # /ap:   link for 32-bit console application
63   # /L...: path to .lib directory
66 # default libraries for Win32 console applications
67 LIBRARIES=cw32.lib import32.lib
68 # default startup code for Win32 console applications
69 STARTUP=c0x32.obj
71 # default extension for our EXE
72 EXE=.exe
73 # default extension for OBJ files
74 OBJ=obj
77 SUFFIX= w#       # by default, this makefile produces nasmw.exe and ndisasmw.exe
80 # Builds C files to OBJ
81 .c.$(OBJ):
82   $(CC) $(CCFLAGS) $*.c
85 NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
86              assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
87                   output\outbin.$(OBJ) output\outaout.$(OBJ) output\outcoff.$(OBJ) \
88                    output\outelf32.$(OBJ) output\outelf64.$(OBJ) \
89                   output\outobj.$(OBJ) output\outas86.$(OBJ) output\outrdf.$(OBJ) output\outdbg.$(OBJ) \
90         output\outrdf2.$(OBJ) output\outieee.$(OBJ) \
91                   preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ)
93 NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
94               insnsd.$(OBJ)
97 BuildAll: nasm$(SUFFIX)$(EXE) ndisasm$(SUFFIX)$(EXE)
100 # NASM
101 nasm$(SUFFIX)$(EXE): $(NASMOBJS)
102   $(LINK) $(LINKFLAGS) @&&|     #open temp response file
103     $(STARTUP) $**
104     nasm$(SUFFIX)$(EXE)
105     # default MAP file name for EXE
106     $(LIBRARIES)
107 |                                # close temp file, first column!
110 # NDISASM
111 ndisasm$(SUFFIX)$(EXE): $(NDISASMOBJS)
112   $(LINK) $(LINKFLAGS) @&&|     #open temp response file
113     $(STARTUP) $**
114     ndisasm$(SUFFIX)$(EXE)
115     # default MAP file name for EXE
116     $(LIBRARIES)
117 |                                # close temp file, first column!
119 # These source files are automagically generated from a single
120 # instruction-table file by a Perl script. They're distributed,
121 # though, so it isn't necessary to have Perl just to recompile NASM
122 # from the distribution.
124 insnsa.c: insns.dat insns.pl
125         $(PERL) $(srcdir)/insns.pl -a $(srcdir)/insns.dat
127 insnsd.c: insns.dat insns.pl
128         $(PERL) $(srcdir)/insns.pl -d $(srcdir)/insns.dat
130 insnsi.h: insns.dat insns.pl
131         $(PERL) $(srcdir)/insns.pl -i $(srcdir)/insns.dat
133 insnsn.c: insns.dat insns.pl
134         $(PERL) $(srcdir)/insns.pl -n $(srcdir)/insns.dat
136 # This source file is generated from the standard macros file
137 # `standard.mac' by another Perl script. Again, it's part of the
138 # standard distribution.
140 macros.c: macros.pl standard.mac version.mac
141         $(PERL) $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac
143 # These files contains all the standard macros that are derived from
144 # the version number.
145 version.h: version version.pl
146         $(PERL) $(srcdir)/version.pl h < $(srcdir)/version > version.h
148 version.mac: version version.pl
149         $(PERL) $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
151 # These source files are generated from regs.dat by yet another
152 # perl script.
153 regs.c: regs.dat regs.pl
154         $(PERL) $(srcdir)/regs.pl c $(srcdir)/regs.dat > regs.c
155 regflags.c: regs.dat regs.pl
156         $(PERL) $(srcdir)/regs.pl fc $(srcdir)/regs.dat > regflags.c
157 regdis.c: regs.dat regs.pl
158         $(PERL) $(srcdir)/regs.pl dc $(srcdir)/regs.dat > regdis.c
159 regvals.c: regs.dat regs.pl
160         $(PERL) $(srcdir)/regs.pl vc $(srcdir)/regs.dat > regvals.c
161 regs.h: regs.dat regs.pl
162         $(PERL) $(srcdir)/regs.pl h $(srcdir)/regs.dat > regs.h
164 clean:
165   @-del /S *.obj  2> NUL 1>&2
166   @-del /S *.il?  2> NUL 1>&2
167   @-del /S *.tds  2> NUL 1>&2
168   @-del /S *.~*  2> NUL 1>&2
169   @-del /S nasm$(SUFFIX)$(EXE)  2> NUL 1>&2
170   @-del /S ndisasm$(SUFFIX)$(EXE)  2> NUL 1>&2
172 #-- Magic hints to mkdep.pl --#
173 # @object-ending: ".$(OBJ)"
174 # @path-separator: "\"
175 #-- Everything below is generated by mkdep.pl - do not edit --#
176 assemble.$(OBJ): assemble.c preproc.h insns.h regs.h regflags.c config.h \
177  version.h nasmlib.h nasm.h regvals.c insnsi.h assemble.h
178 disasm.$(OBJ): disasm.c insns.h sync.h regdis.c regs.h config.h regs.c \
179  version.h nasm.h insnsn.c names.c insnsi.h disasm.h
180 eval.$(OBJ): eval.c labels.h eval.h regs.h config.h version.h nasmlib.h \
181  nasm.h
182 float.$(OBJ): float.c regs.h config.h version.h nasm.h
183 insnsa.$(OBJ): insnsa.c insns.h regs.h config.h version.h nasm.h insnsi.h
184 insnsd.$(OBJ): insnsd.c insns.h regs.h config.h version.h nasm.h insnsi.h
185 insnsn.$(OBJ): insnsn.c
186 labels.$(OBJ): labels.c regs.h config.h version.h nasmlib.h nasm.h
187 listing.$(OBJ): listing.c regs.h config.h version.h nasmlib.h nasm.h \
188  listing.h
189 macros.$(OBJ): macros.c
190 names.$(OBJ): names.c regs.c insnsn.c
191 nasm.$(OBJ): nasm.c labels.h preproc.h insns.h parser.h eval.h regs.h \
192  outform.h config.h version.h nasmlib.h nasm.h assemble.h insnsi.h listing.h
193 nasmlib.$(OBJ): nasmlib.c insns.h regs.h config.h regs.c version.h nasmlib.h \
194  nasm.h insnsn.c names.c insnsi.h
195 ndisasm.$(OBJ): ndisasm.c insns.h sync.h regs.h config.h version.h nasmlib.h \
196  nasm.h insnsi.h disasm.h
197 outform.$(OBJ): outform.c regs.h config.h outform.h version.h nasm.h
198 output\outaout.$(OBJ): output\outaout.c regs.h outform.h config.h version.h \
199  nasmlib.h nasm.h
200 output\outas86.$(OBJ): output\outas86.c regs.h outform.h config.h version.h \
201  nasmlib.h nasm.h
202 output\outbin.$(OBJ): output\outbin.c labels.h eval.h regs.h outform.h \
203  config.h version.h nasmlib.h nasm.h
204 output\outcoff.$(OBJ): output\outcoff.c regs.h outform.h config.h version.h \
205  nasmlib.h nasm.h
206 output\outdbg.$(OBJ): output\outdbg.c regs.h outform.h config.h version.h \
207  nasmlib.h nasm.h
208 output\outelf32.$(OBJ): output\outelf32.c regs.h outform.h config.h \
209  version.h nasmlib.h nasm.h
210 output\outelf64.$(OBJ): output\outelf64.c regs.h outform.h config.h \
211  version.h nasmlib.h nasm.h
212 output\outieee.$(OBJ): output\outieee.c regs.h outform.h config.h version.h \
213  nasmlib.h nasm.h
214 output\outmacho.$(OBJ): output\outmacho.c compiler.h regs.h outform.h \
215  config.h version.h nasmlib.h nasm.h
216 output\outobj.$(OBJ): output\outobj.c regs.h outform.h config.h version.h \
217  nasmlib.h nasm.h
218 output\outrdf.$(OBJ): output\outrdf.c regs.h outform.h config.h version.h \
219  nasmlib.h nasm.h
220 output\outrdf2.$(OBJ): output\outrdf2.c rdoff\rdoff.h regs.h outform.h \
221  config.h version.h nasmlib.h nasm.h
222 parser.$(OBJ): parser.c insns.h parser.h float.h regs.h regflags.c config.h \
223  version.h nasmlib.h nasm.h insnsi.h
224 preproc.$(OBJ): preproc.c macros.c regs.h config.h version.h nasmlib.h \
225  nasm.h
226 regdis.$(OBJ): regdis.c
227 regflags.$(OBJ): regflags.c
228 regs.$(OBJ): regs.c
229 regvals.$(OBJ): regvals.c
230 sync.$(OBJ): sync.c sync.h