aboutsummaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am34
1 files changed, 34 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..f1f0472
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,34 @@
+noinst_PROGRAMS = pam_exec.so
+EXTRA_DIST = ChangeLog README pam.conf
+
+AM_CFLAGS = -fno-strict-aliasing
+
+pam_exec_so_SOURCES = pam_exec.c
+pam_exec_so_LDFLAGS = @pam_exec_so_LDFLAGS@
+
+DEFS = @DEFS@
+
+if USE_NATIVE_LINKER
+NATIVE_LINK = $(pam_exec_so_LD) $(AM_LDFLAGS) -o $@
+else
+GNU_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+endif
+
+# This is horrible but appears to be the only way to work with
+# recent versions of automake. Any better ideas, let me know.
+LINK = $(NATIVE_LINK) $(GNU_LINK)
+
+install-exec-local: pam_exec.so
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(libdir)/security
+if EXTENSION_SO
+ $(INSTALL_PROGRAM) -o root -g root pam_exec.so $(DESTDIR)$(libdir)/security/pam_exec.so
+else
+if EXTENSION_1
+ $(INSTALL_PROGRAM) -o root -g root pam_exec.so $(DESTDIR)$(libdir)/security/libpam_exec.1
+else
+ $(INSTALL_PROGRAM) -o root -g root pam_exec.so $(DESTDIR)$(libdir)/security/pam_exec.so.1
+ (cd $(DESTDIR)$(libdir)/security; rm -f pam_exec.so; ln -s pam_exec.so.1 pam_exec.so)
+endif
+endif
+