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 insns.h assemble.h regvals.c nasm.h regs.h \
92 insnsi.h nasmlib.h version.h
93 disasm.$(OBJ): disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
94 insnsn.c insnsi.h version.h regdis.c
95 eval.$(OBJ): eval.c nasm.h regs.h labels.h nasmlib.h version.h eval.h
96 float.$(OBJ): float.c nasm.h regs.h version.h
97 insnsa.$(OBJ): insnsa.c insns.h nasm.h regs.h insnsi.h version.h
98 insnsd.$(OBJ): insnsd.c insns.h nasm.h regs.h insnsi.h version.h
99 insnsn.$(OBJ): insnsn.c
100 labels.$(OBJ): labels.c nasm.h regs.h nasmlib.h version.h
101 listing.$(OBJ): listing.c listing.h nasm.h regs.h nasmlib.h version.h
102 macros.$(OBJ): macros.c
103 names.$(OBJ): names.c regs.c insnsn.c
104 nasm.$(OBJ): nasm.c listing.h preproc.h insns.h outform.h assemble.h \
105 parser.h nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
106 nasmlib.$(OBJ): nasmlib.c insns.h regs.c names.c nasm.h regs.h insnsn.c \
107 insnsi.h nasmlib.h version.h
108 ndisasm.$(OBJ): ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
110 outform.$(OBJ): outform.c outform.h nasm.h regs.h version.h
111 outaout.$(OBJ): outaout.c outform.h nasm.h regs.h nasmlib.h \
113 outas86.$(OBJ): outas86.c outform.h nasm.h regs.h nasmlib.h \
115 outbin.$(OBJ): outbin.c outform.h nasm.h regs.h nasmlib.h \
117 outcoff.$(OBJ): outcoff.c outform.h nasm.h regs.h nasmlib.h \
119 outdbg.$(OBJ): outdbg.c outform.h nasm.h regs.h nasmlib.h \
121 outelf.$(OBJ): outelf.c outform.h nasm.h regs.h nasmlib.h \
123 outieee.$(OBJ): outieee.c outform.h nasm.h regs.h nasmlib.h \
125 outobj.$(OBJ): outobj.c outform.h nasm.h regs.h nasmlib.h \
127 outrdf.$(OBJ): outrdf.c outform.h nasm.h regs.h nasmlib.h \
129 outrdf2.$(OBJ): outrdf2.c outform.h nasm.h regs.h nasmlib.h \
131 parser.$(OBJ): parser.c insns.h parser.h nasm.h regs.h insnsi.h regflags.c \
132 float.h nasmlib.h version.h
133 preproc.$(OBJ): preproc.c nasm.h macros.c regs.h nasmlib.h version.h
134 regdis.$(OBJ): regdis.c
135 regflags.$(OBJ): regflags.c
137 regvals.$(OBJ): regvals.c
138 sync.$(OBJ): sync.c sync.h