X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=contrib%2Fslapd-modules%2Fallowed%2FMakefile;h=5858d072c0112cc914096ed65f5f6d54b0babb3b;hb=ef3b4213ff3fb8dafe3477fc9006ca13b9f7d168;hp=8f5be91f0f25d1f88b5ce3c0ca222962d6feb52e;hpb=ee3f05000055619ec6d4eee48b57fa5cb6085127;p=openldap diff --git a/contrib/slapd-modules/allowed/Makefile b/contrib/slapd-modules/allowed/Makefile index 8f5be91f0f..5858d072c0 100644 --- a/contrib/slapd-modules/allowed/Makefile +++ b/contrib/slapd-modules/allowed/Makefile @@ -1,7 +1,7 @@ # $OpenLDAP$ # This work is part of OpenLDAP Software . # -# Copyright 1998-2011 The OpenLDAP Foundation. +# Copyright 1998-2012 The OpenLDAP Foundation. # Copyright 2004 Howard Chu, Symas Corp. All Rights Reserved. # # Redistribution and use in source and binary forms, with or without @@ -12,35 +12,47 @@ # top-level directory of the distribution or, alternatively, at # . -PREFIX=/opt/openldap-HEAD +LDAP_SRC = ../../.. +LDAP_BUILD = ../../.. +LDAP_INC = -I$(LDAP_BUILD)/include -I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd +LDAP_LIB = $(LDAP_BUILD)/libraries/libldap_r/libldap_r.la \ + $(LDAP_BUILD)/libraries/liblber/liblber.la -LIBTOOL=../../../libtool -OPT=-g -O2 -CC=gcc +LIBTOOL = $(LDAP_BUILD)/libtool +CC = gcc +OPT = -g -O2 -Wall +DEFS = -DSLAPD_OVER_ALLOWED=SLAPD_MOD_DYNAMIC +INCS = $(LDAP_INC) +LIBS = $(LDAP_LIB) -DEFS=-DSLAPD_OVER_ALLOWED=SLAPD_MOD_DYNAMIC +PROGRAMS = allowed.la +LTVER = 0:0:0 -LDAP_INC=-I../../../include -I../../../servers/slapd -INCS=$(LDAP_INC) +prefix=/usr/local +exec_prefix=$(prefix) +ldap_subdir=/openldap -LDAP_LIB=-lldap_r -llber -L../../../lib -LDAP_LIB= -LIBS=$(LDAP_LIB) +libdir=$(exec_prefix)/lib +libexecdir=$(exec_prefix)/libexec +moduledir = $(libexecdir)$(ldap_subdir) -all: allowed.la +.SUFFIXES: .c .o .lo +.c.lo: + $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $< -allowed.lo: allowed.c - $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $? +all: $(PROGRAMS) -allowed.la: allowed.lo - $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \ - -rpath $(PREFIX)/lib -module -o $@ $? $(LIBS) +allowed.la: allowed.lo + $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \ + -rpath $(moduledir) -module -o $@ $? $(LIBS) clean: - rm -f allowed.o allowed.lo allowed.la + rm -rf *.o *.lo *.la .libs + +install: $(PROGRAMS) + mkdir -p $(DESTDIR)$(moduledir) + for p in $(PROGRAMS) ; do \ + $(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(moduledir) ; \ + done -install: allowed.la - mkdir -p $(PREFIX)/libexec/openldap - $(LIBTOOL) --mode=install cp allowed.la $(PREFIX)/libexec/openldap - $(LIBTOOL) --finish $(PREFIX)/libexec/openldap