binutils/oprofile: disable mips16 to fix build errors (#19522)
[openwrt/svn-archive/archive.git] / package / devel / binutils / Makefile
1 #
2 # Copyright (C) 2006-2013 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=binutils
11 PKG_VERSION:=2.24
12 PKG_RELEASE:=3
13
14 PKG_SOURCE_URL:=@GNU/binutils
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_VERSION:=$(PKG_VERSION)
17 PKG_MD5SUM:=e0f71a7b2ddab0f8612336ac81d9636b
18
19 PKG_FIXUP:=autoreconf
20 PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof binutils ld libiberty gold intl
21 PKG_REMOVE_FILES:=libtool.m4
22 PKG_INSTALL:=1
23
24 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
25 PKG_LICENSE:=GPL-3.0+
26 PKG_BUILD_PARALLEL:=1
27 PKG_USE_MIPS16:=0
28
29 include $(INCLUDE_DIR)/package.mk
30
31 define Package/libbfd
32 SECTION:=libs
33 CATEGORY:=Libraries
34 TITLE:=libbfd
35 DEPENDS:=+zlib
36 endef
37
38 define Package/libopcodes
39 SECTION:=libs
40 CATEGORY:=Libraries
41 TITLE:=libbfd
42 DEPENDS:=+libbfd
43 endef
44
45 define Package/binutils
46 SECTION:=devel
47 CATEGORY:=Development
48 TITLE:=binutils
49 DEPENDS:=+objdump +ar
50 endef
51
52 define Package/objdump
53 SECTION:=devel
54 CATEGORY:=Development
55 TITLE:=objdump
56 DEPENDS:=+libopcodes
57 endef
58
59 define Package/ar
60 SECTION:=devel
61 CATEGORY:=Development
62 TITLE:=ar
63 DEPENDS:=+zlib +libbfd
64 endef
65
66 define Package/binutils/description
67 The Binutils package contains a linker, an assembler, and other tools for handling object files
68 endef
69
70 TARGET_CFLAGS += $(FPIC) -Wno-unused-value
71
72 CONFIGURE_ARGS += \
73 --host=$(REAL_GNU_TARGET_NAME) \
74 --target=$(REAL_GNU_TARGET_NAME) \
75 --enable-shared \
76 --enable-install-libiberty \
77 --enable-install-libbfd
78
79 define Build/Install
80 $(call Build/Install/Default)
81 $(MAKE) -C $(PKG_BUILD_DIR)/libiberty \
82 target_header_dir=libiberty \
83 DESTDIR="$(PKG_INSTALL_DIR)" \
84 MULTIOSDIR="" \
85 install
86 endef
87
88 define Build/InstallDev
89 $(CP) $(PKG_INSTALL_DIR)/* $(1)/
90 endef
91
92 define Package/libbfd/install
93 $(INSTALL_DIR) $(1)/usr/lib
94 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbfd*.so $(1)/usr/lib/
95 endef
96
97 define Package/libopcodes/install
98 $(INSTALL_DIR) $(1)/usr/lib
99 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopcodes*.so $(1)/usr/lib/
100 endef
101
102 define Package/objdump/install
103 $(INSTALL_DIR) $(1)/usr/bin
104 $(CP) $(PKG_INSTALL_DIR)/usr/bin/objdump $(1)/usr/bin/
105 endef
106
107 define Package/ar/install
108 $(INSTALL_DIR) $(1)/usr/bin
109 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ar $(1)/usr/bin/
110 endef
111
112 define Package/binutils/install
113 $(INSTALL_DIR) $(1)/usr $(1)/bin
114 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ $(1)/usr/
115 mv $(1)/usr/bin/strings $(1)/bin/strings
116 rm -f $(1)/usr/bin/objdump
117 rm -f $(1)/usr/bin/ar
118 endef
119
120 $(eval $(call BuildPackage,libbfd))
121 $(eval $(call BuildPackage,libopcodes))
122 $(eval $(call BuildPackage,binutils))
123 $(eval $(call BuildPackage,objdump))
124 $(eval $(call BuildPackage,ar))