1 # Copyright (C) 2006 OpenWrt.org
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 GDB_DIR
:=$(BUILD_DIR_TOOLCHAIN
)/gdb-
$(PKG_VERSION
)
16 include $(INCLUDE_DIR
)/package.mk
18 define Package
/gdbserver
22 TITLE
:=Remote Server for the GNU Debugger
25 define Package
/gdbserver
/description
26 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.
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
) \
44 --libexecdir
=/usr
/lib \
46 --datadir=/usr
/share \
47 --localstatedir
=/var \
51 $(DISABLE_LARGEFILE
) \
56 rm -rf
$(PKG_INSTALL_DIR
)
57 mkdir
-p
$(PKG_INSTALL_DIR
)
58 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
59 DESTDIR
="$(PKG_INSTALL_DIR)" \
63 define Package
/gdbserver
/install
64 $(INSTALL_DIR
) $(1)/usr
/bin
65 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/gdbserver
$(1)/usr
/bin
/
68 $(eval
$(call BuildPackage
,gdbserver
))