source: freewrt/toolchain/gdb/Makefile@ 5e5de33

freewrt_2_0
Last change on this file since 5e5de33 was 5e5de33, checked in by Waldemar Brodkorb <wbx@…>, 4 months ago

elimininate REAL_GNU_TARGET_NAME

  • Property mode set to 100644
File size: 1.6 KB
Line 
1# $Id: Makefile 1287 2005-06-26 17:31:18Z nbd $
2
3include $(TOPDIR)/rules.mk
4include ../rules.mk
5
6GDB_NAME:=gdb
7GDB_SITE:=https://ftp.gnu.org/gnu/gdb
8GDB_VERSION:=6.3
9SOURCE:=$(GDB_NAME)-$(GDB_VERSION)a.tar.bz2
10
11GDB_DIR:=$(TOOLCHAIN_BUILD_DIR)/$(GDB_NAME)-$(GDB_VERSION)
12
13$(DL_DIR)/$(SOURCE):
14 $(WGET) -P $(DL_DIR) $(GDB_SITE)/$(SOURCE)
15
16$(GDB_DIR)/.patched: $(DL_DIR)/$(SOURCE)
17 ${EXTRACT_CMD}
18 $(PATCH) $(GDB_DIR) ./patches
19 # Copy a config.sub from gcc. This is only necessary until
20 # gdb's config.sub supports <arch>-linux-uclibc tuples.
21 # Should probably integrate this into the patch.
22 touch $(GDB_DIR)/.patched
23
24# gdb client
25
26GDB_CLIENT_DIR:=$(TOOLCHAIN_BUILD_DIR)/gdbclient-$(GDB_VERSION)
27
28$(GDB_CLIENT_DIR)/.configured: $(GDB_DIR)/.patched
29 mkdir -p $(GDB_CLIENT_DIR)
30 (cd $(GDB_CLIENT_DIR); \
31 gdb_cv_func_sigsetjmp=yes \
32 $(GDB_DIR)/configure \
33 --prefix=$(STAGING_DIR) \
34 --build=$(GNU_HOST_NAME) \
35 --host=$(GNU_HOST_NAME) \
36 --target=$(GNU_TARGET_NAME) \
37 --disable-nls \
38 --disable-sim \
39 --without-uiout --disable-gdbmi \
40 --disable-tui --disable-gdbtk --without-x \
41 --without-included-gettext \
42 --enable-threads \
43 );
44 touch $(GDB_CLIENT_DIR)/.configured
45
46$(GDB_CLIENT_DIR)/gdb/gdb: $(GDB_CLIENT_DIR)/.configured
47 $(MAKE) -C $(GDB_CLIENT_DIR)
48 strip $(GDB_CLIENT_DIR)/gdb/gdb
49
50$(TARGET_CROSS)gdb: $(GDB_CLIENT_DIR)/gdb/gdb
51 install -c $(GDB_CLIENT_DIR)/gdb/gdb $(TARGET_CROSS)gdb
52 cd $(STAGING_DIR)/bin && \
53 ln -fs $(TARGET_CROSS)gdb $(GNU_TARGET_NAME)-gdb
54
55source: $(DL_DIR)/$(SOURCE)
56prepare: $(GDB_DIR)/.patched
57compile:
58install: $(TARGET_CROSS)gdb
59clean:
60 rm -rf $(GDB_CLIENT_DIR) $(GDB_DIR)
Note: See TracBrowser for help on using the repository browser.