1 # $NetBSD: Makefile,v 1.2 2009/09/03 08:24:06 skrll Exp $
10 # If the platform does not support shared libraries, we need to supply
11 # *something* for BFD-using programs to link against. Also provide an
12 # empty libinstall target so that libbfd.a does not get installed.
15 libinstall
: # do nothing
20 BFD_MACHINE_ARCH?
= ${MACHINE_ARCH}
22 .if exists
(${.CURDIR
}/arch
/${BFD_MACHINE_ARCH}/defs.mk
)
23 .
include "${.CURDIR}/arch/${BFD_MACHINE_ARCH}/defs.mk"
25 DIST
= ${NETBSDSRCDIR}/external
/gpl3
/binutils
/dist
30 LIBDPLIBS
+= z
${.CURDIR
}/..
/..
/..
/..
/..
/lib
/libz
32 GCPPFLAGS
= ${G_archdefs} ${G_DEFS} ${G_INCLUDES} ${G_TDEFAULTS}
33 CPPFLAGS
+= -I
${.CURDIR
}/arch
/${BFD_MACHINE_ARCH} -I
${DIST}/include -I. \
34 -I
${DIST}/bfd
${GCPPFLAGS
:M-D
*} ${GCPPFLAGS
:M-I
*:N-I.
*} \
35 -DDEBUGDIR
=\"${DEBUGDIR}\"
37 GSRCS
= ${G_libbfd_la_OBJECTS
:libbfd.lo
=lib_bfd.lo
} \
38 ${G_libbfd_la_DEPENDENCIES
:M
*.lo
}
41 DPSRCS
+= elf32-target.h elf64-target.h targmatch.h \
42 elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
43 CLEANFILES
+= elf32-target.h elf64-target.h targmatch.h \
44 elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
47 INFOFLAGS
= -I
${DIST}/bfd
/doc
49 .PATH
: ${DIST}/bfd
${DIST}/bfd
/doc
52 .
include <bsd.
info.mk
>
54 ${OBJS} ${SOBJS}: elf32-target.h elf64-target.h
55 targets.o targets.so
: targmatch.h Makefile
57 .
include <bsd.prog.mk
> # do nothing
60 targmatch.h
: config.bfd targmatch.sed
62 ${TOOL_SED} -f
${.ALLSRC
:M
*.sed
} ${.ALLSRC
:M
*.bfd
} >$@
64 elf32-target.h
: elfxx-target.h
66 ${TOOL_SED} -e s
/NN
/32/g
< $> > $@
68 elf64-target.h
: elfxx-target.h
70 ${TOOL_SED} -e s
/NN
/64/g
< $> > $@
72 elf32-ia64.c
: elfxx-ia64.c
74 ${TOOL_SED} -e s
/NN
/32/g
< $> > $@
76 elf64-ia64.c
: elfxx-ia64.c
78 ${TOOL_SED} -e s
/NN
/64/g
< $> > $@
82 ${TOOL_SED} -e s
/XX
/pe
/g
< $> > $@
86 ${TOOL_SED} -e s
/XX
/pep
/g
< $> > $@
88 pex64igen.c
: peXXigen.c
90 ${TOOL_SED} -e s
/XX
/pex64
/g
< $> > $@