1 # host: watcom c (dos, windows, os/2)
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 dos version of Watcom C 32 bit
11 # compiler, it generates dos 32 bit 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=dos target system - dos
26 # -oilrt mega cool optimization :)
28 CC = wcc386.exe $(CFLAGS)
32 # target system - dos4gw
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) \
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 :)
62 echo N nasm.exe > NASM.LNK
63 echo F nasm.$(OBJ) >> NASM.LNK
64 echo F nasmlib.$(OBJ) >> NASM.LNK
65 echo F float.$(OBJ) >> NASM.LNK
66 echo F insnsa.$(OBJ) >> NASM.LNK
67 echo F assemble.$(OBJ) >> NASM.LNK
68 echo F labels.$(OBJ) >> NASM.LNK
69 echo F parser.$(OBJ) >> NASM.LNK
70 echo F preproc.$(OBJ) >> NASM.LNK
71 echo F outform.$(OBJ) >> NASM.LNK
72 echo F outbin.$(OBJ) >> NASM.LNK
73 echo F outaout.$(OBJ) >> NASM.LNK
74 echo F outcoff.$(OBJ) >> NASM.LNK
75 echo F outelf.$(OBJ) >> NASM.LNK
76 echo F outobj.$(OBJ) >> NASM.LNK
77 echo F outas86.$(OBJ) >> NASM.LNK
78 echo F outrdf.$(OBJ) >> NASM.LNK
79 echo F outdbg.$(OBJ) >> NASM.LNK
81 NDISASM.LNK: makefile.wc
82 echo N ndisasm.exe > NDISASM.LNK
83 echo F ndisasm.$(OBJ) >> NDISASM.LNK
84 echo F disasm.$(OBJ) >> NDISASM.LNK
85 echo F sync.$(OBJ) >> NDISASM.LNK
86 echo F nasmlib.$(OBJ) >> NDISASM.LNK
87 echo F insnsd.$(OBJ) >> NDISASM.LNK
89 assemble.$(OBJ): assemble.c nasm.h assemble.h insns.h
90 disasm.$(OBJ): disasm.c nasm.h disasm.h sync.h insns.h names.c
91 float.$(OBJ): float.c nasm.h
92 insnsa.$(OBJ): insnsa.c nasm.h insns.h
93 insnsd.$(OBJ): insnsd.c nasm.h insns.h
94 labels.$(OBJ): labels.c nasm.h nasmlib.h
95 nasm.$(OBJ): nasm.c nasm.h nasmlib.h parser.h assemble.h labels.h outform.h
96 nasmlib.$(OBJ): nasmlib.c nasm.h nasmlib.h
97 ndisasm.$(OBJ): ndisasm.c nasm.h sync.h disasm.h
98 outas86.$(OBJ): outas86.c nasm.h nasmlib.h
99 outaout.$(OBJ): outaout.c nasm.h nasmlib.h
100 outbin.$(OBJ): outbin.c nasm.h nasmlib.h
101 outcoff.$(OBJ): outcoff.c nasm.h nasmlib.h
102 outelf.$(OBJ): outelf.c nasm.h nasmlib.h
103 outobj.$(OBJ): outobj.c nasm.h nasmlib.h
104 outform.$(OBJ): outform.c outform.h nasm.h
105 parser.$(OBJ): parser.c nasm.h nasmlib.h parser.h float.h names.c
106 preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h nasmlib.h
107 sync.$(OBJ): sync.c sync.h