summaryrefslogtreecommitdiff
path: root/openvpn/src/plugins/auth-pam/Makefile
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-04-16 19:21:14 +0200
committerArne Schwabe <arne@rfc2549.org>2012-04-16 19:21:14 +0200
commit3e4d8f433239c40311037616b1b8833a06651ae0 (patch)
tree98ab7fce0d011d34677b0beb762d389cb5c39199 /openvpn/src/plugins/auth-pam/Makefile
Initial import
Diffstat (limited to 'openvpn/src/plugins/auth-pam/Makefile')
-rwxr-xr-xopenvpn/src/plugins/auth-pam/Makefile32
1 files changed, 32 insertions, 0 deletions
diff --git a/openvpn/src/plugins/auth-pam/Makefile b/openvpn/src/plugins/auth-pam/Makefile
new file mode 100755
index 00000000..c0b9c79e
--- /dev/null
+++ b/openvpn/src/plugins/auth-pam/Makefile
@@ -0,0 +1,32 @@
+#
+# Build the OpenVPN auth-pam plugin module.
+#
+
+# If PAM modules are not linked against libpam.so, set DLOPEN_PAM to 1. This
+# must be done on SUSE 9.1, at least.
+DLOPEN_PAM=0
+
+ifeq ($(DLOPEN_PAM),1)
+ LIBPAM=-ldl
+else
+ LIBPAM=-lpam
+endif
+
+# This directory is where we will look for openvpn-plugin.h
+CPPFLAGS=-I../../../include
+
+CC=gcc
+CFLAGS=-O2 -Wall
+DEFS = -DDLOPEN_PAM=$(DLOPEN_PAM)
+
+openvpn-auth-pam.so : auth-pam.o pamdl.o
+ $(CC) $(CFLAGS) -fPIC -shared $(LDFLAGS) -Wl,-soname,openvpn-auth-pam.so -o openvpn-auth-pam.so auth-pam.o pamdl.o -lc $(LIBPAM)
+
+auth-pam.o : auth-pam.c pamdl.h
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFS) -fPIC -c auth-pam.c
+
+pamdl.o : pamdl.c pamdl.h
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFS) -fPIC -c pamdl.c
+
+clean :
+ -rm -f *.o *.so