1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
11# OpenOffice.org is free software: you can redistribute it and/or modify
12# it under the terms of the GNU Lesser General Public License version 3
13# only, as published by the Free Software Foundation.
14#
15# OpenOffice.org is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18# GNU Lesser General Public License version 3 for more details
19# (a copy is included in the LICENSE file that accompanied this code).
20#
21# You should have received a copy of the GNU Lesser General Public License
22# version 3 along with OpenOffice.org.  If not, see
23# <http://www.openoffice.org/license.html>
24# for a copy of the LGPLv3 License.
25#
26#*************************************************************************
27
28PRJ=..$/..$/..
29
30PRJNAME=extensions
31TARGET=ldapbe
32ENABLE_EXCEPTIONS=TRUE
33
34# Version
35LDAP_MAJOR=2
36
37# --- Settings ---
38
39.INCLUDE : settings.mk
40DLLPRE =
41
42.IF "$(WITH_LDAP)" != "YES"
43@all:
44	@echo "LDAP disabled."
45.ENDIF
46
47.IF "$(LDAPSDKINCLUDES)" == ""
48
49.IF "$(SYSTEM_MOZILLA)" == "YES" && "$(WITH_OPENLDAP)" != "YES"
50LDAPSDKINCLUDES = $(MOZ_LDAP_CFLAGS)
51.ELSE
52LDAPSDKINCLUDES = -I$(SOLARINCDIR)$/mozilla
53.ENDIF
54.ENDIF
55
56.IF "$(WITH_OPENLDAP)" == "YES"
57CFLAGS += -DWITH_OPENLDAP -DLDAP_DEPRECATED
58.ENDIF
59
60SOLARINC+= $(LDAPSDKINCLUDES)
61# --- Files ---
62
63
64SLOFILES=\
65	$(SLO)$/ldapuserprofilebe.obj \
66	$(SLO)$/ldapaccess.obj	\
67	$(SLO)$/componentdef.obj
68
69LIB1TARGET=$(SLB)$/_$(TARGET).lib
70LIB1OBJFILES=$(SLOFILES)
71
72SHL1TARGET=$(TARGET)$(LDAP_MAJOR).uno
73SHL1DEF=$(MISC)$/$(SHL1TARGET).def
74SHL1LIBS=$(LIB1TARGET)
75SHL1IMPLIB=i$(SHL1TARGET)
76SHL1STDLIBS=    \
77        $(CPPUHELPERLIB) \
78        $(CPPULIB) \
79        $(SALHELPERLIB) \
80        $(SALLIB)
81.IF "$(OS)"=="FREEBSD"
82SHL1STDLIBS+=-lcompat
83# workaround for FreeBSD, which needs -llber50, too
84.IF "$(WITH_OPENLDAP)" != "YES"
85SHL1STDLIBS+=-Wl,-Bstatic -llber50
86.ENDIF
87.ENDIF
88
89DEF1NAME=$(SHL1TARGET)
90DEF1EXPORTFILE=exports.dxp
91DEF1DES=Configuration: LDAP User Profile Backend
92
93# --- Targets ---
94
95.INCLUDE : target.mk
96.INCLUDE :  $(PRJ)$/util$/target.pmk
97
98
99ALLTAR : $(MISC)/ldapbe2.component
100
101$(MISC)/ldapbe2.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
102        ldapbe2.component
103    $(XSLTPROC) --nonet --stringparam uri \
104        '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
105        $(SOLARENV)/bin/createcomponent.xslt ldapbe2.component
106