You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mxe/src/gdb.mk

34 lines
1.2 KiB

# This file is part of MXE. See LICENSE.md for licensing information.
PKG := gdb
$(PKG)_WEBSITE := https://www.gnu.org/software/gdb/
$(PKG)_VERSION := 8.2.1
$(PKG)_CHECKSUM := 0a6a432907a03c5c8eaad3c3cffd50c00a40c3a5e3c4039440624bae703f2202
$(PKG)_SUBDIR := gdb-$($(PKG)_VERSION)
$(PKG)_FILE := gdb-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE)
$(PKG)_URL_2 := https://ftpmirror.gnu.org/$(PKG)/$($(PKG)_FILE)
$(PKG)_DEPS := cc dlfcn-win32 expat libiconv readline zlib
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://ftp.gnu.org/gnu/gdb/?C=M;O=D' | \
$(SED) -n 's,.*<a href="gdb-\([0-9][^"]*\)\.tar.*,\1,p' | \
$(SORT) -V | \
tail -1
endef
define $(PKG)_BUILD
cd '$(1)' && ./configure \
$(MXE_CONFIGURE_OPTS) \
--with-system-readline \
--disable-gdbtk \
--disable-tui \
host_configargs="LIBS=\"`$(TARGET)-pkg-config --libs dlfcn`\"" \
CONFIG_SHELL=$(SHELL)
$(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