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 outelf32.$(OBJ) outelf64.$(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 regflags.c config.h \
92 version.h nasmlib.h nasm.h regvals.c insnsi.h assemble.h
93 disasm.$(OBJ): disasm.c insns.h sync.h regdis.c regs.h config.h regs.c \
94 version.h nasm.h insnsn.c names.c insnsi.h disasm.h
95 eval.$(OBJ): eval.c labels.h eval.h regs.h config.h version.h nasmlib.h \
97 float.$(OBJ): float.c regs.h config.h version.h nasm.h
98 insnsa.$(OBJ): insnsa.c insns.h regs.h config.h version.h nasm.h insnsi.h
99 insnsd.$(OBJ): insnsd.c insns.h regs.h config.h version.h nasm.h insnsi.h
100 insnsn.$(OBJ): insnsn.c
101 labels.$(OBJ): labels.c regs.h config.h version.h nasmlib.h nasm.h
102 listing.$(OBJ): listing.c regs.h config.h version.h nasmlib.h nasm.h \
104 macros.$(OBJ): macros.c
105 names.$(OBJ): names.c regs.c insnsn.c
106 nasm.$(OBJ): nasm.c labels.h preproc.h insns.h parser.h eval.h regs.h \
107 outform.h config.h version.h nasmlib.h nasm.h stdscan.h assemble.h insnsi.h \
109 nasmlib.$(OBJ): nasmlib.c insns.h regs.h config.h regs.c version.h nasmlib.h \
110 nasm.h insnsn.c names.c insnsi.h
111 ndisasm.$(OBJ): ndisasm.c insns.h sync.h regs.h config.h version.h nasmlib.h \
112 nasm.h insnsi.h disasm.h
113 outform.$(OBJ): outform.c regs.h config.h outform.h version.h nasm.h
114 outaout.$(OBJ): outaout.c regs.h outform.h config.h version.h nasmlib.h \
116 outas86.$(OBJ): outas86.c regs.h outform.h config.h version.h nasmlib.h \
118 outbin.$(OBJ): outbin.c labels.h eval.h regs.h outform.h config.h version.h \
119 nasmlib.h nasm.h stdscan.h
120 outcoff.$(OBJ): outcoff.c regs.h outform.h config.h version.h nasmlib.h \
122 outdbg.$(OBJ): outdbg.c regs.h outform.h config.h version.h nasmlib.h nasm.h
123 outelf32.$(OBJ): outelf32.c regs.h outform.h config.h version.h nasmlib.h \
125 outelf64.$(OBJ): outelf64.c regs.h outform.h config.h version.h nasmlib.h \
127 outieee.$(OBJ): outieee.c regs.h outform.h config.h version.h nasmlib.h \
129 outmacho.$(OBJ): outmacho.c compiler.h regs.h outform.h config.h version.h \
131 outobj.$(OBJ): outobj.c regs.h outform.h config.h version.h nasmlib.h nasm.h \
133 outrdf.$(OBJ): outrdf.c regs.h outform.h config.h version.h nasmlib.h nasm.h
134 outrdf2.$(OBJ): outrdf2.c rdoff.h regs.h outform.h config.h version.h \
136 parser.$(OBJ): parser.c insns.h parser.h float.h regs.h regflags.c config.h \
137 version.h nasmlib.h nasm.h stdscan.h insnsi.h
138 preproc.$(OBJ): preproc.c macros.c regs.h config.h version.h nasmlib.h \
140 regdis.$(OBJ): regdis.c
141 regflags.$(OBJ): regflags.c
143 regvals.$(OBJ): regvals.c
144 stdscan.$(OBJ): stdscan.c insns.h regs.h config.h version.h nasmlib.h nasm.h \
146 sync.$(OBJ): sync.c sync.h
147 tokhash.$(OBJ): tokhash.c insns.h regs.h config.h version.h nasm.h insnsi.h