b08d76e57ccbebdf5b77d85ce734dceab8a36bb5
[openwrt/svn-archive/archive.git] / toolchain / gdb / Makefile
1 #
2 # Copyright (C) 2006-2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=gdb
10 PKG_VERSION:=linaro-7.2-2011.03-0
11
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
13 PKG_MD5SUM:=747b655418058964451eff7c7a15013c
14 PKG_SOURCE_URL:=http://launchpad.net/gdb-linaro/7.2/7.2-2011.03-0/+download/
15
16 HOST_BUILD_PARALLEL:=1
17
18 include $(INCLUDE_DIR)/toolchain-build.mk
19
20 define Host/Configure
21 (cd $(HOST_BUILD_DIR); \
22 gdb_cv_func_sigsetjmp=yes \
23 CFLAGS="-O2" \
24 $(HOST_BUILD_DIR)/configure \
25 --prefix=$(TOOLCHAIN_DIR) \
26 --build=$(GNU_HOST_NAME) \
27 --host=$(GNU_HOST_NAME) \
28 --target=$(REAL_GNU_TARGET_NAME) \
29 --disable-werror \
30 $(DISABLE_NLS) \
31 --without-uiout \
32 --disable-tui --disable-gdbtk --without-x \
33 --without-included-gettext \
34 --enable-threads \
35 );
36 endef
37
38 define Host/Install
39 mkdir -p $(TOOLCHAIN_DIR)/bin
40 $(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
41 ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
42 strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
43 endef
44
45 define Host/Clean
46 rm -rf \
47 $(HOST_BUILD_DIR) \
48 $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb \
49 $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
50 endef
51
52 $(eval $(call HostBuild))