1 # Makefile for the Netwide Assembler under 16-bit DOS
3 # The Netwide Assembler is copyright (C) 1996 Simon Tatham and
4 # Julian Hall. All rights reserved. The software is
5 # redistributable under the licence given in the file "Licence"
6 # distributed in the NASM archive.
8 # This Makefile is designed to build NASM using a 16-bit DOS C
9 # compiler such as Borland C, and has been tested with Borland C 2.3
16 CCFLAGS = -c -O -ml -A
17 LINK = tlink /c /Lc:\bc\lib
26 NASMOBJS1 = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ)
27 NASMOBJS2 = assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ)
28 NASMOBJS3 = output/outbin.$(OBJ) output/outaout.$(OBJ) output/outcoff.$(OBJ) output/outelf32.$(OBJ) output/outelf64.$(OBJ)
29 NASMOBJS4 = output/outobj.$(OBJ) output/outas86.$(OBJ) output/outdbg.$(OBJ) output/outrdf.$(OBJ)
30 NASMOBJS5 = output/outrdf2.$(OBJ) output/outieee.$(OBJ)
31 NASMOBJS6 = preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ)
33 NASMOBJS = $(NASMOBJS1) $(NASMOBJS2) $(NASMOBJS3) $(NASMOBJS4) $(NASMOBJS5) \
36 NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
39 all : nasm$(EXE) ndisasm$(EXE)
41 # We have to have a horrible kludge here to get round the 128 character
43 nasm$(EXE): $(NASMOBJS)
44 # $(LINK) /Fenasm.exe a*.obj f*.obj insnsa.obj l*.obj na*.obj o*.obj p*.obj
45 echo c0l.obj $(NASMOBJS1) +> nasmobjs.tmp
46 echo $(NASMOBJS2) +>> nasmobjs.tmp
47 echo $(NASMOBJS3) +>> nasmobjs.tmp
48 echo $(NASMOBJS4) +>> nasmobjs.tmp
49 echo $(NASMOBJS5),nasm.exe,,cl.lib, >> nasmobjs.tmp
50 $(LINK) /Tde @nasmobjs.tmp
52 ndisasm$(EXE): $(NDISASMOBJS)
53 # $(LINK) /Fendisasm.exe $(NDISASMOBJS)
54 $(LINK) /Tde $(NDISASMOBJS),ndisasm.exe,,cl.lib,
61 #-- Magic hints to mkdep.pl --#
62 # @object-ending: ".$(OBJ)"
63 # @path-separator: "/" # Is this really right? -hpa
64 #-- Everything below is generated by mkdep.pl - do not edit --#
65 assemble.$(OBJ): assemble.c preproc.h insns.h regs.h regflags.c config.h \
66 version.h nasmlib.h nasm.h regvals.c insnsi.h assemble.h
67 disasm.$(OBJ): disasm.c insns.h sync.h regdis.c regs.h config.h regs.c \
68 version.h nasm.h insnsn.c names.c insnsi.h disasm.h
69 eval.$(OBJ): eval.c labels.h eval.h regs.h config.h version.h nasmlib.h \
71 float.$(OBJ): float.c regs.h config.h version.h nasm.h
72 insnsa.$(OBJ): insnsa.c insns.h regs.h config.h version.h nasm.h insnsi.h
73 insnsd.$(OBJ): insnsd.c insns.h regs.h config.h version.h nasm.h insnsi.h
74 insnsn.$(OBJ): insnsn.c
75 labels.$(OBJ): labels.c regs.h config.h version.h nasmlib.h nasm.h
76 listing.$(OBJ): listing.c regs.h config.h version.h nasmlib.h nasm.h \
78 macros.$(OBJ): macros.c
79 names.$(OBJ): names.c regs.c insnsn.c
80 nasm.$(OBJ): nasm.c labels.h preproc.h insns.h parser.h eval.h regs.h \
81 outform.h config.h version.h nasmlib.h nasm.h stdscan.h assemble.h insnsi.h \
83 nasmlib.$(OBJ): nasmlib.c insns.h regs.h config.h regs.c version.h nasmlib.h \
84 nasm.h insnsn.c names.c insnsi.h
85 ndisasm.$(OBJ): ndisasm.c insns.h sync.h regs.h config.h version.h nasmlib.h \
86 nasm.h insnsi.h disasm.h
87 outform.$(OBJ): outform.c regs.h config.h outform.h version.h nasm.h
88 output/outaout.$(OBJ): output/outaout.c regs.h outform.h config.h version.h \
89 nasmlib.h nasm.h stdscan.h
90 output/outas86.$(OBJ): output/outas86.c regs.h outform.h config.h version.h \
92 output/outbin.$(OBJ): output/outbin.c labels.h eval.h regs.h outform.h \
93 config.h version.h nasmlib.h nasm.h stdscan.h
94 output/outcoff.$(OBJ): output/outcoff.c regs.h outform.h config.h version.h \
96 output/outdbg.$(OBJ): output/outdbg.c regs.h outform.h config.h version.h \
98 output/outelf32.$(OBJ): output/outelf32.c regs.h outform.h config.h \
99 version.h nasmlib.h nasm.h stdscan.h
100 output/outelf64.$(OBJ): output/outelf64.c regs.h outform.h config.h \
101 version.h nasmlib.h nasm.h stdscan.h
102 output/outieee.$(OBJ): output/outieee.c regs.h outform.h config.h version.h \
104 output/outmacho.$(OBJ): output/outmacho.c compiler.h regs.h outform.h \
105 config.h version.h nasmlib.h nasm.h
106 output/outobj.$(OBJ): output/outobj.c regs.h outform.h config.h version.h \
107 nasmlib.h nasm.h stdscan.h
108 output/outrdf.$(OBJ): output/outrdf.c regs.h outform.h config.h version.h \
110 output/outrdf2.$(OBJ): output/outrdf2.c rdoff/rdoff.h regs.h outform.h \
111 config.h version.h nasmlib.h nasm.h
112 parser.$(OBJ): parser.c insns.h parser.h float.h regs.h regflags.c config.h \
113 version.h nasmlib.h nasm.h stdscan.h insnsi.h
114 preproc.$(OBJ): preproc.c macros.c regs.h config.h version.h nasmlib.h \
116 regdis.$(OBJ): regdis.c
117 regflags.$(OBJ): regflags.c
119 regvals.$(OBJ): regvals.c
120 stdscan.$(OBJ): stdscan.c insns.h regs.h config.h version.h nasmlib.h nasm.h \
122 sync.$(OBJ): sync.c sync.h
123 tokhash.$(OBJ): tokhash.c insns.h regs.h config.h version.h nasm.h insnsi.h