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 outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) outelf.$(OBJ) \
48 outobj.$(OBJ) outas86.$(OBJ) outrdf.$(OBJ) outdbg.$(OBJ) \
49 preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ)
51 NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
59 all : nasmw$(EXE) ndisasmw$(EXE)
63 # We have to have a horrible kludge here to get round the 128 character
64 # limit, as usual... we'll simply use LNK-files :)
66 nasmw$(EXE): $(NASMOBJS)
67 $(LINK) $(LINKFLAGS) @<<
72 ndisasmw$(EXE): $(NDISASMOBJS)
73 $(LINK) $(LINKFLAGS) @<<
81 # modules for programs
84 disasm.$(OBJ): disasm.c nasm.h disasm.h sync.h insns.h names.c
85 assemble.$(OBJ): assemble.c nasm.h assemble.h insns.h
86 eval.$(OBJ): eval.c nasm.h nasmlib.h eval.h
87 float.$(OBJ): float.c nasm.h
88 labels.$(OBJ): labels.c nasm.h nasmlib.h
89 listing.$(OBJ): listing.c nasm.h nasmlib.h listing.h
90 nasm.$(OBJ): nasm.c nasm.h nasmlib.h parser.h assemble.h labels.h \
92 nasmlib.$(OBJ): nasmlib.c nasm.h nasmlib.h
93 ndisasm.$(OBJ): ndisasm.c nasm.h sync.h disasm.h
94 outas86.$(OBJ): outas86.c nasm.h nasmlib.h
95 outaout.$(OBJ): outaout.c nasm.h nasmlib.h
96 outbin.$(OBJ): outbin.c nasm.h nasmlib.h
97 outcoff.$(OBJ): outcoff.c nasm.h nasmlib.h
98 outdbg.$(OBJ): outdbg.c nasm.h nasmlib.h
99 outelf.$(OBJ): outelf.c nasm.h nasmlib.h
100 outobj.$(OBJ): outobj.c nasm.h nasmlib.h
101 outrdf.$(OBJ): outrdf.c nasm.h nasmlib.h
102 outform.$(OBJ): outform.c outform.h nasm.h
103 parser.$(OBJ): parser.c nasm.h nasmlib.h parser.h float.h names.c
104 preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h nasmlib.h
105 sync.$(OBJ): sync.c sync.h
106 insnsa.$(OBJ): insnsa.c nasm.h insns.h
107 insnsd.$(OBJ): insnsd.c nasm.h insns.h