2 # target: windows nt/95
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 # makefile designed for lcc-win32
11 # lcc-win32 is lcc (c compiler coded by guys from princeton uni)
12 # ported to win32 by jacob navia
13 # available at http://www.remcomp.com/lcc-win32/
16 CC = lcc.exe $(CFLAGS)
17 LFLAGS = -subsystem console -s
18 LD = lcclnk.exe $(LFLAGS)
24 NASM = nasm.${OBJ} nasmlib.${OBJ} float.${OBJ} insnsa.${OBJ} assemble.${OBJ} labels.${OBJ} \
25 parser.${OBJ} outform.${OBJ} outbin.${OBJ} outaout.${OBJ} outcoff.${OBJ} outelf.${OBJ} \
26 outobj.${OBJ} outas86.${OBJ} outrdf.${OBJ} outdbg.${OBJ} outrdf2.${OBJ} \
27 zoutieee.${OBJ} preproc.${OBJ} listing.${OBJ} eval.${OBJ}
29 NDISASM = ndisasm.${OBJ} disasm.${OBJ} sync.${OBJ} nasmlib.${OBJ} insnsd.${OBJ}
33 # linker response files
34 # that may take long, too much spawning command.com :)
35 NASM.LNK: makefile.lcc
36 echo nasm.$(OBJ) > NASM.LNK
37 echo nasmlib.$(OBJ) >> NASM.LNK
38 echo eval.$(OBJ) >> NASM.LNK
39 echo float.$(OBJ) >> NASM.LNK
40 echo insnsa.$(OBJ) >> NASM.LNK
41 echo assemble.$(OBJ) >> NASM.LNK
42 echo labels.$(OBJ) >> NASM.LNK
43 echo listing.$(OBJ) >> NASM.LNK
44 echo parser.$(OBJ) >> NASM.LNK
45 echo preproc.$(OBJ) >> NASM.LNK
46 echo outform.$(OBJ) >> NASM.LNK
47 echo outbin.$(OBJ) >> NASM.LNK
48 echo outaout.$(OBJ) >> NASM.LNK
49 echo outcoff.$(OBJ) >> NASM.LNK
50 echo outelf.$(OBJ) >> NASM.LNK
51 echo outobj.$(OBJ) >> NASM.LNK
52 echo outas86.$(OBJ) >> NASM.LNK
53 echo outrdf.$(OBJ) >> NASM.LNK
54 echo outrdf2.$(OBJ) >> NASM.LNK
55 echo zoutieee.$(OBJ) >> NASM.LNK
56 echo outdbg.$(OBJ) >> NASM.LNK
58 NDISASM.LNK: makefile.lcc
59 echo ndisasm.$(OBJ) > NDISASM.LNK
60 echo disasm.$(OBJ) >> NDISASM.LNK
61 echo sync.$(OBJ) >> NDISASM.LNK
62 echo nasmlib.$(OBJ) >> NDISASM.LNK
63 echo insnsd.$(OBJ) >> NDISASM.LNK
65 nasm: $(NASM) nasm.lnk
66 $(LD) -o nasm.exe @nasm.lnk
68 ndisasm: $(NDISASM) ndisasm.lnk
69 $(LD) -o ndisasm.exe @ndisasm.lnk
71 assemble.${OBJ}: assemble.c nasm.h insnsi.h nasmlib.h assemble.h insns.h
72 disasm.${OBJ}: disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
73 eval.${OBJ}: eval.c eval.h nasm.h insnsi.h nasmlib.h
74 float.${OBJ}: float.c nasm.h insnsi.h
75 insnsa.${OBJ}: insnsa.c nasm.h insnsi.h insns.h
76 insnsd.${OBJ}: insnsd.c nasm.h insnsi.h insns.h
77 labels.${OBJ}: labels.c nasm.h insnsi.h nasmlib.h
78 listing.${OBJ}: listing.c nasm.h insnsi.h nasmlib.h listing.h
79 nasm.${OBJ}: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
81 nasmlib.${OBJ}: nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
82 ndisasm.${OBJ}: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
83 outaout.${OBJ}: outaout.c nasm.h insnsi.h nasmlib.h outform.h
84 outas86.${OBJ}: outas86.c nasm.h insnsi.h nasmlib.h outform.h
85 outbin.${OBJ}: outbin.c nasm.h insnsi.h nasmlib.h outform.h
86 outcoff.${OBJ}: outcoff.c nasm.h insnsi.h nasmlib.h outform.h
87 outdbg.${OBJ}: outdbg.c nasm.h insnsi.h nasmlib.h outform.h
88 outelf.${OBJ}: outelf.c nasm.h insnsi.h nasmlib.h outform.h
89 outform.${OBJ}: outform.c outform.h nasm.h insnsi.h
90 outobj.${OBJ}: outobj.c nasm.h insnsi.h nasmlib.h outform.h
91 outrdf.${OBJ}: outrdf.c nasm.h insnsi.h nasmlib.h outform.h
92 outrdf2.${OBJ}: outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
93 zoutieee.${OBJ}: zoutieee.c nasm.h insnsi.h nasmlib.h outform.h
94 parser.${OBJ}: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
95 preproc.${OBJ}: preproc.c nasm.h insnsi.h nasmlib.h macros.c
96 sync.${OBJ}: sync.c sync.h
98 # These source files are automagically generated from a single
99 # instruction-table file by a Perl script. They're distributed,
100 # though, so it isn't necessary to have Perl just to recompile NASM
101 # from the distribution.
103 insnsa.c insnsd.c insnsi.h insnsn.c: insns.dat insns.pl
104 perl insns.pl insns.dat
106 # This source file is generated from the standard macros file
107 # `standard.mac' by another Perl script. Again, it's part of the
108 # standard distribution.
110 macros.c: standard.mac macros.pl
111 perl macros.pl standard.mac
114 rm -f *.${OBJ} nasm.exe ndisasm.exe