0f976fff6f000b6a237219ce603967236b3fd84e
[openwrt/svn-archive/archive.git] / utils / gdbserver / Makefile
1 # Copyright (C) 2006 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6 # $Id$
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=gdbserver
11 PKG_VERSION:=6.3
12 PKG_RELEASE:=1
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 GDB_DIR:=$(TOOL_BUILD_DIR)/gdb-$(PKG_VERSION)
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/gdbserver
22 SECTION:=utils
23 CATEGORY:=Utilities
24 DEPENDS:=@GDB@
25 TITLE:=Remote Server for the GNU Debugger
26 DESCRIPTION:=GDBSERVER is a program that allows you to run GDB on a different machine\\\
27 than the one which is running the program being debugged.
28 endef
29
30 define Build/Configure
31 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
32 $(TARGET_CONFIGURE_OPTS) \
33 CFLAGS="$(TARGET_CFLAGS)" \
34 $(GDB_DIR)/gdb/gdbserver/configure \
35 --target=$(GNU_TARGET_NAME) \
36 --host=$(GNU_TARGET_NAME) \
37 --build=$(GNU_HOST_NAME) \
38 --program-prefix="" \
39 --program-suffix="" \
40 --prefix=/usr \
41 --exec-prefix=/usr \
42 --bindir=/usr/bin \
43 --sbindir=/usr/sbin \
44 --libexecdir=/usr/lib \
45 --sysconfdir=/etc \
46 --datadir=/usr/share \
47 --localstatedir=/var \
48 --mandir=/usr/man \
49 --infodir=/usr/info \
50 $(DISABLE_NLS) \
51 $(DISABLE_LARGEFILE) \
52 );
53 endef
54
55 define Build/Compile
56 rm -rf $(PKG_INSTALL_DIR)
57 mkdir -p $(PKG_INSTALL_DIR)
58 $(MAKE) -C $(PKG_BUILD_DIR) \
59 DESTDIR="$(PKG_INSTALL_DIR)" \
60 install
61 endef
62
63 define Package/gdbserver/install
64 install -m0755 -d $(1)/usr/bin
65 $(CP) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(1)/usr/bin/
66 endef
67
68 $(eval $(call BuildPackage,gdbserver))
69