1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
################################################################################
# Embtoolkit
# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
#
# \file gdb.mk
# \brief gdb.mk of Embtoolkit
# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
# \date July 2009
################################################################################
GDB_NAME := gdb
GDB_VERSION := $(call EMBTK_GET_PKG_VERSION,GDB)
GDB_SITE := http://ftp.gnu.org/gnu/gdb
GDB_SITE_MIRROR3 := ftp://ftp.embtoolkit.org/embtoolkit.org/packages-mirror
GDB_PATCH_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/gdb/$(GDB_VERSION)
GDB_PACKAGE := gdb-$(GDB_VERSION).tar.bz2
GDB_SRC_DIR := $(PACKAGES_BUILD)/gdb-$(GDB_VERSION)
GDB_BUILD_DIR := $(if $(CONFIG_EMBTK_HAVE_GDBSERVER), \
$(PACKAGES_BUILD)/gdb-$(GDB_VERSION)-serverbuild, \
$(PACKAGES_BUILD)/gdb-$(GDB_VERSION)-build)
# GDB installed files
GDBSERVER_BIN := $(if $(CONFIG_EMBTK_HAVE_GDBSERVER),,gdbserver)
GDB_BINS := gdb $(GDBSERVER_BIN) gdbtui run
GDB_SBINS :=
GDB_INCLUDES := $(if $(CONFIG_EMBTK_HAVE_GDBSERVER), \
,,ansidecl.h bfd.h bfdlink.h dis-asm.h symcat.h)
GDB_LIBS := $(if $(CONFIG_EMBTK_HAVE_GDBSERVER), \
,,lib*-sim.a libbfd.* libiberty.* libopcodes.*)
GDB_LIBEXECS :=
GDB_PKGCONFIGS :=
GDB_CONFIGURE_ENV :=
GDB_CONFIGURE_OPTS := --disable-werror --disable-sim \
--with-bugurl="$(EMBTK_BUGURL)" \
--with-pkgversion="embtk-$(EMBTK_VERSION)"
GDB_DEPS := ncurses_install
#
# GDB for target
#
gdbfull_install:
$(call EMBTK_INSTALL_PKG,GDB)
gdbserver_install:
@test -e $(GDB_BUILD_DIR)/.gdbserver_installed || \
$(MAKE) $(GDB_BUILD_DIR)/.gdbserver_installed
$(GDB_BUILD_DIR)/.gdbserver_installed: $(GDB_DEPS) \
download_gdb \
$(GDB_BUILD_DIR)/.gdbserver_decompressed \
$(GDB_BUILD_DIR)/.gdbserver_configured
$(Q)$(MAKE) -C $(GDB_BUILD_DIR) $(J)
$(Q)$(MAKE) -C $(GDB_BUILD_DIR)/gdb/gdbserver \
DESTDIR=$(SYSROOT)/$(GDB_SYSROOT_SUFFIX) install
$(Q)$(MAKE) libtool_files_adapt
@touch $@
$(GDB_BUILD_DIR)/.gdbserver_configured:
$(call EMBTK_CONFIGURE_PKG,GDB)
@touch $@
$(GDB_BUILD_DIR)/.gdbserver_decompressed:
$(call EMBTK_DECOMPRESS_PKG,GDB)
@touch $@
gdbserver_clean gdbfull_clean:
$(call EMBTK_CLEANUP_PKG,GDB)
#
# GDB for host development machine
#
GDB_HOST_NAME := gdb
GDB_HOST_VERSION := $(GDB_VERSION)
GDB_HOST_SITE := $(GDB_SITE)
GDB_HOST_SITE_MIRROR3 := $(GDB_SITE_MIRROR3)
GDB_HOST_PATCH_SITE := $(GDB_PATCH_SITE)
GDB_HOST_PACKAGE := $(GDB_PACKAGE)
GDB_HOST_SRC_DIR := $(TOOLS_BUILD)/gdb-$(GDB_VERSION)
GDB_HOST_BUILD_DIR := $(TOOLS_BUILD)/gdb-$(GDB_VERSION)
GDB_HOST_CONFIGURE_ENV := CC=$(HOSTCC_CACHED)
GDB_HOST_CONFIGURE_ENV += CXX=$(HOSTCXX_CACHED)
GDB_HOST_CONFIGURE_ENV += CC_FOR_TARGET=$(TARGETCC_CACHED)
GDB_HOST_CONFIGURE_ENV += CXX_FOR_TARGET=$(TARGETCXX_CACHED)
GDB_HOST_CONFIGURE_ENV += AR_FOR_TARGET=$(TARGETAR)
GDB_HOST_CONFIGURE_ENV += LD_FOR_TARGET=$(TARGETLD)
GDB_HOST_CONFIGURE_ENV += NM_FOR_TARGET=$(TARGETNM)
GDB_HOST_CONFIGURE_ENV += RANLIB_FOR_TARGET=$(TARGETRANLIB)
GDB_HOST_CONFIGURE_ENV += STRIP_FOR_TARGET=$(TARGETSTRIP)
GDB_HOST_CONFIGURE_ENV += OBJDUMP_FOR_TARGET=$(TARGETOBJDUMP)
GDB_HOST_CONFIGURE_OPTS := --disable-werror --disable-sim \
--with-bugurl="$(EMBTK_BUGURL)" \
--with-pkgversion="embtk-$(EMBTK_VERSION)" \
--target=$(STRICT_GNU_TARGET)
GDB_HOST_PREFIX := $(TOOLS)
gdb_host_install:
$(call EMBTK_INSTALL_HOSTPKG,GDB_HOST)
gdb_host_clean:
$(call EMBTK_GENERIC_MSG,"Clean up gdb host")
#
# Common for target and host development machine
#
download_gdb:
$(call EMBTK_DOWNLOAD_PKG,GDB)
|