NASM 0.96
[nasm.git] / Makefile.scw
blob6953b464327be0c2bdd73f3ac86752fa25826a3d
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.
12 CC = sc
13 CCFLAGS = -c -a1 -mn -Nc -w2 -w7 -o+time -5
14 # -5            optimize for pentium (tm)
15 # -c            compile only
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
26 LINK = link
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)
33 LIBRARIES =
34 EXE = .exe
35 OBJ = obj
37 .c.$(OBJ):
38         $(CC) $(CCFLAGS) $*.c
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) \
52               insnsd.$(OBJ)
56 # programs to create
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) @<<
68 $(NASMOBJS)
69 nasmw.exe;
72 ndisasmw$(EXE): $(NDISASMOBJS)
73         $(LINK) $(LINKFLAGS) @<<
74 $(NDISASMOBJS)
75 ndisasmw.exe;
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 \
91         listing.h outform.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
111 clean :
112         del *.obj
113         del nasmw$(EXE)
114         del ndisasmw$(EXE)