1 # Copyright (C) 2020-2024 Free Software Foundation, Inc.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 # A makefile snippet that lists all of the libraries that should be
17 # pulled in when linking against gnulib. Both GDB and GDBSERVER will
18 # include this snippet.
20 # The defined variables are:
22 # LIBGNU: The path to the archive containing gnulib. Can be used as a
23 # dependency as when this file changes gdb/gdbserver should be
26 # LIBGNU_EXTRA_LIBS: A list of linker -l.... flags that should be
27 # included in the link line of gdb/gdbserver. These are
28 # libraries that $(LIBGNU) depends on. This list is taken from
29 # the output of gnulib-tool, which is run by our
30 # gnulib/update-gnulib.sh script.
32 # INCGNU: A list of -I.... include paths that should be passed to the
33 # compiler, these are where the gnulib headers can be found.
35 # Packages must define the relative path to gnulib's parent dir.
36 ifndef GNULIB_PARENT_DIR
37 $(error missing GNULIB_PARENT_DIR)
40 LIBGNU = $(GNULIB_PARENT_DIR)/gnulib/import/libgnu.a
41 LIBGNU_EXTRA_LIBS = @FREXPL_LIBM@ @FREXP_LIBM@ @INET_NTOP_LIB@ \
42 @LIBTHREAD@ @LIB_GETLOGIN@ @LIB_GETRANDOM@ \
43 @LIB_HARD_LOCALE@ @LIB_MBRTOWC@ \
44 @LIB_SETLOCALE_NULL@ @LIBINTL@ @LIB_SELECT@ @LIBSOCKET@
45 INCGNU = -I$(srcdir)/$(GNULIB_PARENT_DIR)/gnulib/import \
46 -I$(GNULIB_PARENT_DIR)/gnulib/import