fixed multiple %ROTATE bugs (numbers 560567 and 560930) and changed
[nasm.git] / Mkfiles / Makefile.vc
blobb6317a56ea841df517e694250955976971ff6319
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 insns.h assemble.h regvals.c nasm.h regs.h \
104  insnsi.h nasmlib.h version.h
105 disasm.$(OBJ): disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
106  insnsn.c insnsi.h version.h regdis.c
107 eval.$(OBJ): eval.c nasm.h regs.h labels.h insnsi.h nasmlib.h version.h \
108  eval.h
109 float.$(OBJ): float.c nasm.h regs.h insnsi.h version.h
110 insnsa.$(OBJ): insnsa.c insns.h nasm.h regs.h insnsi.h version.h
111 insnsd.$(OBJ): insnsd.c insns.h nasm.h regs.h insnsi.h version.h
112 insnsn.$(OBJ): insnsn.c
113 labels.$(OBJ): labels.c nasm.h regs.h insnsi.h nasmlib.h version.h
114 listing.$(OBJ): listing.c listing.h nasm.h regs.h insnsi.h nasmlib.h \
115  version.h
116 macros.$(OBJ): macros.c
117 names.$(OBJ): names.c regs.c insnsn.c
118 nasm.$(OBJ): nasm.c listing.h preproc.h insns.h outform.h assemble.h \
119  parser.h nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
120 nasmlib.$(OBJ): nasmlib.c regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
121  nasmlib.h version.h
122 ndisasm.$(OBJ): ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
123  nasmlib.h version.h
124 outform.$(OBJ): outform.c outform.h nasm.h regs.h insnsi.h version.h
125 output/outaout.$(OBJ): output/outaout.c outform.h nasm.h regs.h insnsi.h \
126  nasmlib.h version.h
127 output/outas86.$(OBJ): output/outas86.c outform.h nasm.h regs.h insnsi.h \
128  nasmlib.h version.h
129 output/outbin.$(OBJ): output/outbin.c outform.h nasm.h regs.h insnsi.h \
130  nasmlib.h version.h
131 output/outcoff.$(OBJ): output/outcoff.c outform.h nasm.h regs.h insnsi.h \
132  nasmlib.h version.h
133 output/outdbg.$(OBJ): output/outdbg.c outform.h nasm.h regs.h insnsi.h \
134  nasmlib.h version.h
135 output/outelf.$(OBJ): output/outelf.c outform.h nasm.h regs.h insnsi.h \
136  nasmlib.h version.h
137 output/outieee.$(OBJ): output/outieee.c outform.h nasm.h regs.h insnsi.h \
138  nasmlib.h version.h
139 output/outobj.$(OBJ): output/outobj.c outform.h nasm.h regs.h insnsi.h \
140  nasmlib.h version.h
141 output/outrdf.$(OBJ): output/outrdf.c outform.h nasm.h regs.h insnsi.h \
142  nasmlib.h version.h
143 output/outrdf2.$(OBJ): output/outrdf2.c outform.h nasm.h regs.h insnsi.h \
144  nasmlib.h version.h
145 parser.$(OBJ): parser.c parser.h nasm.h regs.h insnsi.h regflags.c float.h \
146  nasmlib.h version.h
147 preproc.$(OBJ): preproc.c nasm.h macros.c regs.h insnsi.h nasmlib.h \
148  version.h
149 regdis.$(OBJ): regdis.c
150 regflags.$(OBJ): regflags.c
151 regs.$(OBJ): regs.c
152 regvals.$(OBJ): regvals.c
153 sync.$(OBJ): sync.c sync.h