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 outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) outelf.$(OBJ) \
48 outobj.$(OBJ) outas86.$(OBJ) outrdf.$(OBJ) outrdf2.$(OBJ) \
49 zoutieee.$(OBJ) 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) @<<
82 # modules for programs
85 disasm.$(OBJ): disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
86 assemble.$(OBJ): assemble.c nasm.h insnsi.h assemble.h insns.h
87 eval.$(OBJ): eval.c nasm.h insnsi.h nasmlib.h eval.h
88 float.$(OBJ): float.c nasm.h insnsi.h
89 labels.$(OBJ): labels.c nasm.h insnsi.h nasmlib.h
90 listing.$(OBJ): listing.c nasm.h insnsi.h nasmlib.h listing.h
91 nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
93 nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
94 ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
95 outas86.$(OBJ): outas86.c nasm.h insnsi.h nasmlib.h
96 outaout.$(OBJ): outaout.c nasm.h insnsi.h nasmlib.h
97 outbin.$(OBJ): outbin.c nasm.h insnsi.h nasmlib.h
98 outcoff.$(OBJ): outcoff.c nasm.h insnsi.h nasmlib.h
99 outdbg.$(OBJ): outdbg.c nasm.h insnsi.h nasmlib.h
100 outelf.$(OBJ): outelf.c nasm.h insnsi.h nasmlib.h
101 outobj.$(OBJ): outobj.c nasm.h insnsi.h nasmlib.h
102 outrdf.$(OBJ): outrdf.c nasm.h insnsi.h nasmlib.h
103 outrdf2.$(OBJ): outrdf2.c nasm.h insnsi.h nasmlib.h
104 zoutieee.$(OBJ): zoutieee.c nasm.h insnsi.h nasmlib.h
105 outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
106 parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
107 preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
108 sync.$(OBJ): sync.c sync.h
109 insnsa.$(OBJ): insnsa.c nasm.h insnsi.h insns.h
110 insnsd.$(OBJ): insnsd.c nasm.h insnsi.h insns.h