1 # Makefile for the Netwide Assembler under 32 bit NT console
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 with the latest
9 # version of Borland C++Builder and has been tested with
10 # Borland C++ 5.3 (Borland C++Builder 3.0) and Borland C++ 5.4
11 # (Borland C++Builder 4.0) in combination with
12 # Borland MAKE versions 5.1 and 5.2
14 # MAKEFILE is maintained by Stefan.Hoffmeister@Econos.de
18 # If "BINDIR=C:\...." has not been defined on the command line
19 # assume that the binary files are in the same directory as the
21 !message ****************************************************
25 !message Path to tools set to $(BINDIR)
28 !message Assuming path to tools to be $(BINDIR)
30 !message You can change this assumption by specifying
31 !message -DBINDIR=C:\my_path
32 !message as a command line paramter for MAKE
34 !message ****************************************************
38 CCFLAGS=-tWC -c -O2 -A
39 # /-tWC: Windows console mode application
40 # /c: Compile, do not link
41 # /O2: Optimize for speed
42 # /A: ANSI compatible code only
44 LINK=$(BINDIR)\ilink32
45 LINKFLAGS=/V4.0 /x /c /ap /L$(BINDIR)\..\LIB # /L -> default LIB directory
46 # /V4.0: marked as Win95 / NT application in PE header
48 # /c: case sensitive link
49 # /ap: link for 32-bit console application
50 # /L...: path to .lib directory
53 # default libraries for Win32 console applications
54 LIBRARIES=cw32.lib import32.lib
55 # default startup code for Win32 console applications
58 # default extension for our EXE
60 # default extension for OBJ files
64 SUFFIX= w# # by default, this makefile produces nasmw.exe and ndisasmw.exe
67 # Builds C files to OBJ
72 NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
73 assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
74 outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) outelf.$(OBJ) \
75 outobj.$(OBJ) outas86.$(OBJ) outrdf.$(OBJ) outdbg.$(OBJ) \
76 outrdf2.$(OBJ) zoutieee.$(OBJ) \
77 preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ)
79 NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
83 BuildAll: nasm$(SUFFIX)$(EXE) ndisasm$(SUFFIX)$(EXE)
87 nasm$(SUFFIX)$(EXE): $(NASMOBJS)
88 $(LINK) $(LINKFLAGS) @&&| #open temp response file
91 # default MAP file name for EXE
93 | # close temp file, first column!
97 ndisasm$(SUFFIX)$(EXE): $(NDISASMOBJS)
98 $(LINK) $(LINKFLAGS) @&&| #open temp response file
100 ndisasm$(SUFFIX)$(EXE)
101 # default MAP file name for EXE
103 | # close temp file, first column!
106 # OBJs with dependencies
107 assemble.$(OBJ): assemble.c nasm.h insnsi.h assemble.h insns.h
108 disasm.$(OBJ): disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
109 eval.$(OBJ): eval.c nasm.h insnsi.h nasmlib.h eval.h
110 float.$(OBJ): float.c nasm.h insnsi.h
111 insnsa.$(OBJ): insnsa.c nasm.h insnsi.h insns.h
112 insnsd.$(OBJ): insnsd.c nasm.h insnsi.h insns.h
113 labels.$(OBJ): labels.c nasm.h insnsi.h nasmlib.h
114 listing.$(OBJ): listing.c nasm.h insnsi.h nasmlib.h listing.h
115 nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
117 nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
118 ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
119 outas86.$(OBJ): outas86.c nasm.h insnsi.h nasmlib.h
120 outaout.$(OBJ): outaout.c nasm.h insnsi.h nasmlib.h
121 outbin.$(OBJ): outbin.c nasm.h insnsi.h nasmlib.h
122 outcoff.$(OBJ): outcoff.c nasm.h insnsi.h nasmlib.h
123 outdbg.$(OBJ): outdbg.c nasm.h insnsi.h nasmlib.h
124 outelf.$(OBJ): outelf.c nasm.h insnsi.h nasmlib.h
125 outobj.$(OBJ): outobj.c nasm.h insnsi.h nasmlib.h
126 outrdf.$(OBJ): outrdf.c nasm.h insnsi.h nasmlib.h
127 outrdf2.$(OBJ): outrdf2.c nasm.h insnsi.h nasmlib.h
128 zoutieee.$(OBJ): zoutieee.c nasm.h insnsi.h nasmlib.h
129 outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
130 parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
131 preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
132 sync.$(OBJ): sync.c sync.h
136 del nasm$(SUFFIX)$(EXE)
137 del ndisasm$(SUFFIX)$(EXE)