mxe/src/gdb.mk

34 lines
1.2 KiB
Makefile
Raw Normal View History

# This file is part of MXE. See LICENSE.md for licensing information.
2010-05-12 18:22:38 +01:00
PKG := gdb
$(PKG)_WEBSITE := https://www.gnu.org/software/gdb/
2019-05-13 20:57:25 +01:00
$(PKG)_VERSION := 8.3
$(PKG)_CHECKSUM := 802f7ee309dcc547d65a68d61ebd6526762d26c3051f52caebe2189ac1ffd72e
2010-05-12 18:22:38 +01:00
$(PKG)_SUBDIR := gdb-$($(PKG)_VERSION)
2014-08-04 21:06:33 +01:00
$(PKG)_FILE := gdb-$($(PKG)_VERSION).tar.xz
2017-03-04 10:33:47 +00:00
$(PKG)_URL := https://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE)
2017-03-05 03:41:39 +00:00
$(PKG)_URL_2 := https://ftpmirror.gnu.org/$(PKG)/$($(PKG)_FILE)
$(PKG)_DEPS := cc dlfcn-win32 expat libiconv readline zlib
2010-05-12 18:22:38 +01:00
define $(PKG)_UPDATE
2017-03-04 10:33:47 +00:00
$(WGET) -q -O- 'https://ftp.gnu.org/gnu/gdb/?C=M;O=D' | \
2010-05-12 18:22:38 +01:00
$(SED) -n 's,.*<a href="gdb-\([0-9][^"]*\)\.tar.*,\1,p' | \
$(SORT) -V | \
tail -1
2010-05-12 18:22:38 +01:00
endef
define $(PKG)_BUILD
cd '$(1)' && ./configure \
$(MXE_CONFIGURE_OPTS) \
--with-system-readline \
--disable-gdbtk \
--disable-tui \
2016-08-15 05:36:01 +01:00
host_configargs="LIBS=\"`$(TARGET)-pkg-config --libs dlfcn`\"" \
CONFIG_SHELL=$(SHELL)
2010-05-12 18:22:38 +01:00
$(MAKE) -C '$(1)' -j '$(JOBS)'
# executables are always static and we don't the rest
$(INSTALL) -m755 '$(1)/gdb/gdb.exe' '$(PREFIX)/$(TARGET)/bin/'
$(INSTALL) -m755 '$(1)/gdb/gdbserver/gdbserver.exe' '$(PREFIX)/$(TARGET)/bin/'
endef