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