1 # host: watcom c (dos, windows, os/2)
2 # target: windows nt character mode executable
3 # Makefile for the Netwide Assembler
5 # The Netwide Assembler is copyright (C) 1996 Simon Tatham and
6 # Julian Hall. All rights reserved. The software is
7 # redistributable under the licence given in the file "Licence"
8 # distributed in the NASM archive.
10 # this makefile is designed for use with of Watcom C 32 bit compiler
11 # it generates win32 console (character mode) executable
12 # it has been tested with
13 # borland make.exe 4.0
14 # microsoft nmake.exe 1.3
15 # watcom wmake.exe /u 3.2 (remember about that /u option :)
17 # all this should compile under watcom c 9.5, 10.0, 10.5 and 10.6
18 # i dont know about 11.0 because i didnt yet see it
20 CFLAGS = -fpi -mf -3r -s -bt=dos -oilrt
21 # -fpi inline math + emulation
22 # -mf flat model (isnt it by default :)
23 # -3r 386 register calling (does everyone have pentium nowadays ?)
24 # -s no stack checking
25 # -bt=nt target system - windows nt
26 # -oilrt mega cool optimization :)
28 CC = wcc386.exe $(CFLAGS)
32 # target system nt - character mode
33 LD = wlink.exe $(LFLAGS)
41 NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
42 assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
43 outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) outelf.$(OBJ) \
44 outobj.$(OBJ) outas86.$(OBJ) outrdf.$(OBJ) outdbg.$(OBJ) \
45 preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ)
47 NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
50 all : nasm.exe ndisasm.exe
51 echo This is dummy command for dumb make
53 nasm.exe: $(NASMOBJS) NASM.LNK
56 ndisasm.exe: $(NDISASMOBJS) NDISASM.LNK
59 # linker response files
60 # that may take long, too much spawning command.com :)
61 NASM.LNK: makefile.wcw
62 echo N nasm.exe > NASM.LNK
63 echo F nasm.$(OBJ) >> NASM.LNK
64 echo F nasmlib.$(OBJ) >> NASM.LNK
65 echo F eval.$(OBJ) >> NASM.LNK
66 echo F float.$(OBJ) >> NASM.LNK
67 echo F insnsa.$(OBJ) >> NASM.LNK
68 echo F assemble.$(OBJ) >> NASM.LNK
69 echo F labels.$(OBJ) >> NASM.LNK
70 echo F listing.$(OBJ) >> NASM.LNK
71 echo F parser.$(OBJ) >> NASM.LNK
72 echo F preproc.$(OBJ) >> NASM.LNK
73 echo F outform.$(OBJ) >> NASM.LNK
74 echo F outbin.$(OBJ) >> NASM.LNK
75 echo F outaout.$(OBJ) >> NASM.LNK
76 echo F outcoff.$(OBJ) >> NASM.LNK
77 echo F outelf.$(OBJ) >> NASM.LNK
78 echo F outobj.$(OBJ) >> NASM.LNK
79 echo F outas86.$(OBJ) >> NASM.LNK
80 echo F outrdf.$(OBJ) >> NASM.LNK
81 echo F outdbg.$(OBJ) >> NASM.LNK
83 NDISASM.LNK: makefile.wcw
84 echo N ndisasm.exe > NDISASM.LNK
85 echo F ndisasm.$(OBJ) >> NDISASM.LNK
86 echo F disasm.$(OBJ) >> NDISASM.LNK
87 echo F sync.$(OBJ) >> NDISASM.LNK
88 echo F nasmlib.$(OBJ) >> NDISASM.LNK
89 echo F insnsd.$(OBJ) >> NDISASM.LNK
91 assemble.$(OBJ): assemble.c nasm.h assemble.h insns.h
92 disasm.$(OBJ): disasm.c nasm.h disasm.h sync.h insns.h names.c
93 eval.$(OBJ): eval.c nasm.h nasmlib.h eval.h
94 float.$(OBJ): float.c nasm.h
95 insnsa.$(OBJ): insnsa.c nasm.h insns.h
96 insnsd.$(OBJ): insnsd.c nasm.h insns.h
97 labels.$(OBJ): labels.c nasm.h nasmlib.h
98 listing.$(OBJ): listing.c nasm.h nasmlib.h listing.h
99 nasm.$(OBJ): nasm.c nasm.h nasmlib.h parser.h assemble.h labels.h \
101 nasmlib.$(OBJ): nasmlib.c nasm.h nasmlib.h
102 ndisasm.$(OBJ): ndisasm.c nasm.h sync.h disasm.h
103 outas86.$(OBJ): outas86.c nasm.h nasmlib.h
104 outaout.$(OBJ): outaout.c nasm.h nasmlib.h
105 outbin.$(OBJ): outbin.c nasm.h nasmlib.h
106 outcoff.$(OBJ): outcoff.c nasm.h nasmlib.h
107 outelf.$(OBJ): outelf.c nasm.h nasmlib.h
108 outobj.$(OBJ): outobj.c nasm.h nasmlib.h
109 outform.$(OBJ): outform.c outform.h nasm.h
110 parser.$(OBJ): parser.c nasm.h nasmlib.h parser.h float.h names.c
111 preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h nasmlib.h
112 sync.$(OBJ): sync.c sync.h