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