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) $*.c
24 NASM = nasm.o nasmlib.o float.o insnsa.o assemble.o labels.o \
25 parser.o outform.o outbin.o outaout.o outcoff.o outelf.o \
26 outobj.o outas86.o outrdf.o outdbg.o preproc.o listing.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 nasmlib.h assemble.h insns.h
40 disasm.o: disasm.c nasm.h disasm.h sync.h insns.h names.c
41 eval.o: eval.c eval.h nasm.h nasmlib.h
42 float.o: float.c nasm.h
43 insnsa.o: insnsa.c nasm.h insns.h
44 insnsd.o: insnsd.c nasm.h insns.h
45 labels.o: labels.c nasm.h nasmlib.h
46 listing.o: listing.c nasm.h nasmlib.h listing.h
47 nasm.o: nasm.c nasm.h nasmlib.h preproc.h parser.h assemble.h labels.h \
49 nasmlib.o: nasmlib.c nasm.h nasmlib.h
50 ndisasm.o: ndisasm.c nasm.h nasmlib.h sync.h disasm.h
51 outaout.o: outaout.c nasm.h nasmlib.h outform.h
52 outas86.o: outas86.c nasm.h nasmlib.h outform.h
53 outbin.o: outbin.c nasm.h nasmlib.h outform.h
54 outcoff.o: outcoff.c nasm.h nasmlib.h outform.h
55 outdbg.o: outdbg.c nasm.h nasmlib.h outform.h
56 outelf.o: outelf.c nasm.h nasmlib.h outform.h
57 outform.o: outform.c outform.h nasm.h
58 outobj.o: outobj.c nasm.h nasmlib.h outform.h
59 outrdf.o: outrdf.c nasm.h nasmlib.h outform.h
60 parser.o: parser.c nasm.h nasmlib.h parser.h float.h names.c
61 preproc.o: preproc.c nasm.h nasmlib.h macros.c
64 # These two source files are automagically generated from a single
65 # instruction-table file by a Perl script. They're distributed,
66 # though, so it isn't necessary to have Perl just to recompile NASM
67 # from the distribution.
69 insnsa.c insnsd.c: insns.dat insns.pl
70 perl insns.pl insns.dat
72 # This source file is generated from the standard macros file
73 # `standard.mac' by another Perl script. Again, it's part of the
74 # standard distribution.
76 macros.c: standard.mac macros.pl
77 perl macros.pl standard.mac
80 rm -f *.o nasm ndisasm