3 include ../MakePaths.dir
5 # Don't install in the usual place. Currently it's only
6 # needed for building boot0, boot1, boot1f, and nullboot1.
7 #MANINSTALLDIR = $(DSTROOT)/usr/share/man/man1
8 #INSTALLDIR = $(DSTROOT)/usr/local/bin
9 MANINSTALLDIR = $(SYMROOT)
10 INSTALLDIR = $(SYMROOT)
13 CFLAGS = $(OPTIM) -g -Wmost -Werror -fno-builtin
16 ifneq "" "$(wildcard /bin/mkdirs)"
19 MKDIRS = /bin/mkdir -p
22 VPATH = $(OBJROOT):$(SYMROOT)
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 CFILES = nasm.c nasmlib.c float.c insnsa.c assemble.c labels.c \
32 parser.c outform.c outbin.c outaout.c outcoff.c outelf.c \
33 outobj.c outas86.c outrdf.c outdbg.c preproc.c listing.c \
34 eval.c ndisasm.c disasm.c sync.c insnsd.c
36 HFILES = nasm.h nasmlib.h preproc.h parser.h assemble.h labels.h \
37 outform.h listing.h eval.h insns.h sync.h disasm.h float.h
41 ALLSRC = $(CFILES) $(HFILES) $(OTHERFILES)
43 DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
45 all: $(DIRS_NEEDED) nasm ndisasm installman
48 $(CC) -o $(INSTALLDIR)/nasm $(NASM)
51 $(CC) -o $(INSTALLDIR)/ndisasm $(NDISASM)
53 installman: nasm.1 ndisasm.1
54 cp nasm.1 $(MANINSTALLDIR)
55 cp ndisasm.1 $(MANINSTALLDIR)
57 # These two source files are automagically generated from a single
58 # instruction-table file by a Perl script. They're distributed,
59 # though, so it isn't necessary to have Perl just to recompile NASM
60 # from the distribution.
62 insnsa.c insnsd.c: insns.dat insns.pl
63 perl insns.pl insns.dat
65 # This source file is generated from the standard macros file
66 # `standard.mac' by another Perl script. Again, it's part of the
67 # standard distribution.
69 macros.c: standard.mac macros.pl
70 perl macros.pl standard.mac
73 rm -rf $(SYMROOT)/nasm $(SYMROOT)/ndisasm\
74 $(SYMROOT)/nasm.1 $(SYMROOT)/ndisasm.1
76 $(INSTALLDIR) $(MANINSTALLDIR):
79 installhdrs:: $(INSTALLDIR) $(MANINSTALLDIR)
81 include ../MakeInc.dir
84 -include $(OBJROOT)/Makedep