svn cleanup
[anytun.git] / openvpn / plugin / auth-pam / Makefile
blob3e7c6cef2248b6839c0ed8eea3feac050ac43b9c
2 # Build the OpenVPN auth-pam plugin module.
5 # If PAM modules are not linked against libpam.so, set DLOPEN_PAM to 1. This
6 # must be done on SUSE 9.1, at least.
7 DLOPEN_PAM=1
9 ifeq ($(DLOPEN_PAM),1)
10 LIBPAM=-ldl
11 else
12 LIBPAM=-lpam
13 endif
15 # This directory is where we will look for openvpn-plugin.h
16 INCLUDE=-I../..
18 CC_FLAGS=-O2 -Wall -DDLOPEN_PAM=$(DLOPEN_PAM)
20 openvpn-auth-pam.so : auth-pam.o pamdl.o
21 gcc ${CC_FLAGS} -fPIC -shared -Wl,-soname,openvpn-auth-pam.so -o openvpn-auth-pam.so auth-pam.o pamdl.o -lc $(LIBPAM)
23 auth-pam.o : auth-pam.c pamdl.h
24 gcc ${CC_FLAGS} -fPIC -c ${INCLUDE} auth-pam.c
26 pamdl.o : pamdl.c pamdl.h
27 gcc ${CC_FLAGS} -fPIC -c ${INCLUDE} pamdl.c
29 clean :
30 rm -f *.o *.so