File: Make.defs

package info (click to toggle)
libpam-ldap 43-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 300 kB
  • ctags: 105
  • sloc: ansic: 1,830; makefile: 40
file content (91 lines) | stat: -rw-r--r-- 2,365 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#ident $Id: Make.defs,v 1.14 2000/01/02 23:25:02 lukeh Exp $

# The PAM library directory
SECURITY_DIR = /lib/security
#SECURITY_DIR = /usr/lib

# The Netscape LDAP libraries. Downloadable from
# developer.netscape.com (for pre-compiled libraries
# with SSL support linked in) or www.mozilla.org
# (for source code without SSL). If using Mozilla
# LDAP libraries, replace -lldapssl30 with
# -lldap -llber.
#LDAP_LIB_DIR = /usr/local/ldapsdk/lib
#LDAP_INC_DIR = /usr/local/ldapsdk/include
#LDAPLIBS = -L$(LDAP_LIB_DIR) -lldapssl30

# OpenLDAP/Umich LDAP libraries. Downloadable from
# www.openldap.org.
#LDAP_LIB_DIR = /usr/local/lib
#LDAP_INC_DIR = /usr/local/include
LDAPLIBS = -lopenldap -llber-openldap

CDEFS = -g -O2 -D_REENTRANT -D_GNU_SOURCE
WARNINGS = -ansi -Wall -Wwrite-strings \
	-Wpointer-arith -Wcast-align \
	-Wtraditional -Wstrict-prototypes -Wmissing-prototypes \
	-Wnested-externs -Winline -Wshadow -pedantic

# V3 API defines, for OpenLDAP 2.x.
#CDEFS = -g $(WARNINGS) -D_REENTRANT -DLDAP_VERSION3_API 
# V3 API defines, for Netscape SDK with SSL support.
# Remove -DSSL if building with the Mozilla SDK.
#CDEFS = -g $(WARNINGS) -D_REENTRANT -DLDAP_VERSION3_API -DSSL -DNETSCAPE_API_EXTENSIONS
# V2 API defines, for OpenLDAP 1.x.
#CDEFS = -g $(WARNINGS) 

# Define NDS for NDSv8 password change support
#CDEFS += -DNDS

# Which Make is gnu make
MAKE = make
#MAKE = gnumake

LIBAUTHSH = pam_ldap.so

LIBAUTHOBJ =  pam_ldap.o
LIBAUTHSRC =  pam_ldap.c
LIBOBJ = $(LIBAUTHOBJ) 
LIBSRC = $(LIBAUTHSRC)

LIBSHARED = $(LIBAUTHSH) 

LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
LIBOBJS = $(addprefix static/,$(LIBOBJ)) 
export CFLAGS CC

dynamic/%.o : %.c
	$(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) -c $< -o $@

static/%.o: %.c
	$(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) -c $< -o $@


########################### don't edit below #######################

dummy: all

install: all
	install -m 644 -o root -g root $(LIBAUTHSH) $(DESTDIR)$(SECURITY_DIR)
	install -m 644 -o root -g root ldap.conf $(DESTDIR)/etc/pam_ldap.conf

all: dirs $(LIBSHARED) 

dirs:
	mkdir -p ./dynamic

$(LIBOBJD): $(LIBSRC)


$(LIBAUTHSH): $(LIBAUTHSRC) $(LIBOBJD) 
	gcc -shared -Xlinker -x -o $@  $(addprefix dynamic/,$(LIBAUTHOBJ)) $(LDAPLIBS)

clean:
	rm -f $(LIBAUTHSH) $(LIBOBJD) $(LIBOBJS) a.out core *~

extraclean: clean
	rm -f *.a *.out *.o *.so *.bak

.c.o:	
	$(CC) -c $(CFLAGS) $<