Debian Codegraph @

src/pam/Makefile.am

raw
1 # Copyright (C) 2004, 2005, 2007, 2008 g10 Code GmbH
2 #
3 # This file is part of Poldi.
4 #
5 # Poldi is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # Poldi is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
13 # License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 # 02111-1307, USA
19
20 AM_CPPFLAGS = \
21 -I$(top_srcdir)/src/pam \
22 -I$(top_srcdir)/src \
23 -I$(top_builddir)/src/pam \
24 -I$(top_builddir)/src \
25 -I$(top_builddir) \
26 -I$(top_srcdir)/src/assuan
27
28
29 include $(top_srcdir)/am/cmacros.am
30
31 PAM_MODULE_DIRECTORY = @PAM_MODULE_DIRECTORY@
32
33 AM_CFLAGS = \
34 -fPIC \
35 -Wall \
36 -I$(top_builddir) \
37 -I$(top_srcdir)/src \
38 -I$(top_srcdir)/util \
39 $(GPG_ERROR_CFLAGS) \
40 $(LIBGCRYPT_CFLAGS)
41
42 AUTH_METHODS =
43 AUTH_METHODS_LIBS =
44
45 if AUTH_METHOD_LOCALDB
46 AUTH_METHODS += auth-method-localdb
47 AUTH_METHODS_LIBS += auth-method-localdb/libpoldi-auth-localdb.a
48 endif
49
50 if AUTH_METHOD_X509
51 AUTH_METHODS += auth-method-x509
52 AUTH_METHODS_LIBS += auth-method-x509/libpoldi-auth-x509.a
53 endif
54
55 SUBDIRS = auth-support $(AUTH_METHODS)
56
57 noinst_LIBRARIES = libpam_poldi.a
58
59 libpam_poldi_a_SOURCES = \
60 pam_poldi.c auth-methods.h
61
62 pam_poldi.so: libpam_poldi.a $(AUTH_METHODS_LIBS) auth-support/libpam-poldi-auth-support.a \
63 ../scd/libscd_shared.a ../util/libpoldi-util_shared.a
64 $(CC) $(LDFLAGS) -shared -o pam_poldi.so -Wl,-u,pam_sm_authenticate \
65 libpam_poldi.a \
66 $(AUTH_METHODS_LIBS) auth-support/libpam-poldi-auth-support.a \
67 ../scd/libscd_shared.a ../util/libpoldi-util_shared.a ../assuan/libassuan.a \
68 $(LIBGCRYPT_LIBS) $(KSBA_LIBS)
69
70 all-local: pam_poldi.so
71
72 install-exec-local:
73 $(INSTALL) -d $(DESTDIR)$(PAM_MODULE_DIRECTORY)
74 $(INSTALL) pam_poldi.so $(DESTDIR)$(PAM_MODULE_DIRECTORY)
75
76 uninstall-local:
77 rm -f $(DESTDIR)$(PAM_MODULE_DIRECTORY)/pam_poldi.so
78
79 CLEANFILES = pam_poldi.so
80
81 # FIXME: LDFLAGS for other libs missing....