X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=contrib%2Fslapd-modules%2Fsamba4%2FMakefile;h=0d839eec73c39b41f8237c602b143b66e307e2dc;hb=06e7a0f6992cf2016f8f5aaadb19334753eb363a;hp=a11a5d39faa0af628e5d67ba9114ffa8ba2b84b5;hpb=321b0fa93e6a8841cba23fac8663802d2d17a8c7;p=openldap diff --git a/contrib/slapd-modules/samba4/Makefile b/contrib/slapd-modules/samba4/Makefile index a11a5d39fa..0d839eec73 100644 --- a/contrib/slapd-modules/samba4/Makefile +++ b/contrib/slapd-modules/samba4/Makefile @@ -1,7 +1,7 @@ # $OpenLDAP$ # This work is part of OpenLDAP Software . # -# Copyright 1998-2012 The OpenLDAP Foundation. +# Copyright 1998-2013 The OpenLDAP Foundation. # Copyright 2004 Howard Chu, Symas Corp. All Rights Reserved. # # Redistribution and use in source and binary forms, with or without @@ -12,22 +12,23 @@ # top-level directory of the distribution or, alternatively, at # . -LDAP_SRC=../../.. -# craft according to your installation -LDAP_BUILD=../../.. +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 = $(LDAP_BUILD)/libtool +CC = gcc +OPT = -g -O2 -Wall +DEFS = -DSLAPD_OVER_RDNVAL=SLAPD_MOD_DYNAMIC \ + -DSLAPD_OVER_PGUID=SLAPD_MOD_DYNAMIC \ + -DSLAPD_OVER_VERNUM=SLAPD_MOD_DYNAMIC +INCS = $(LDAP_INC) +LIBS = $(LDAP_LIB) -LIBTOOL=$(LDAP_BUILD)/libtool -OPT=-g -O2 -CC=gcc - -DEFS=-DSLAPD_OVER_RDNVAL=2 -DSLAPD_OVER_PGUID=2 -DSLAPD_OVER_VERNUM=2 - -LDAP_INC=-I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd \ - -I$(LDAP_BUILD)/include -INCS=$(LDAP_INC) - -LDAP_LIB=-lldap_r -llber -LIBS=$(LDAP_LIB) +PROGRAMS = pguid.la rdnval.la vernum.la +LTVER = 0:0:0 prefix=/usr/local exec_prefix=$(prefix) @@ -37,36 +38,27 @@ libdir=$(exec_prefix)/lib libexecdir=$(exec_prefix)/libexec moduledir = $(libexecdir)$(ldap_subdir) -PROGRAMS = pguid.la rdnval.la vernum.la +.SUFFIXES: .c .o .lo -all: $(PROGRAMS) +.c.lo: + $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $< -pguid.lo: pguid.c - $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $? +all: $(PROGRAMS) -pguid.la: pguid.lo - $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \ +pguid.la: pguid.lo + $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \ -rpath $(moduledir) -module -o $@ $? $(LIBS) -rdnval.lo: rdnval.c - $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $? - -rdnval.la: rdnval.lo - $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \ +rdnval.la: rdnval.lo + $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \ -rpath $(moduledir) -module -o $@ $? $(LIBS) -vernum.lo: vernum.c - $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $? - -vernum.la: vernum.lo - $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \ +vernum.la: vernum.lo + $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \ -rpath $(moduledir) -module -o $@ $? $(LIBS) clean: - rm -f \ - pguid.o pguid.lo pguid.la \ - rdnval.o rdnval.lo rdnval.la \ - vernum.o vernum.lo vernum.la + rm -rf *.o *.lo *.la .libs install: $(PROGRAMS) mkdir -p $(DESTDIR)$(moduledir)