NASM 0.95
[nasm.git] / Makefile.sc
blobe8386bfd2e65dfa74f677bdefc23222826c8f02f
1 # Makefile for the Netwide Assembler under 32-bit Windows(tm)
5 # The Netwide Assembler is copyright (C) 1996 Simon Tatham and
7 # Julian Hall. All rights reserved. The software is
9 # redistributable under the licence given in the file "Licence"
11 # distributed in the NASM archive.
15 # This Makefile is designed to build NASM using the 32-bit WIN32 C
17 # compiler Symantec(tm) C++ 7.5, provided you have a MAKE-utility
19 # that's compatible to SMAKE.
23 CC = sc
25 CCFLAGS = -c -a1 -mn -Nc -w2 -w7 -o+time -5
27 # -5            optimize for pentium (tm)
29 # -c            compile only
31 # -o-all        no optimizations (to avoid problems in disasm.c)
33 # -o+time       optimize for speed
35 # -o+space      optimize for size
37 # -A1           byte alignment for structures
39 # -mn           compile for Win32 executable
41 # -Nc           create COMDAT records
43 # -w2           possible unattended assignment: off
45 # -w7           for loops with empty instruction-body
49 LINK = link
51 LINKFLAGS = /noi /exet:NT /su:console
53 # /noignorecase all symbols are case-sensitive
55 # /exet:NT      Exetype: NT (Win32)
57 # /su:console   Subsystem: Console (Console-App)
61 LIBRARIES =
63 EXE = .exe
65 OBJ = obj
69 .c.$(OBJ):
71         $(CC) $(CCFLAGS) $*.c
79 # modules needed for different programs
85 NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
87            assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
89            outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) outelf.$(OBJ) \
91            outobj.$(OBJ) outas86.$(OBJ) outrdf.$(OBJ) outdbg.$(OBJ) \
93            preproc.$(OBJ) listing.$(OBJ)
97 NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
99               insnsd.$(OBJ)
107 # programs to create
113 all : nasm$(EXE) ndisasm$(EXE)
121 # We have to have a horrible kludge here to get round the 128 character
123 # limit, as usual... we'll simply use LNK-files :)
127 nasm$(EXE): $(NASMOBJS)
129         $(LINK) $(LINKFLAGS) @<<
131 $(NASMOBJS)
133 nasm.exe;
139 ndisasm$(EXE): $(NDISASMOBJS)
141         $(LINK) $(LINKFLAGS) @<<
143 $(NDISASMOBJS)
145 ndisasm.exe;
157 # modules for programs
163 disasm.$(OBJ): disasm.c nasm.h disasm.h sync.h insns.h names.c
165 assemble.$(OBJ): assemble.c nasm.h assemble.h insns.h
167 float.$(OBJ): float.c nasm.h
169 labels.$(OBJ): labels.c nasm.h nasmlib.h
171 listing.$(OBJ): listing.c nasm.h nasmlib.h listing.h
173 nasm.$(OBJ): nasm.c nasm.h nasmlib.h parser.h assemble.h labels.h \
175         listing.h outform.h
177 nasmlib.$(OBJ): nasmlib.c nasm.h nasmlib.h
179 ndisasm.$(OBJ): ndisasm.c nasm.h sync.h disasm.h
181 outas86.$(OBJ): outas86.c nasm.h nasmlib.h
183 outaout.$(OBJ): outaout.c nasm.h nasmlib.h
185 outbin.$(OBJ): outbin.c nasm.h nasmlib.h
187 outcoff.$(OBJ): outcoff.c nasm.h nasmlib.h
189 outdbg.$(OBJ): outdbg.c nasm.h nasmlib.h
191 outelf.$(OBJ): outelf.c nasm.h nasmlib.h
193 outobj.$(OBJ): outobj.c nasm.h nasmlib.h
195 outrdf.$(OBJ): outrdf.c nasm.h nasmlib.h
197 outform.$(OBJ): outform.c outform.h nasm.h
199 parser.$(OBJ): parser.c nasm.h nasmlib.h parser.h float.h names.c
201 preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h nasmlib.h
203 sync.$(OBJ): sync.c sync.h
205 insnsa.$(OBJ): insnsa.c nasm.h insns.h
207 insnsd.$(OBJ): insnsd.c nasm.h insns.h
215 clean :
217         del *.obj
219         del nasm$(EXE)
221         del ndisasm$(EXE)