1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23
24PRJ=..$/..$/..
25
26PRJNAME=extensions
27TARGET=ldapbe
28ENABLE_EXCEPTIONS=TRUE
29
30# Version
31LDAP_MAJOR=2
32
33# --- Settings ---
34
35.INCLUDE : settings.mk
36DLLPRE =
37
38.IF "$(WITH_LDAP)" != "YES"
39@all:
40	@echo "LDAP disabled."
41.ENDIF
42
43.IF "$(LDAPSDKINCLUDES)" == ""
44
45.IF "$(SYSTEM_MOZILLA)" == "YES" && "$(WITH_OPENLDAP)" != "YES"
46LDAPSDKINCLUDES = $(MOZ_LDAP_CFLAGS)
47.ELSE
48LDAPSDKINCLUDES = -I$(SOLARINCDIR)$/mozilla
49.ENDIF
50.ENDIF
51
52.IF "$(WITH_OPENLDAP)" == "YES"
53CFLAGS += -DWITH_OPENLDAP -DLDAP_DEPRECATED
54.ENDIF
55
56SOLARINC+= $(LDAPSDKINCLUDES)
57# --- Files ---
58
59
60SLOFILES=\
61	$(SLO)$/ldapuserprofilebe.obj \
62	$(SLO)$/ldapaccess.obj	\
63	$(SLO)$/componentdef.obj
64
65LIB1TARGET=$(SLB)$/_$(TARGET).lib
66LIB1OBJFILES=$(SLOFILES)
67
68SHL1TARGET=$(TARGET)$(LDAP_MAJOR).uno
69SHL1DEF=$(MISC)$/$(SHL1TARGET).def
70SHL1LIBS=$(LIB1TARGET)
71SHL1IMPLIB=i$(SHL1TARGET)
72SHL1STDLIBS=    \
73        $(CPPUHELPERLIB) \
74        $(CPPULIB) \
75        $(SALHELPERLIB) \
76        $(SALLIB)
77.IF "$(OS)"=="FREEBSD"
78SHL1STDLIBS+=-lcompat
79# workaround for FreeBSD, which needs -llber50, too
80.IF "$(WITH_OPENLDAP)" != "YES"
81SHL1STDLIBS+=-Wl,-Bstatic -llber50 -Wl,-Bdynamic
82.ENDIF
83.ENDIF
84
85DEF1NAME=$(SHL1TARGET)
86DEF1EXPORTFILE=exports.dxp
87DEF1DES=Configuration: LDAP User Profile Backend
88
89# --- Targets ---
90
91.INCLUDE : target.mk
92.INCLUDE :  $(PRJ)$/util$/target.pmk
93
94
95ALLTAR : $(MISC)/ldapbe2.component
96
97$(MISC)/ldapbe2.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
98        ldapbe2.component
99    $(XSLTPROC) --nonet --stringparam uri \
100        '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
101        $(SOLARENV)/bin/createcomponent.xslt ldapbe2.component
102