1 # Makefile for the Netwide Assembler under 32-bit Windows(tm)
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 the 32-bit WIN32 C
9 # compiler Symantec(tm) C++ 7.5, provided you have a MAKE-utility
10 # that's compatible to SMAKE.
13 CCFLAGS = -c -a1 -mn -Nc -w2 -w7 -o+time -5
14 # -5 optimize for pentium (tm)
16 # -o-all no optimizations (to avoid problems in disasm.c)
17 # -o+time optimize for speed
18 # -o+space optimize for size
19 # -A1 byte alignment for structures
20 # -mn compile for Win32 executable
21 # -mx compile for DOS386 (DOSX) executable
22 # -Nc create COMDAT records
23 # -w2 possible unattended assignment: off
24 # -w7 for loops with empty instruction-body
27 LINKFLAGS = /noi /exet:NT /su:console
28 # /noignorecase all symbols are case-sensitive
29 # /exet:NT Exetype: NT (Win32)
30 # /exet:DOSX Exetype: DOSX (DOS32)
31 # /su:console Subsystem: Console (Console-App)
42 # modules needed for different programs
45 NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
46 assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
47 output/outbin.$(OBJ) output/outaout.$(OBJ) output/outcoff.$(OBJ) output/outelf.$(OBJ) \
48 output/outobj.$(OBJ) output/outas86.$(OBJ) output/outrdf.$(OBJ) output/outdbg.$(OBJ) \
49 output/outrdf2.$(OBJ) output/outieee.$(OBJ) \
50 preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ)
52 NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
60 all : nasmw$(EXE) ndisasmw$(EXE)
64 # We have to have a horrible kludge here to get round the 128 character
65 # limit, as usual... we'll simply use LNK-files :)
67 nasmw$(EXE): $(NASMOBJS)
68 $(LINK) $(LINKFLAGS) @<<
73 ndisasmw$(EXE): $(NDISASMOBJS)
74 $(LINK) $(LINKFLAGS) @<<
84 #-- Magic hints to mkdep.pl --#
85 # @object-ending: ".$(OBJ)"
86 # @path-separator: "/"
87 #-- Everything below is generated by mkdep.pl - do not edit --#
88 assemble.$(OBJ): assemble.c insns.h assemble.h regvals.c nasm.h regs.h \
89 insnsi.h nasmlib.h version.h
90 disasm.$(OBJ): disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
91 insnsn.c insnsi.h version.h regdis.c
92 eval.$(OBJ): eval.c nasm.h regs.h labels.h nasmlib.h version.h eval.h
93 float.$(OBJ): float.c nasm.h regs.h version.h
94 insnsa.$(OBJ): insnsa.c insns.h nasm.h regs.h insnsi.h version.h
95 insnsd.$(OBJ): insnsd.c insns.h nasm.h regs.h insnsi.h version.h
96 insnsn.$(OBJ): insnsn.c
97 labels.$(OBJ): labels.c nasm.h regs.h nasmlib.h version.h
98 listing.$(OBJ): listing.c listing.h nasm.h regs.h nasmlib.h version.h
99 macros.$(OBJ): macros.c
100 names.$(OBJ): names.c regs.c insnsn.c
101 nasm.$(OBJ): nasm.c listing.h preproc.h insns.h outform.h assemble.h \
102 parser.h nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
103 nasmlib.$(OBJ): nasmlib.c insns.h regs.c names.c nasm.h regs.h insnsn.c \
104 insnsi.h nasmlib.h version.h
105 ndisasm.$(OBJ): ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
107 outform.$(OBJ): outform.c outform.h nasm.h regs.h version.h
108 output/outaout.$(OBJ): output/outaout.c outform.h nasm.h regs.h nasmlib.h \
110 output/outas86.$(OBJ): output/outas86.c outform.h nasm.h regs.h nasmlib.h \
112 output/outbin.$(OBJ): output/outbin.c outform.h nasm.h regs.h nasmlib.h \
114 output/outcoff.$(OBJ): output/outcoff.c outform.h nasm.h regs.h nasmlib.h \
116 output/outdbg.$(OBJ): output/outdbg.c outform.h nasm.h regs.h nasmlib.h \
118 output/outelf.$(OBJ): output/outelf.c outform.h nasm.h regs.h nasmlib.h \
120 output/outieee.$(OBJ): output/outieee.c outform.h nasm.h regs.h nasmlib.h \
122 output/outobj.$(OBJ): output/outobj.c outform.h nasm.h regs.h nasmlib.h \
124 output/outrdf.$(OBJ): output/outrdf.c outform.h nasm.h regs.h nasmlib.h \
126 output/outrdf2.$(OBJ): output/outrdf2.c outform.h nasm.h regs.h nasmlib.h \
128 parser.$(OBJ): parser.c insns.h parser.h nasm.h regs.h insnsi.h regflags.c \
129 float.h nasmlib.h version.h
130 preproc.$(OBJ): preproc.c nasm.h macros.c regs.h nasmlib.h version.h
131 regdis.$(OBJ): regdis.c
132 regflags.$(OBJ): regflags.c
134 regvals.$(OBJ): regvals.c
135 sync.$(OBJ): sync.c sync.h