NASM 0.98.30
[platform/upstream/nasm.git] / Mkfiles / Makefile.lcc
1 # host: windows nt/95
2 # target: windows nt/95
3 # Makefile for the Netwide Assembler
4 #
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.
9
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/
14
15 CFLAGS = -c -O -g2
16 CC = lcc.exe $(CFLAGS)
17 LFLAGS = -subsystem console -s
18 LD = lcclnk.exe $(LFLAGS)
19 OBJ = obj
20
21 .c.${OBJ}:
22         $(CC) -o $@ $*.c
23
24 NASM = nasm.${OBJ} nasmlib.${OBJ} float.${OBJ} insnsa.${OBJ} assemble.${OBJ} labels.${OBJ} \
25        parser.${OBJ} outform.${OBJ} output/outbin.${OBJ} output/outaout.${OBJ} output/outcoff.${OBJ} output/outelf.${OBJ} \
26        output/outobj.${OBJ} output/outas86.${OBJ} output/outrdf.${OBJ} output/outdbg.${OBJ} output/outrdf2.${OBJ} \
27        output/outieee.${OBJ} preproc.${OBJ} listing.${OBJ} eval.${OBJ}
28
29 NDISASM = ndisasm.${OBJ} disasm.${OBJ} sync.${OBJ} nasmlib.${OBJ} insnsd.${OBJ}
30
31 all: nasm ndisasm
32
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 output/outbin.$(OBJ) >> NASM.LNK
48         echo output/outaout.$(OBJ) >> NASM.LNK
49         echo output/outcoff.$(OBJ) >> NASM.LNK
50         echo output/outelf.$(OBJ) >> NASM.LNK
51         echo output/outobj.$(OBJ) >> NASM.LNK
52         echo output/outas86.$(OBJ) >> NASM.LNK
53         echo output/outrdf.$(OBJ) >> NASM.LNK
54         echo output/outrdf2.$(OBJ) >> NASM.LNK
55         echo output/outieee.$(OBJ) >> NASM.LNK
56         echo output/outdbg.$(OBJ) >> NASM.LNK
57
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
64
65 nasm: $(NASM) nasm.lnk
66         $(LD) -o nasm.exe @nasm.lnk
67
68 ndisasm: $(NDISASM) ndisasm.lnk
69         $(LD) -o ndisasm.exe @ndisasm.lnk
70
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 \
80  outform.h listing.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 output/outaout.${OBJ}: output/outaout.c nasm.h insnsi.h nasmlib.h outform.h
84 output/outas86.${OBJ}: output/outas86.c nasm.h insnsi.h nasmlib.h outform.h
85 output/outbin.${OBJ}: output/outbin.c nasm.h insnsi.h nasmlib.h outform.h
86 output/outcoff.${OBJ}: output/outcoff.c nasm.h insnsi.h nasmlib.h outform.h
87 output/outdbg.${OBJ}: output/outdbg.c nasm.h insnsi.h nasmlib.h outform.h
88 output/outelf.${OBJ}: output/outelf.c nasm.h insnsi.h nasmlib.h outform.h
89 outform.${OBJ}: outform.c outform.h nasm.h insnsi.h
90 output/outobj.${OBJ}: output/outobj.c nasm.h insnsi.h nasmlib.h outform.h
91 output/outrdf2.${OBJ}: output/outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
92 output/outieee.${OBJ}: output/outieee.c nasm.h insnsi.h nasmlib.h outform.h
93 parser.${OBJ}: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
94 preproc.${OBJ}: preproc.c nasm.h insnsi.h nasmlib.h macros.c
95 sync.${OBJ}: sync.c sync.h
96
97 # These source files are automagically generated from a single
98 # instruction-table file by a Perl script. They're distributed,
99 # though, so it isn't necessary to have Perl just to recompile NASM
100 # from the distribution.
101
102 insnsa.c insnsd.c insnsi.h insnsn.c: insns.dat insns.pl
103         perl insns.pl insns.dat
104
105 # This source file is generated from the standard macros file
106 # `standard.mac' by another Perl script. Again, it's part of the
107 # standard distribution.
108
109 macros.c: standard.mac macros.pl
110         perl macros.pl standard.mac
111
112 clean:
113         rm -f *.${OBJ} nasm.exe ndisasm.exe