1# cmacros.am - C macro definitions
2#     Copyright (C) 2004 Free Software Foundation, Inc.
3#
4# This file is part of GnuPG.
5#
6# GnuPG is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 3 of the License, or
9# (at your option) any later version.
10#
11# GnuPG is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, see <https://www.gnu.org/licenses/>.
18
19localedir = $(datadir)/locale
20
21# NB: AM_CFLAGS may also be used by tools running on the build
22# platform to create source files.
23AM_CPPFLAGS += -DLOCALEDIR=\"$(localedir)\"
24
25if ! HAVE_DOSISH_SYSTEM
26AM_CPPFLAGS += -DGNUPG_BINDIR="\"$(bindir)\""            \
27               -DGNUPG_LIBEXECDIR="\"$(libexecdir)\""    \
28               -DGNUPG_LIBDIR="\"$(libdir)/@PACKAGE@\""  \
29               -DGNUPG_DATADIR="\"$(datadir)/@PACKAGE@\"" \
30               -DGNUPG_SYSCONFDIR="\"$(sysconfdir)/@PACKAGE@\"" \
31               -DGNUPG_LOCALSTATEDIR="\"$(localstatedir)\""
32endif
33
34
35# If a specific protect tool program has been defined, pass its name
36# to cc.  Note that these macros should not be used directly but via
37# the gnupg_module_name function.
38if GNUPG_AGENT_PGM
39AM_CPPFLAGS += -DGNUPG_DEFAULT_AGENT="\"@GNUPG_AGENT_PGM@\""
40endif
41if GNUPG_PINENTRY_PGM
42AM_CPPFLAGS += -DGNUPG_DEFAULT_PINENTRY="\"@GNUPG_PINENTRY_PGM@\""
43endif
44if GNUPG_SCDAEMON_PGM
45AM_CPPFLAGS += -DGNUPG_DEFAULT_SCDAEMON="\"@GNUPG_SCDAEMON_PGM@\""
46endif
47if GNUPG_TPM2DAEMON_PGM
48AM_CPPFLAGS += -DGNUPG_DEFAULT_TPM2DAEMON="\"@GNUPG_TPM2DAEMON_PGM@\""
49endif
50if GNUPG_DIRMNGR_PGM
51AM_CPPFLAGS += -DGNUPG_DEFAULT_DIRMNGR="\"@GNUPG_DIRMNGR_PGM@\""
52endif
53if GNUPG_PROTECT_TOOL_PGM
54AM_CPPFLAGS += -DGNUPG_DEFAULT_PROTECT_TOOL="\"@GNUPG_PROTECT_TOOL_PGM@\""
55endif
56if GNUPG_DIRMNGR_LDAP_PGM
57AM_CPPFLAGS += -DGNUPG_DEFAULT_DIRMNGR_LDAP="\"@GNUPG_DIRMNGR_LDAP_PGM@\""
58endif
59
60# Under Windows we use LockFileEx.  WindowsCE provides this only on
61# the WindowsMobile 6 platform and thus we need to use the coredll6
62# import library.  We also want to use a stacksize of 256k instead of
63# the 2MB which is the default with cegcc.  256k is the largest stack
64# we use with pth.
65if HAVE_W32CE_SYSTEM
66extra_sys_libs = -lcoredll6
67extra_bin_ldflags = -Wl,--stack=0x40000
68else
69extra_sys_libs =
70extra_bin_ldflags =
71endif
72
73if HAVE_W32_SYSTEM
74.rc.o:
75	$(WINDRES) $(DEFAULT_INCLUDES) $(INCLUDES) "$<" "$@"
76
77endif
78resource_objs =
79
80# Convenience macros
81libcommon = ../common/libcommon.a
82libcommonpth = ../common/libcommonpth.a
83libcommontls = ../common/libcommontls.a
84libcommontlsnpth = ../common/libcommontlsnpth.a
85