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/outelf.$(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 version.h nasmlib.h \
66 nasm.h regvals.c insnsi.h assemble.h
67 disasm.$(OBJ): disasm.c insns.h sync.h regdis.c regs.h regs.c version.h \
68 nasm.h insnsn.c names.c insnsi.h disasm.h
69 eval.$(OBJ): eval.c labels.h eval.h regs.h version.h nasmlib.h nasm.h
70 float.$(OBJ): float.c regs.h version.h nasm.h
71 insnsa.$(OBJ): insnsa.c insns.h regs.h version.h nasm.h insnsi.h
72 insnsd.$(OBJ): insnsd.c insns.h regs.h version.h nasm.h insnsi.h
73 insnsn.$(OBJ): insnsn.c
74 labels.$(OBJ): labels.c regs.h version.h nasmlib.h nasm.h
75 listing.$(OBJ): listing.c regs.h version.h nasmlib.h nasm.h listing.h
76 macros.$(OBJ): macros.c
77 names.$(OBJ): names.c regs.c insnsn.c
78 nasm.$(OBJ): nasm.c labels.h preproc.h insns.h parser.h eval.h regs.h \
79 outform.h version.h nasmlib.h nasm.h assemble.h insnsi.h listing.h
80 nasmlib.$(OBJ): nasmlib.c insns.h regs.h regs.c version.h nasmlib.h nasm.h \
81 insnsn.c names.c insnsi.h
82 ndisasm.$(OBJ): ndisasm.c insns.h sync.h regs.h version.h nasmlib.h nasm.h \
84 outform.$(OBJ): outform.c regs.h outform.h version.h nasm.h
85 output/outaout.$(OBJ): output/outaout.c regs.h outform.h version.h nasmlib.h \
87 output/outas86.$(OBJ): output/outas86.c regs.h outform.h version.h nasmlib.h \
89 output/outbin.$(OBJ): output/outbin.c labels.h eval.h regs.h outform.h \
90 version.h nasmlib.h nasm.h
91 output/outcoff.$(OBJ): output/outcoff.c regs.h outform.h version.h nasmlib.h \
93 output/outdbg.$(OBJ): output/outdbg.c regs.h outform.h version.h nasmlib.h \
95 output/outelf.$(OBJ): output/outelf.c regs.h outform.h version.h nasmlib.h \
97 output/outieee.$(OBJ): output/outieee.c regs.h outform.h version.h nasmlib.h \
99 output/outobj.$(OBJ): output/outobj.c regs.h outform.h version.h nasmlib.h \
101 output/outrdf.$(OBJ): output/outrdf.c regs.h outform.h version.h nasmlib.h \
103 output/outrdf2.$(OBJ): output/outrdf2.c rdoff/rdoff.h regs.h outform.h \
104 version.h nasmlib.h nasm.h
105 parser.$(OBJ): parser.c insns.h parser.h float.h regs.h regflags.c version.h \
106 nasmlib.h nasm.h insnsi.h
107 preproc.$(OBJ): preproc.c macros.c regs.h version.h nasmlib.h nasm.h
108 regdis.$(OBJ): regdis.c
109 regflags.$(OBJ): regflags.c
111 regvals.$(OBJ): regvals.c
112 sync.$(OBJ): sync.c sync.h