source: freewrt/toolchain/gdb/Makefile@ 9554ed5

freewrt_2_0
Last change on this file since 9554ed5 was 9554ed5, checked in by Waldemar Brodkorb <wbx@…>, 3 months ago

populate FWRT_JLEVEL to toolchain, reduces the buildtime on multi-core machines

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