1 # Makefile for the Netwide Assembler under 32-bit DOS(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 -mx -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:DOSX
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/outrdf2.$(OBJ) \
49 output/outieee.$(OBJ) output/outdbg.$(OBJ) \
50 preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ)
52 NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
60 all : nasm$(EXE) ndisasm$(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 nasm$(EXE): $(NASMOBJS)
68 $(LINK) $(LINKFLAGS) @<<
73 ndisasm$(EXE): $(NDISASMOBJS)
74 $(LINK) $(LINKFLAGS) @<<
80 # modules for programs
87 #-- Magic hints to mkdep.pl --#
88 # @object-ending: ".$(OBJ)"
89 # @path-separator: "/"
90 #-- Everything below is generated by mkdep.pl - do not edit --#
91 assemble.$(OBJ): assemble.c preproc.h insns.h regs.h version.h nasmlib.h \
92 nasm.h regvals.c insnsi.h assemble.h
93 disasm.$(OBJ): disasm.c insns.h sync.h regdis.c regs.h regs.c version.h \
94 nasm.h insnsn.c names.c insnsi.h disasm.h
95 eval.$(OBJ): eval.c labels.h eval.h regs.h version.h nasmlib.h nasm.h
96 float.$(OBJ): float.c regs.h version.h nasm.h
97 insnsa.$(OBJ): insnsa.c insns.h regs.h version.h nasm.h insnsi.h
98 insnsd.$(OBJ): insnsd.c insns.h regs.h version.h nasm.h insnsi.h
99 insnsn.$(OBJ): insnsn.c
100 labels.$(OBJ): labels.c regs.h version.h nasmlib.h nasm.h
101 listing.$(OBJ): listing.c regs.h version.h nasmlib.h nasm.h listing.h
102 macros.$(OBJ): macros.c
103 names.$(OBJ): names.c regs.c insnsn.c
104 nasm.$(OBJ): nasm.c labels.h preproc.h insns.h parser.h eval.h regs.h \
105 outform.h version.h nasmlib.h nasm.h assemble.h insnsi.h listing.h
106 nasmlib.$(OBJ): nasmlib.c insns.h regs.h regs.c version.h nasmlib.h nasm.h \
107 insnsn.c names.c insnsi.h
108 ndisasm.$(OBJ): ndisasm.c insns.h sync.h regs.h version.h nasmlib.h nasm.h \
110 outform.$(OBJ): outform.c regs.h outform.h version.h nasm.h
111 output/outaout.$(OBJ): output/outaout.c regs.h outform.h version.h nasmlib.h \
113 output/outas86.$(OBJ): output/outas86.c regs.h outform.h version.h nasmlib.h \
115 output/outbin.$(OBJ): output/outbin.c labels.h eval.h regs.h outform.h \
116 version.h nasmlib.h nasm.h
117 output/outcoff.$(OBJ): output/outcoff.c regs.h outform.h version.h nasmlib.h \
119 output/outdbg.$(OBJ): output/outdbg.c regs.h outform.h version.h nasmlib.h \
121 output/outelf.$(OBJ): output/outelf.c regs.h outform.h version.h nasmlib.h \
123 output/outieee.$(OBJ): output/outieee.c regs.h outform.h version.h nasmlib.h \
125 output/outobj.$(OBJ): output/outobj.c regs.h outform.h version.h nasmlib.h \
127 output/outrdf.$(OBJ): output/outrdf.c regs.h outform.h version.h nasmlib.h \
129 output/outrdf2.$(OBJ): output/outrdf2.c rdoff/rdoff.h regs.h outform.h \
130 version.h nasmlib.h nasm.h
131 parser.$(OBJ): parser.c insns.h parser.h float.h regs.h regflags.c version.h \
132 nasmlib.h nasm.h insnsi.h
133 preproc.$(OBJ): preproc.c macros.c regs.h version.h nasmlib.h nasm.h
134 regdis.$(OBJ): regdis.c
135 regflags.$(OBJ): regflags.c
137 regvals.$(OBJ): regvals.c
138 sync.$(OBJ): sync.c sync.h