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