a4f56ca4fd2df0572445e017628014ba32a28963
[openwrt/svn-archive/archive.git] / libs / libbfd / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=binutils
12 PKG_VERSION:=2.16.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=ftp://ftp.gnu.org/gnu/binutils
17 PKG_MD5SUM:=6a9d529efb285071dad10e1f3d2b2967
18
19 include $(INCLUDE_DIR)/package.mk
20
21 TARGETS:=$(GNU_TARGET_NAME)
22
23 define Package/libbfd
24 SECTION:=libs
25 CATEGORY:=Libraries
26 TITLE:=The Binutils BFD library
27 URL:=ftp://ftp.gnu.org/gnu/binutils
28 endef
29
30 define Build/Configure
31 $(call Build/Configure/Default, \
32 --enable-install-libbfd \
33 --enable-commonbfdlib \
34 --disable-nls \
35 --enable-targets="$(TARGETS)" \
36 , \
37 , \
38 bfd \
39 )
40 endef
41
42 TARGET_CFLAGS += $(FPIC)
43
44 define Build/Compile
45 $(MAKE) -C $(PKG_BUILD_DIR)/bfd \
46 DESTDIR="$(PKG_INSTALL_DIR)" \
47 all install
48 endef
49
50 define Build/InstallDev
51 mkdir -p $(1)/usr/include
52 $(CP) $(PKG_INSTALL_DIR)/usr/include/ansidecl.h \
53 $(PKG_INSTALL_DIR)/usr/include/bfd{,link}.h \
54 $(PKG_INSTALL_DIR)/usr/include/symcat.h \
55 $(1)/usr/include/
56 mkdir -p $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbfd.a \
58 $(1)/usr/lib/
59 endef
60
61 $(eval $(call BuildPackage,libbfd))