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
:=$(TOOLCHAIN_BUILD_DIR
)/gdb-
$(PKG_VERSION
)
16 include $(INCLUDE_DIR
)/package.mk
18 define Package
/gdbserver
22 TITLE
:=Remote Server for the GNU Debugger
23 DESCRIPTION
:=GDBSERVER is a program that allows you to run GDB on a different machine
\\\
24 than the one which is running the program being debugged.
27 define Build
/Configure
28 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
}; \
29 $(TARGET_CONFIGURE_OPTS
) \
30 CFLAGS
="$(TARGET_CFLAGS)" \
31 $(GDB_DIR
)/gdb
/gdbserver
/configure \
32 --target
=$(GNU_TARGET_NAME
) \
33 --host
=$(GNU_TARGET_NAME
) \
34 --build
=$(GNU_HOST_NAME
) \
41 --libexecdir
=/usr
/lib \
43 --datadir=/usr
/share \
44 --localstatedir
=/var \
48 $(DISABLE_LARGEFILE
) \
53 rm -rf
$(PKG_INSTALL_DIR
)
54 mkdir
-p
$(PKG_INSTALL_DIR
)
55 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
56 DESTDIR
="$(PKG_INSTALL_DIR)" \
60 define Package
/gdbserver
/install
61 $(INSTALL_DIR
) $(1)/usr
/bin
62 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/gdbserver
$(1)/usr
/bin
/
65 $(eval
$(call BuildPackage
,gdbserver
))