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.
18 SUFFIX = w# # by default, this makefile produces nasmw.exe and ndisasmw.exe
23 NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
24 assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
25 outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) outelf.$(OBJ) \
26 outobj.$(OBJ) outas86.$(OBJ) outrdf.$(OBJ) outdbg.$(OBJ) \
27 preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ) outrdf2.$(OBJ) \
30 NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
33 all : nasm$(SUFFIX)$(EXE) ndisasm$(SUFFIX)$(EXE)
35 # We have to have a horrible kludge here to get round the 128 character
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 assemble.$(OBJ): assemble.c nasm.h insnsi.h assemble.h insns.h
45 disasm.$(OBJ): disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
46 eval.$(OBJ): eval.c nasm.h insnsi.h nasmlib.h eval.h
47 float.$(OBJ): float.c nasm.h insnsi.h
48 labels.$(OBJ): labels.c nasm.h insnsi.h nasmlib.h
49 listing.$(OBJ): listing.c nasm.h insnsi.h nasmlib.h listing.h
50 nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
52 nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
53 ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
54 outas86.$(OBJ): outas86.c nasm.h insnsi.h nasmlib.h
55 outaout.$(OBJ): outaout.c nasm.h insnsi.h nasmlib.h
56 outbin.$(OBJ): outbin.c nasm.h insnsi.h nasmlib.h
57 outcoff.$(OBJ): outcoff.c nasm.h insnsi.h nasmlib.h
58 outdbg.$(OBJ): outdbg.c nasm.h insnsi.h nasmlib.h
59 outelf.$(OBJ): outelf.c nasm.h insnsi.h nasmlib.h
60 outobj.$(OBJ): outobj.c nasm.h insnsi.h nasmlib.h
61 outrdf.$(OBJ): outrdf.c nasm.h insnsi.h nasmlib.h
62 outrdf2.$(OBJ): outrdf2.c nasm.h insnsi.h nasmlib.h
63 zoutieee.$(OBJ): zoutieee.c nasm.h insnsi.h nasmlib.h
64 outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
65 parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
66 preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
67 sync.$(OBJ): sync.c sync.h
69 # Another grotty hack: QC is less likely to run out of memory than
70 # CL proper; and we don't need any optimisation in these modules
71 # since they're just data.
72 insnsa.$(OBJ): insnsa.c nasm.h insnsi.h insns.h
74 insnsd.$(OBJ): insnsd.c nasm.h insnsi.h insns.h
79 del nasm$(SUFFIX)$(EXE)
80 del ndisasm$(SUFFIX)$(EXE)