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 = outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) outelf.$(OBJ)
29 NASMOBJS4 = outobj.$(OBJ) outas86.$(OBJ) outdbg.$(OBJ) outrdf.$(OBJ)
31 NASMOBJS = $(NASMOBJS1) $(NASMOBJS2) $(NASMOBJS3) $(NASMOBJS4)
33 NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
36 all : nasm$(EXE) ndisasm$(EXE)
38 # We have to have a horrible kludge here to get round the 128 character
40 nasm$(EXE): $(NASMOBJS)
41 # $(LINK) /Fenasm.exe a*.obj f*.obj insnsa.obj l*.obj na*.obj o*.obj p*.obj
42 echo c0l.obj $(NASMOBJS1) +> nasmobjs.tmp
43 echo $(NASMOBJS2) +>> nasmobjs.tmp
44 echo $(NASMOBJS3) +>> nasmobjs.tmp
45 echo $(NASMOBJS4),nasm.exe,,cl.lib, >> nasmobjs.tmp
46 $(LINK) /Tde @nasmobjs.tmp
48 ndisasm$(EXE): $(NDISASMOBJS)
49 # $(LINK) /Fendisasm.exe $(NDISASMOBJS)
50 $(LINK) /Tde $(NDISASMOBJS),ndisasm.exe,,cl.lib,
52 assemble.$(OBJ): assemble.c nasm.h assemble.h insns.h
53 disasm.$(OBJ): disasm.c nasm.h disasm.h sync.h insns.h names.c
54 float.$(OBJ): float.c nasm.h
55 insnsa.$(OBJ): insnsa.c nasm.h insns.h
56 insnsd.$(OBJ): insnsd.c nasm.h insns.h
57 labels.$(OBJ): labels.c nasm.h nasmlib.h
58 nasm.$(OBJ): nasm.c nasm.h nasmlib.h parser.h assemble.h labels.h outform.h
59 nasmlib.$(OBJ): nasmlib.c nasm.h nasmlib.h
60 ndisasm.$(OBJ): ndisasm.c nasm.h sync.h disasm.h
61 outas86.$(OBJ): outas86.c nasm.h nasmlib.h
62 outaout.$(OBJ): outaout.c nasm.h nasmlib.h
63 outbin.$(OBJ): outbin.c nasm.h nasmlib.h
64 outcoff.$(OBJ): outcoff.c nasm.h nasmlib.h
65 outdbg.$(OBJ): outdbg.c nasm.h nasmlib.h
66 outelf.$(OBJ): outelf.c nasm.h nasmlib.h
67 outobj.$(OBJ): outobj.c nasm.h nasmlib.h
68 outrdf.$(OBJ): outrdf.c nasm.h nasmlib.h
69 outform.$(OBJ): outform.c outform.h nasm.h
70 parser.$(OBJ): parser.c nasm.h nasmlib.h parser.h float.h names.c
71 sync.$(OBJ): sync.c sync.h