1 1.1.1.4 tron # $OpenLDAP$ 2 1.1.1.2 lukem # This work is part of OpenLDAP Software <http://www.openldap.org/>. 3 1.1.1.2 lukem # 4 1.1.1.10 christos # Copyright 2008-2024 The OpenLDAP Foundation. 5 1.1.1.2 lukem # Portions Copyright 2008 Howard Chu, Symas Corp. All Rights Reserved. 6 1.1 lukem # 7 1.1 lukem # Redistribution and use in source and binary forms, with or without 8 1.1 lukem # modification, are permitted only as authorized by the OpenLDAP 9 1.1 lukem # Public License. 10 1.1 lukem # 11 1.1 lukem # A copy of this license is available in the file LICENSE in the 12 1.1 lukem # top-level directory of the distribution or, alternatively, at 13 1.1 lukem # <http://www.OpenLDAP.org/license.html>. 14 1.1 lukem 15 1.1 lukem # Path to the OpenLDAP source tree 16 1.1.1.4 tron LDAP_SRC=../../.. 17 1.1 lukem 18 1.1 lukem # Path to the OpenLDAP object tree - same as above unless 19 1.1 lukem # you're doing out-of-tree builds. 20 1.1.1.5 christos LDAP_BUILD=$(LDAP_SRC) 21 1.1 lukem 22 1.1.1.4 tron LDAP_INC = -I$(LDAP_BUILD)/include -I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd 23 1.1.1.9 christos LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ 24 1.1.1.4 tron $(LDAP_BUILD)/libraries/liblber/liblber.la 25 1.1 lukem 26 1.1.1.3 adam NLDAPD_INC=-Inss-pam-ldapd 27 1.1 lukem 28 1.1.1.4 tron LIBTOOL = $(LDAP_BUILD)/libtool 29 1.1.1.9 christos INSTALL = /usr/bin/install 30 1.1.1.9 christos OPT = -g -O2 31 1.1.1.4 tron CC = gcc 32 1.1.1.4 tron DEFS = 33 1.1.1.4 tron INCS = $(LDAP_INC) $(NLDAPD_INC) 34 1.1.1.4 tron LIBS = $(LDAP_LIB) 35 1.1 lukem 36 1.1.1.2 lukem prefix=/usr/local 37 1.1.1.2 lukem exec_prefix=$(prefix) 38 1.1.1.2 lukem ldap_subdir=/openldap 39 1.1.1.2 lukem 40 1.1.1.2 lukem libdir=$(exec_prefix)/lib 41 1.1.1.2 lukem libexecdir=$(exec_prefix)/libexec 42 1.1.1.2 lukem moduledir = $(libexecdir)$(ldap_subdir) 43 1.1.1.2 lukem sysconfdir = $(prefix)/etc$(ldap_subdir) 44 1.1.1.2 lukem schemadir = $(sysconfdir)/schema 45 1.1.1.9 christos mandir = $(exec_prefix)/share/man 46 1.1.1.9 christos man5dir = $(mandir)/man5 47 1.1.1.2 lukem 48 1.1.1.3 adam all: nssov.la 49 1.1 lukem 50 1.1 lukem XOBJS = tio.lo 51 1.1 lukem 52 1.1 lukem OBJS = alias.lo ether.lo group.lo host.lo netgroup.lo network.lo \ 53 1.1.1.2 lukem nssov.lo passwd.lo protocol.lo rpc.lo service.lo shadow.lo pam.lo 54 1.1 lukem 55 1.1.1.9 christos MANPAGES = slapo-nssov.5 56 1.1.1.9 christos 57 1.1 lukem .SUFFIXES: .c .o .lo 58 1.1 lukem 59 1.1 lukem .c.lo: 60 1.1.1.9 christos $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(OPT) $(CPPFLAGS) $(DEFS) $(INCS) -c $< 61 1.1 lukem 62 1.1.1.3 adam tio.lo: nss-pam-ldapd/tio.c 63 1.1.1.9 christos $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(OPT) $(CPPFLAGS) $(DEFS) $(INCS) -c $? 64 1.1 lukem 65 1.1 lukem $(OBJS): nssov.h 66 1.1 lukem 67 1.1 lukem nssov.la: $(OBJS) $(XOBJS) 68 1.1.1.9 christos $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-info 0:0:0 \ 69 1.1.1.5 christos -rpath $(moduledir) -module -o $@ $(OBJS) $(XOBJS) $(LIBS) 70 1.1.1.2 lukem 71 1.1.1.9 christos install: install-lib install-man FORCE 72 1.1.1.9 christos 73 1.1.1.9 christos install-lib: nssov.la 74 1.1.1.2 lukem mkdir -p $(DESTDIR)$(moduledir) 75 1.1.1.2 lukem $(LIBTOOL) --mode=install cp nssov.la $(DESTDIR)$(moduledir) 76 1.1.1.2 lukem cp ldapns.schema $(DESTDIR)$(schemadir) 77 1.1.1.2 lukem 78 1.1.1.9 christos install-man: $(MANPAGES) 79 1.1.1.9 christos mkdir -p $(DESTDIR)$(man5dir) 80 1.1.1.9 christos $(INSTALL) -m 644 $(MANPAGES) $(DESTDIR)$(man5dir) 81 1.1.1.9 christos 82 1.1.1.9 christos FORCE: 83 1.1.1.9 christos 84 1.1.1.2 lukem clean: 85 1.1.1.2 lukem rm -f *.*o *.la .libs/* 86 1.1.1.3 adam rm -rf .libs 87