xref: /netbsd-src/external/gpl3/gdb/dist/gnulib/Makefile.gnulib.inc.in (revision 8aaca124c0ad52af9550477f296b63debc7b4c98)
1# Copyright (C) 2020-2023 Free Software Foundation, Inc.
2
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.
7#
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.
12#
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/>.
15
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.
19#
20# The defined variables are:
21#
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
24#        relinked.
25#
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.
31#
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.
34
35# Packages must define the relative path to gnulib's parent dir.
36ifndef GNULIB_PARENT_DIR
37$(error missing GNULIB_PARENT_DIR)
38endif
39
40LIBGNU = $(GNULIB_PARENT_DIR)/gnulib/import/libgnu.a
41LIBGNU_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@
45INCGNU = -I$(srcdir)/$(GNULIB_PARENT_DIR)/gnulib/import \
46         -I$(GNULIB_PARENT_DIR)/gnulib/import
47