]> git.saurik.com Git - apple/boot.git/blame - i386/nasm/Makefile
boot-80.1.tar.gz
[apple/boot.git] / i386 / nasm / Makefile
CommitLineData
14c7c974
A
1
2DIR = nasm
3include ../MakePaths.dir
4
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
9MANINSTALLDIR = $(SYMROOT)
10INSTALLDIR = $(SYMROOT)
11
12OPTIM = -O2
13CFLAGS = $(OPTIM) -g -Wall -traditional-cpp
14DEFINES=
15INC = -I.
16ifneq "" "$(wildcard /bin/mkdirs)"
17 MKDIRS = /bin/mkdirs
18else
19 MKDIRS = /bin/mkdir -p
20endif
21
22VPATH = $(OBJROOT):$(SYMROOT)
23
24NASM = 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 \
27 eval.o
28
29NDISASM = ndisasm.o disasm.o sync.o nasmlib.o insnsd.o
30
31CFILES = 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
35
36HFILES = 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
38
39OTHERFILES = Makefile
40
41ALLSRC = $(CFILES) $(HFILES) $(OTHERFILES)
42
43DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
44
45all: $(DIRS_NEEDED) nasm ndisasm installman
46
47nasm: $(NASM)
48 $(CC) -o $(INSTALLDIR)/nasm $(NASM)
49
50ndisasm: $(NDISASM)
51 $(CC) -o $(INSTALLDIR)/ndisasm $(NDISASM)
52
53installman: nasm.1 ndisasm.1
54 cp nasm.1 $(MANINSTALLDIR)
55 cp ndisasm.1 $(MANINSTALLDIR)
56
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.
61
62insnsa.c insnsd.c: insns.dat insns.pl
63 perl insns.pl insns.dat
64
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.
68
69macros.c: standard.mac macros.pl
70 perl macros.pl standard.mac
71
72clean::
73 rm -rf $(SYMROOT)/nasm $(SYMROOT)/ndisasm
74
75$(INSTALLDIR) $(MANINSTALLDIR):
76 $(MKDIRS) $@
77
78installhdrs:: $(INSTALLDIR) $(MANINSTALLDIR)
79
80include ../MakeInc.dir
81
82# dependencies
83-include $(OBJROOT)/Makedep