# $OpenLDAP: pkg/ldap/contrib/slapd-modules/smbk5pwd/Makefile,v 1.1.6.4 2009/10/02 21:16:53 quanah Exp $ # This work is part of OpenLDAP Software . # # Copyright 1998-2009 The OpenLDAP Foundation. # Copyright 2004 Howard Chu, Symas Corp. All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted only as authorized by the OpenLDAP # Public License. # # A copy of this license is available in the file LICENSE in the # top-level directory of the distribution or, alternatively, at # . LDAP_SRC=../../.. LDAP_BUILD=/usr/src/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45-abi_x86_64.amd64 LDAP_INC=-I$(LDAP_BUILD)/include -I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd SSL_INC= SSL_LIB=-L/usr/lib64 -lgnutls -lgcrypt #-lgmp -lunistring -lidn2 -lnettle -lhogweed -ltasn1 -lp11-kit -lz LIBTOOL=$(LDAP_BUILD)/libtool CC=gcc OPT=-g -O2 -DHAVE_GNUTLS CLNT_OPT=-DSMBKRB5PWD_KADM5_CLNT SRV_OPT=-DSMBKRB5PWD_KADM5_SRV MIT_KRB5_INC=-I/usr/include MIT_KRB5_LIB=-L/usr/lib64 -lkrb5 -lk5crypto -lcom_err DEFS= INCS=$(LDAP_INC) $(MIT_KRB5_INC) $(SSL_INC) MIT_KRB5_SRV_LIB=-L/usr/lib64 -lkadm5srv_mit -lkdb5 -lgssrpc -lgssapi_krb5 -lkrb5support -lkeyutils -lresolv -lpthread MIT_KRB5_CLNT_LIB=-L/usr/lib64 -lkadm5clnt_mit -lgssrpc -lgssapi_krb5 -lkrb5support -lkeyutils -lresolv -lpthread LDAP_LIB=-L/usr/src/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45-abi_x86_64.amd64/libraries/libldap_r/.libs -lldap_r \ -L/usr/src/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45-abi_x86_64.amd64/libraries/liblber/.libs -llber LIBS=$(LDAP_LIB) $(MIT_KRB5_LIB) $(SSL_LIB) prefix=/usr ldap_subdir=/openldap libdir=$(prefix)/lib64 libexecdir=$(prefix)/lib64/openldap moduledir=$(libexecdir)$(ldap_subdir) .PHONY: all all: smbkrb5pwd.la smbkrb5pwd_srv.la smbkrb5pwd.lo: smbkrb5pwd.c $(LIBTOOL) --mode=compile $(CC) $(CLNT_OPT) $(OPT) $(DEFS) $(INCS) -c $? smbkrb5pwd.la: smbkrb5pwd.lo $(LIBTOOL) --mode=link $(CC) $(MIT_KRB5_CLNT_LIB) $(OPT) -version-info 0:1:0 \ -rpath $(moduledir) -module -o $@ $? $(LIBS) $(MIT_KRB5_CLNT_LIB) smbkrb5pwd_srv.lo: smbkrb5pwd.c $(LIBTOOL) --mode=compile $(CC) $(SRV_OPT) $(OPT) $(DEFS) $(INCS) -c smbkrb5pwd.c -o smbkrb5pwd_srv.o smbkrb5pwd_srv.la: smbkrb5pwd_srv.lo $(LIBTOOL) --mode=link $(CC) $(MIT_KRB5_SRV_LIB) $(OPT) -version-info 0:0:0 \ -rpath $(moduledir) -module -o $@ $? $(LIBS) $(MIT_KRB5_SRV_LIB) .PHONY: clean clean: rm -f smbkrb5pwd.lo smbkrb5pwd.la smbkrb5pwd_srv.lo smbkrb5pwd_srv.la .PHONY: install install: smbkrb5pwd.la mkdir -p $(DESTDIR)$(moduledir) $(LIBTOOL) --mode=install cp smbkrb5pwd.la $(DESTDIR)$(moduledir) $(LIBTOOL) --mode=install cp smbkrb5pwd_srv.la $(DESTDIR)$(moduledir)