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} preproc.${OBJ} listing.${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 outdbg.$(OBJ) >> NASM.LNK
56 NDISASM.LNK: makefile.lcc
57 echo ndisasm.$(OBJ) > NDISASM.LNK
58 echo disasm.$(OBJ) >> NDISASM.LNK
59 echo sync.$(OBJ) >> NDISASM.LNK
60 echo nasmlib.$(OBJ) >> NDISASM.LNK
61 echo insnsd.$(OBJ) >> NDISASM.LNK
63 nasm: $(NASM) nasm.lnk
64 $(LD) -o nasm.exe @nasm.lnk
66 ndisasm: $(NDISASM) ndisasm.lnk
67 $(LD) -o ndisasm.exe @ndisasm.lnk
69 assemble.${OBJ}: assemble.c nasm.h nasmlib.h assemble.h insns.h
70 disasm.${OBJ}: disasm.c nasm.h disasm.h sync.h insns.h names.c
71 eval.${OBJ}: eval.c eval.h nasm.h nasmlib.h
72 float.${OBJ}: float.c nasm.h
73 insnsa.${OBJ}: insnsa.c nasm.h insns.h
74 insnsd.${OBJ}: insnsd.c nasm.h insns.h
75 labels.${OBJ}: labels.c nasm.h nasmlib.h
76 listing.${OBJ}: listing.c nasm.h nasmlib.h listing.h
77 nasm.${OBJ}: nasm.c nasm.h nasmlib.h preproc.h parser.h assemble.h labels.h \
79 nasmlib.${OBJ}: nasmlib.c nasm.h nasmlib.h
80 ndisasm.${OBJ}: ndisasm.c nasm.h nasmlib.h sync.h disasm.h
81 outaout.${OBJ}: outaout.c nasm.h nasmlib.h outform.h
82 outas86.${OBJ}: outas86.c nasm.h nasmlib.h outform.h
83 outbin.${OBJ}: outbin.c nasm.h nasmlib.h outform.h
84 outcoff.${OBJ}: outcoff.c nasm.h nasmlib.h outform.h
85 outdbg.${OBJ}: outdbg.c nasm.h nasmlib.h outform.h
86 outelf.${OBJ}: outelf.c nasm.h nasmlib.h outform.h
87 outform.${OBJ}: outform.c outform.h nasm.h
88 outobj.${OBJ}: outobj.c nasm.h nasmlib.h outform.h
89 outrdf.${OBJ}: outrdf.c nasm.h nasmlib.h outform.h
90 parser.${OBJ}: parser.c nasm.h nasmlib.h parser.h float.h names.c
91 preproc.${OBJ}: preproc.c nasm.h nasmlib.h macros.c
92 sync.${OBJ}: sync.c sync.h
94 # These two source files are automagically generated from a single
95 # instruction-table file by a Perl script. They're distributed,
96 # though, so it isn't necessary to have Perl just to recompile NASM
97 # from the distribution.
99 insnsa.c insnsd.c: insns.dat insns.pl
100 perl insns.pl insns.dat
102 # This source file is generated from the standard macros file
103 # `standard.mac' by another Perl script. Again, it's part of the
104 # standard distribution.
106 macros.c: standard.mac macros.pl
107 perl macros.pl standard.mac
110 rm -f *.${OBJ} nasm.exe ndisasm.exe