2006-02-03 19:29:34 +03:00
|
|
|
# $NetBSD: Makefile,v 1.41 2006/02/03 16:29:34 christos Exp $
|
1999-02-09 18:57:53 +03:00
|
|
|
|
2001-12-12 04:48:43 +03:00
|
|
|
NOLINKLIB= # defined
|
|
|
|
NOLINT= # defined
|
|
|
|
NOMAN= # defined
|
|
|
|
NOPROFILE= # defined
|
1999-02-09 18:57:53 +03:00
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2003-04-10 02:33:26 +04:00
|
|
|
# If the platform does not support shared libraries, we need to supply
|
2003-06-26 06:49:31 +04:00
|
|
|
# *something* for BFD-using programs to link against. Also provide an
|
|
|
|
# empty libinstall target so that libbfd.a does not get installed.
|
2003-04-10 02:33:26 +04:00
|
|
|
.if ${MKPIC} == "no"
|
|
|
|
MKLINKLIB= yes
|
2003-06-26 06:49:31 +04:00
|
|
|
libinstall: # do nothing
|
2003-04-10 02:33:26 +04:00
|
|
|
.endif
|
|
|
|
|
2002-08-19 19:01:34 +04:00
|
|
|
LIB= bfd
|
|
|
|
|
2002-02-12 00:36:33 +03:00
|
|
|
.if exists(${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk)
|
2001-08-06 19:47:17 +04:00
|
|
|
.include "${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk"
|
|
|
|
|
2003-12-04 12:29:31 +03:00
|
|
|
DIST= ${NETBSDSRCDIR}/gnu/dist/binutils
|
|
|
|
|
2006-02-03 19:29:34 +03:00
|
|
|
SHLIB_MAJOR= 8
|
2001-09-21 19:38:15 +04:00
|
|
|
SHLIB_MINOR= 0
|
2001-08-06 19:47:17 +04:00
|
|
|
|
|
|
|
GCPPFLAGS= ${G_archdefs} ${G_DEFS} ${G_INCLUDES} ${G_TDEFAULTS}
|
2003-03-01 16:08:42 +03:00
|
|
|
CPPFLAGS+= -I${.CURDIR}/arch/${MACHINE_ARCH} -I${DIST}/include -I. \
|
|
|
|
-I${DIST}/bfd ${GCPPFLAGS:M-D*} ${GCPPFLAGS:M-I*:N-I.*}
|
2001-08-06 19:47:17 +04:00
|
|
|
|
|
|
|
GSRCS= ${G_libbfd_la_OBJECTS:libbfd.lo=lib_bfd.lo} \
|
2003-03-01 16:08:42 +03:00
|
|
|
${G_libbfd_la_DEPENDENCIES:M*.lo}
|
|
|
|
SRCS= ${GSRCS:.lo=.c}
|
2001-08-06 19:47:17 +04:00
|
|
|
|
2002-06-19 20:10:48 +04:00
|
|
|
DPSRCS+= elf32-target.h elf64-target.h targmatch.h \
|
|
|
|
elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
|
|
|
|
CLEANFILES+= elf32-target.h elf64-target.h targmatch.h \
|
|
|
|
elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
|
2001-08-06 19:47:17 +04:00
|
|
|
|
2001-08-19 18:19:38 +04:00
|
|
|
TEXINFO= bfd.texinfo
|
|
|
|
INFOFLAGS= -I${DIST}/bfd/doc
|
|
|
|
|
2003-03-01 16:08:42 +03:00
|
|
|
.PATH: ${DIST}/bfd ${DIST}/bfd/doc
|
2001-08-06 19:47:17 +04:00
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|
2001-08-19 18:19:38 +04:00
|
|
|
.include <bsd.info.mk>
|
2001-08-06 19:47:17 +04:00
|
|
|
|
2003-12-08 00:13:04 +03:00
|
|
|
# XXX
|
|
|
|
.if ${MACHINE_CPU} == "sh5"
|
|
|
|
COPTS.elf32.c= -O1
|
|
|
|
COPTS.elf64.c= -O1
|
|
|
|
.endif
|
|
|
|
|
2001-08-06 19:47:17 +04:00
|
|
|
${OBJS} ${SOBJS}: elf32-target.h elf64-target.h
|
|
|
|
targets.o targets.so: targmatch.h Makefile
|
2002-02-12 00:36:33 +03:00
|
|
|
.else
|
|
|
|
.include <bsd.prog.mk> # do nothing
|
|
|
|
.endif
|
2001-08-06 19:47:17 +04:00
|
|
|
|
|
|
|
targmatch.h: config.bfd targmatch.sed
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2001-08-06 19:47:17 +04:00
|
|
|
sed -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} >$@
|
|
|
|
|
|
|
|
elf32-target.h: elfxx-target.h
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2001-08-06 19:47:17 +04:00
|
|
|
sed -e s/NN/32/g < $> > $@
|
|
|
|
|
|
|
|
elf64-target.h: elfxx-target.h
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2001-08-06 19:47:17 +04:00
|
|
|
sed -e s/NN/64/g < $> > $@
|
2002-06-18 12:19:04 +04:00
|
|
|
|
|
|
|
elf32-ia64.c: elfxx-ia64.c
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2002-06-18 12:19:04 +04:00
|
|
|
sed -e s/NN/32/g < $> > $@
|
|
|
|
|
|
|
|
elf64-ia64.c: elfxx-ia64.c
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2002-06-18 12:19:04 +04:00
|
|
|
sed -e s/NN/64/g < $> > $@
|
|
|
|
|
|
|
|
peigen.c: peXXigen.c
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2002-06-18 12:48:29 +04:00
|
|
|
sed -e s/XX/pe/g < $> > $@
|
2002-06-18 12:19:04 +04:00
|
|
|
|
|
|
|
pepigen.c: peXXigen.c
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2002-06-18 12:48:29 +04:00
|
|
|
sed -e s/XX/pep/g < $> > $@
|