add setpwc package
[openwrt.git] / obsolete-buildroot / make / gdb.mk
1 #############################################################
2 #
3 # gdb
4 #
5 #############################################################
6
7 GDB_SITE:=ftp://ftp.gnu.org/gnu/gdb/
8 GDB_DIR:=$(BUILD_DIR)/gdb-5.3
9 GDB_SOURCE:=gdb-5.3.tar.gz
10 GDB_PATCH:=$(SOURCE_DIR)/gdb.patch
11 GDB_UCLIBC_PATCH:=$(SOURCE_DIR)/gdb-5.3-uclibc.patch
12
13 $(DL_DIR)/$(GDB_SOURCE):
14 $(WGET) -P $(DL_DIR) $(GDB_SITE)/$(GDB_SOURCE)
15
16 $(GDB_DIR)/.unpacked: $(DL_DIR)/$(GDB_SOURCE) $(GDB_PATCH)
17 gunzip -c $(DL_DIR)/$(GDB_SOURCE) | tar -C $(BUILD_DIR) -xvf -
18 cat $(GDB_PATCH) | patch -p1 -d $(GDB_DIR)
19 cat $(GDB_UCLIBC_PATCH) | patch -p1 -d $(GDB_DIR)
20 touch $(GDB_DIR)/.unpacked
21
22 $(GDB_DIR)/.configured: $(GDB_DIR)/.unpacked
23 # Copy a config.sub from gcc. This is only necessary until
24 # gdb's config.sub supports <arch>-linux-uclibc tuples.
25 cp $(GCC_DIR)/config.sub $(GDB_DIR)
26 cp $(GCC_DIR)/config.sub $(GDB_DIR)/readline/support/
27 (cd $(GDB_DIR); rm -rf config.cache; \
28 $(TARGET_CONFIGURE_OPTS) \
29 CFLAGS="$(TARGET_CFLAGS)" \
30 ac_cv_type_uintptr_t=yes \
31 gt_cv_func_gettext_libintl=yes \
32 ac_cv_func_dcgettext=yes \
33 gdb_cv_func_sigsetjmp=yes \
34 bash_cv_func_strcoll_broken=no \
35 bash_cv_must_reinstall_sighandlers=no \
36 bash_cv_func_sigsetjmp=present \
37 ./configure \
38 --target=$(REAL_GNU_TARGET_NAME) \
39 --host=$(REAL_GNU_TARGET_NAME) \
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 --includedir=$(STAGING_DIR)/include \
51 $(DISABLE_NLS) \
52 --without-uiout --disable-gdbmi \
53 --disable-tui --disable-gdbtk --without-x \
54 --disable-sim --enable-gdbserver \
55 --without-included-gettext \
56 );
57 ifeq ($(ENABLE_LOCALE),true)
58 -$(SED) "s,^INTL *=.*,INTL = -lintl,g;" $(GDB_DIR)/gdb/Makefile
59 endif
60 touch $(GDB_DIR)/.configured
61
62 $(GDB_DIR)/gdb/gdb: $(GDB_DIR)/.configured
63 $(MAKE) CC=$(TARGET_CC) -C $(GDB_DIR)
64 $(STRIP) $(GDB_DIR)/gdb/gdb
65
66 $(TARGET_DIR)/usr/bin/gdb: $(GDB_DIR)/gdb/gdb
67 install -c $(GDB_DIR)/gdb/gdb $(TARGET_DIR)/usr/bin/gdb
68 rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
69 $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
70
71 gdb: $(TARGET_DIR)/usr/bin/gdb
72
73 gdb-source: $(DL_DIR)/$(GDB_SOURCE)
74
75 gdb-clean:
76 $(MAKE) -C $(GDB_DIR) clean
77
78 gdb-dirclean:
79 rm -rf $(GDB_DIR)
80
This page took 0.056044 seconds and 5 git commands to generate.