update version number to 0.99.01
[nasm/autotest.git] / Mkfiles / Makefile.vc
blobae3f9473a5b4b5954a49afc26bfe638491db7994
1 # Makefile for the Netwide Assembler under Win32
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 as a Win32 command-
9 # line executable. It's been tested with Visual C++ 1.10.
11 CC = cl /c /Ox /GF /I.
12 QCL = cl /c
13 LINK = cl
14 LINKFLAGS =
15 LIBRARIES =
16 EXE = .exe#
17 OBJ = obj#
18 SUFFIX = w#  # by default, this makefile produces nasmw.exe and ndisasmw.exe
20 .c.$(OBJ):
21         $(CC) $*.c
23 NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
24            assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
25            output/outbin.$(OBJ) output/outaout.$(OBJ) output/outcoff.$(OBJ) output/outelf.$(OBJ) \
26            output/outobj.$(OBJ) output/outas86.$(OBJ) output/outrdf.$(OBJ) output/outdbg.$(OBJ) \
27            preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ) output/outrdf2.$(OBJ) \
28            output/outieee.$(OBJ)
30 NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
31               insnsd.$(OBJ)
33 all : nasm$(SUFFIX)$(EXE) ndisasm$(SUFFIX)$(EXE)
35 # We have to have a horrible kludge here to get round the 128 character
36 # limit, as usual...
37 LINKOBJS = a*.obj e*.obj f*.obj insnsa.obj l*.obj na*.obj o*.obj p*.obj z*.obj
38 nasm$(SUFFIX)$(EXE): $(NASMOBJS)
39         cl /Fenasm$(SUFFIX).exe $(LINKOBJS)
41 ndisasm$(SUFFIX)$(EXE): $(NDISASMOBJS)
42         cl /Fendisasm$(SUFFIX).exe $(NDISASMOBJS)
44 # Another grotty hack: QC is less likely to run out of memory than
45 # CL proper; and we don't need any optimisation in these modules
46 # since they're just data.
47 insnsa.$(OBJ): insnsa.c nasm.h version.h insnsi.h insns.h
48         $(QCL) insnsa.c
49 insnsd.$(OBJ): insnsd.c nasm.h version.h insnsi.h insns.h
50         $(QCL) insnsd.c
52 # These source files are automagically generated from a single
53 # instruction-table file by a Perl script. They're distributed,
54 # though, so it isn't necessary to have Perl just to recompile NASM
55 # from the distribution.
57 insnsa.c: insns.dat insns.pl
58         perl insns.pl -a insns.dat
59 insnsd.c: insns.dat insns.pl
60         perl insns.pl -d insns.dat
61 insnsi.h: insns.dat insns.pl
62         perl insns.pl -i insns.dat
63 insnsn.c: insns.dat insns.pl
64         perl insns.pl -n insns.dat
66 # These files contains all the standard macros that are derived from
67 # the version number.
68 version.h: version version.pl
69         perl version.pl h < version > version.h
71 version.mac: version version.pl
72         perl version.pl mac < version > version.mac
74 # This source file is generated from the standard macros file
75 # `standard.mac' by another Perl script. Again, it's part of the
76 # standard distribution.
78 macros.c: macros.pl standard.mac version.mac
79         perl macros.pl standard.mac version.mac
81 # These source files are generated from regs.dat by yet another
82 # perl script.
83 regs.c: regs.dat regs.pl
84         perl regs.pl c regs.dat > regs.c
85 regflags.c: regs.dat regs.pl
86         perl regs.pl fc regs.dat > regflags.c
87 regdis.c: regs.dat regs.pl
88         perl regs.pl dc regs.dat > regdis.c
89 regvals.c: regs.dat regs.pl
90         perl regs.pl vc regs.dat > regvals.c
91 regs.h: regs.dat regs.pl
92         perl regs.pl h regs.dat > regs.h
94 clean :
95         del *.obj
96         del nasm$(SUFFIX)$(EXE)
97         del ndisasm$(SUFFIX)$(EXE)
99 #-- Magic hints to mkdep.pl --#
100 # @object-ending: ".$(OBJ)"
101 # @path-separator: "/"
102 #-- Everything below is generated by mkdep.pl - do not edit --#
103 assemble.$(OBJ): assemble.c preproc.h insns.h regs.h version.h nasmlib.h \
104  nasm.h regvals.c insnsi.h assemble.h
105 disasm.$(OBJ): disasm.c insns.h sync.h regdis.c regs.h regs.c version.h \
106  nasm.h insnsn.c names.c insnsi.h disasm.h
107 eval.$(OBJ): eval.c labels.h eval.h regs.h version.h nasmlib.h nasm.h
108 float.$(OBJ): float.c regs.h version.h nasm.h
109 insnsa.$(OBJ): insnsa.c insns.h regs.h version.h nasm.h insnsi.h
110 insnsd.$(OBJ): insnsd.c insns.h regs.h version.h nasm.h insnsi.h
111 insnsn.$(OBJ): insnsn.c
112 labels.$(OBJ): labels.c regs.h version.h nasmlib.h nasm.h
113 listing.$(OBJ): listing.c regs.h version.h nasmlib.h nasm.h listing.h
114 macros.$(OBJ): macros.c
115 names.$(OBJ): names.c regs.c insnsn.c
116 nasm.$(OBJ): nasm.c labels.h preproc.h insns.h parser.h eval.h regs.h \
117  outform.h version.h nasmlib.h nasm.h assemble.h insnsi.h listing.h
118 nasmlib.$(OBJ): nasmlib.c insns.h regs.h regs.c version.h nasmlib.h nasm.h \
119  insnsn.c names.c insnsi.h
120 ndisasm.$(OBJ): ndisasm.c insns.h sync.h regs.h version.h nasmlib.h nasm.h \
121  insnsi.h disasm.h
122 outform.$(OBJ): outform.c regs.h outform.h version.h nasm.h
123 output/outaout.$(OBJ): output/outaout.c regs.h outform.h version.h nasmlib.h \
124  nasm.h
125 output/outas86.$(OBJ): output/outas86.c regs.h outform.h version.h nasmlib.h \
126  nasm.h
127 output/outbin.$(OBJ): output/outbin.c labels.h eval.h regs.h outform.h \
128  version.h nasmlib.h nasm.h
129 output/outcoff.$(OBJ): output/outcoff.c regs.h outform.h version.h nasmlib.h \
130  nasm.h
131 output/outdbg.$(OBJ): output/outdbg.c regs.h outform.h version.h nasmlib.h \
132  nasm.h
133 output/outelf.$(OBJ): output/outelf.c regs.h outform.h version.h nasmlib.h \
134  nasm.h
135 output/outieee.$(OBJ): output/outieee.c regs.h outform.h version.h nasmlib.h \
136  nasm.h
137 output/outobj.$(OBJ): output/outobj.c regs.h outform.h version.h nasmlib.h \
138  nasm.h
139 output/outrdf.$(OBJ): output/outrdf.c regs.h outform.h version.h nasmlib.h \
140  nasm.h
141 output/outrdf2.$(OBJ): output/outrdf2.c rdoff/rdoff.h regs.h outform.h \
142  version.h nasmlib.h nasm.h
143 parser.$(OBJ): parser.c insns.h parser.h float.h regs.h regflags.c version.h \
144  nasmlib.h nasm.h insnsi.h
145 preproc.$(OBJ): preproc.c macros.c regs.h version.h nasmlib.h nasm.h
146 regdis.$(OBJ): regdis.c
147 regflags.$(OBJ): regflags.c
148 regs.$(OBJ): regs.c
149 regvals.$(OBJ): regvals.c
150 sync.$(OBJ): sync.c sync.h