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 djgpp 2.xx
11 # djgpp is GNU C compiler ported by mighty DJ Delorie
12 # www.delorie.com and any simtel mirror
14 # You may need to adjust these values.
19 # You _shouldn't_ need to adjust anything below this line.
22 $(CC) -c $(CFLAGS) -o $@ $*.c
24 NASM = nasm.o nasmlib.o float.o insnsa.o assemble.o labels.o \
25 parser.o outform.o output/outbin.o output/outaout.o output/outcoff.o output/outelf.o \
26 output/outobj.o output/outas86.o output/outrdf.o output/outdbg.o preproc.o listing.o \
27 eval.o output/outrdf2.o output/outieee.o
29 NDISASM = ndisasm.o disasm.o sync.o nasmlib.o insnsd.o
31 all: nasm.exe ndisasm.exe
36 ndisasm.exe: $(NDISASM)
37 $(CC) -o $@ $(NDISASM)
39 assemble.o: assemble.c nasm.h version.h insnsi.h nasmlib.h assemble.h insns.h
40 disasm.o: disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
41 eval.o: eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
42 float.o: float.c nasm.h version.h insnsi.h
43 insnsa.o: insnsa.c nasm.h version.h insnsi.h insns.h
44 insnsd.o: insnsd.c nasm.h version.h insnsi.h insns.h
45 labels.o: labels.c nasm.h version.h insnsi.h nasmlib.h
46 listing.o: listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
47 nasm.o: nasm.c nasm.h version.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
49 nasmlib.o: nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
50 ndisasm.o: ndisasm.c nasm.h version.h insnsi.h nasmlib.h sync.h disasm.h
51 output/outaout.o: output/outaout.c nasm.h version.h insnsi.h nasmlib.h outform.h
52 output/outas86.o: output/outas86.c nasm.h version.h insnsi.h nasmlib.h outform.h
53 output/outbin.o: output/outbin.c nasm.h version.h insnsi.h nasmlib.h outform.h
54 output/outcoff.o: output/outcoff.c nasm.h version.h insnsi.h nasmlib.h outform.h
55 output/outdbg.o: output/outdbg.c nasm.h version.h insnsi.h nasmlib.h outform.h
56 output/outelf.o: output/outelf.c nasm.h version.h insnsi.h nasmlib.h outform.h
57 outform.o: outform.c outform.h nasm.h version.h insnsi.h
58 output/outobj.o: output/outobj.c nasm.h version.h insnsi.h nasmlib.h outform.h
59 output/outrdf2.o: output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h outform.h
60 output/outieee.o: output/outieee.c nasm.h version.h insnsi.h nasmlib.h outform.h
61 parser.o: parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
62 preproc.o: preproc.c nasm.h version.h insnsi.h nasmlib.h macros.c
65 # These source files are automagically generated from a single
66 # instruction-table file by a Perl script. They're distributed,
67 # though, so it isn't necessary to have Perl just to recompile NASM
68 # from the distribution.
70 insnsa.c: insns.dat insns.pl
71 perl insns.pl -a insns.dat
72 insnsd.c: insns.dat insns.pl
73 perl insns.pl -d insns.dat
74 insnsi.h: insns.dat insns.pl
75 perl insns.pl -i insns.dat
76 insnsn.c: insns.dat insns.pl
77 perl insns.pl -n insns.dat
79 # These files contains all the standard macros that are derived from
81 version.h: version version.pl
82 perl version.pl h < version > version.h
84 version.mac: version version.pl
85 perl version.pl mac < version > version.mac
87 # This source file is generated from the standard macros file
88 # `standard.mac' by another Perl script. Again, it's part of the
89 # standard distribution.
91 macros.c: macros.pl standard.mac version.mac
92 perl macros.pl standard.mac version.mac
95 rm -f *.o *.exe output/*.o