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 the OpenWatcom C
11 # compiler, it generates dos 16 bit executable
12 # it has been tested with
13 # OpenWatcom wmake.exe /u 1.1-rc1 (remember about that /u option :)
15 # Tested with OpenWatcom 1.1-rc1.
16 # MAKE SURE THE "WATCOM" ENVIRONMENT VARIABLE IS SET TO THE
17 # OPENWATCOM INCLUDE DIRECTORY!
20 OUTFORMS = -DOF_ONLY -DOF_BIN -DOF_OBJ -DOF_WIN32 -DOF_AS86
23 CFLAGS = -fpi -ml -j -s -bt=dos -ohk -zp1 -os -zt32 -I$(%WATCOM)\h $(OUTFORMS)
24 # -fpi inline math + emulation
27 # -s no stack checking
28 # -bt=dos target system - dos
30 # -zp1 don't align structure members
31 # -os optimize for size
32 # -zt32 put objects > 32 bytes in separate segments
40 # object file extension
43 # Where C directories live
49 NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
50 assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
51 outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) \
52 outelf.$(OBJ) outobj.$(OBJ) outas86.$(OBJ) \
53 outrdf.$(OBJ) outdbg.$(OBJ) \
54 preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ) outrdf2.$(OBJ) \
57 NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
61 all : nasm.exe ndisasm.exe
62 rem This is dummy command for dumb make
65 $(LD) $(LDFLAGS) -fe=nasm.exe $(NASMOBJS)
67 ndisasm.exe: $(NDISASMOBJS)
68 $(LD) $(LDFLAGS) -fe=ndisasm.exe $(NDISASMOBJS)
70 # linker response files
74 for %i in ($(NASMOBJS)) do %append $@ F %i
79 for %i in ($(NDISASMOBJS)) do %append $@ F %i
87 #-- Magic hints to mkdep.pl --#
88 # @object-ending: ".$(OBJ)"
89 # @path-separator: "" # This means kill the path completely
90 #-- Everything below is generated by mkdep.pl - do not edit --#
91 assemble.$(OBJ): assemble.c preproc.h insns.h regs.h version.h nasmlib.h \
92 nasm.h regvals.c insnsi.h assemble.h
93 disasm.$(OBJ): disasm.c insns.h sync.h regdis.c regs.h regs.c version.h \
94 nasm.h insnsn.c names.c insnsi.h disasm.h
95 eval.$(OBJ): eval.c labels.h eval.h regs.h version.h nasmlib.h nasm.h
96 float.$(OBJ): float.c regs.h version.h nasm.h
97 insnsa.$(OBJ): insnsa.c insns.h regs.h version.h nasm.h insnsi.h
98 insnsd.$(OBJ): insnsd.c insns.h regs.h version.h nasm.h insnsi.h
99 insnsn.$(OBJ): insnsn.c
100 labels.$(OBJ): labels.c regs.h version.h nasmlib.h nasm.h
101 listing.$(OBJ): listing.c regs.h version.h nasmlib.h nasm.h listing.h
102 macros.$(OBJ): macros.c
103 names.$(OBJ): names.c regs.c insnsn.c
104 nasm.$(OBJ): nasm.c labels.h preproc.h insns.h parser.h eval.h regs.h \
105 outform.h version.h nasmlib.h nasm.h assemble.h insnsi.h listing.h
106 nasmlib.$(OBJ): nasmlib.c insns.h regs.h regs.c version.h nasmlib.h nasm.h \
107 insnsn.c names.c insnsi.h
108 ndisasm.$(OBJ): ndisasm.c insns.h sync.h regs.h version.h nasmlib.h nasm.h \
110 outform.$(OBJ): outform.c regs.h outform.h version.h nasm.h
111 outaout.$(OBJ): outaout.c regs.h outform.h version.h nasmlib.h nasm.h
112 outas86.$(OBJ): outas86.c regs.h outform.h version.h nasmlib.h nasm.h
113 outbin.$(OBJ): outbin.c labels.h eval.h regs.h outform.h version.h nasmlib.h \
115 outcoff.$(OBJ): outcoff.c regs.h outform.h version.h nasmlib.h nasm.h
116 outdbg.$(OBJ): outdbg.c regs.h outform.h version.h nasmlib.h nasm.h
117 outelf.$(OBJ): outelf.c regs.h outform.h version.h nasmlib.h nasm.h
118 outieee.$(OBJ): outieee.c regs.h outform.h version.h nasmlib.h nasm.h
119 outobj.$(OBJ): outobj.c regs.h outform.h version.h nasmlib.h nasm.h
120 outrdf.$(OBJ): outrdf.c regs.h outform.h version.h nasmlib.h nasm.h
121 outrdf2.$(OBJ): outrdf2.c rdoff.h regs.h outform.h version.h nasmlib.h \
123 parser.$(OBJ): parser.c insns.h parser.h float.h regs.h regflags.c version.h \
124 nasmlib.h nasm.h insnsi.h
125 preproc.$(OBJ): preproc.c macros.c regs.h version.h nasmlib.h nasm.h
126 regdis.$(OBJ): regdis.c
127 regflags.$(OBJ): regflags.c
129 regvals.$(OBJ): regvals.c
130 sync.$(OBJ): sync.c sync.h