xref: /trunk/main/xmlsecurity/util/makefile.mk (revision 7871dc3e)
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=xmlsecurity
27TARGET=xmlsecurity
28
29# Disable '-z defs' due to broken libxpcom.
30#LINKFLAGSDEFS=$(0)
31USE_DEFFILE=TRUE
32
33# --- Settings -----------------------------------------------------
34
35.INCLUDE :  settings.mk
36.INCLUDE :	$(PRJ)$/util$/target.pmk
37
38.IF "$(WITH_MOZILLA)" == "NO"
39@all:
40	@echo "No mozilla -> no nss -> no libxmlsec -> no xmlsecurity..."
41.ENDIF
42
43# --- Files --------------------------------------------------------
44
45BMP_IN=$(PRJ)$/res
46
47# --- Shared-Library -----------------------------------------------
48
49#
50# The 1st shared library
51#
52SHL1NAME=xsec_fw
53SHL1TARGET= $(SHL1NAME)
54SHL1LIBS= $(SLB)$/fw.lib
55
56SHL1STDLIBS +=		\
57	$(SALLIB)		\
58	$(CPPULIB)		\
59	$(CPPUHELPERLIB)
60
61SHL1IMPLIB = $(SHL1TARGET)
62SHL1DEF = $(MISC)$/$(SHL1TARGET).def
63DEF1NAME = $(SHL1TARGET)
64DEF1EXPORTFILE = xsec_fw.dxp
65
66#
67# The 2nd shared library
68#
69
70SHL2NAME=xsec_xmlsec
71SHL2TARGET= $(SHL2NAME)
72
73
74.IF "$(ENABLE_NSS_MODULE)"=="YES" || "$(SYSTEM_MOZILLA)" == "YES"
75
76SHL2LIBS= \
77	$(SLB)$/xs_comm.lib
78
79.IF "$(CRYPTO_ENGINE)" == "mscrypto"
80SHL2LIBS += \
81	$(SLB)$/xs_mscrypt.lib
82.ENDIF
83
84SHL2LIBS += \
85	$(SLB)$/xs_nss.lib
86
87.ENDIF
88
89
90SHL2STDLIBS +=			\
91	$(SALLIB)			\
92	$(CPPULIB)			\
93	$(CPPUHELPERLIB)	\
94	$(SALLIB)	\
95	$(SVLLIB)			\
96	$(TOOLSLIB)			\
97	$(COMPHELPERLIB)	\
98	$(CPPUHELPERLIB)	\
99	$(XMLOFFLIB)
100
101.IF "$(OS)"=="SOLARIS"
102SHL2STDLIBS +=-ldl
103.ENDIF
104
105.IF "$(SYSTEM_MOZILLA)" == "YES"
106.IF "$(NSPR_LIB)" != ""
107SHL2STDLIBS += $(NSPR_LIB)
108.ENDIF
109.IF "$(NSS_LIB)" != ""
110SHL2STDLIBS += $(NSS_LIB)
111.ENDIF
112.ENDIF
113
114.IF "$(CRYPTO_ENGINE)" == "mscrypto"
115SHL2STDLIBS+= $(MSCRYPTOLIBS)
116# SHL2STDLIBS+= $(XMLSECLIB) $(LIBXML2LIB) $(NSS3LIB) $(NSPR4LIB) $(PLC4LIB)
117SHL2STDLIBS+= $(NSS3LIB) $(NSPR4LIB)
118.ELSE
119SHL2STDLIBS+= $(NSSCRYPTOLIBS)
120.ENDIF
121
122
123SHL2IMPLIB = $(SHL2TARGET)
124SHL2DEF = $(MISC)$/$(SHL2TARGET).def
125DEF2NAME = $(SHL2TARGET)
126.IF "$(CRYPTO_ENGINE)" == "mscrypto"
127DEF2EXPORTFILE = exports_xsmscrypt.dxp
128.ENDIF
129
130DEF2EXPORTFILE = exports_xsnss.dxp
131
132SRSFILELIST=	\
133                $(SRS)$/component.srs   \
134                $(SRS)$/dialogs.srs
135
136RESLIB1NAME=xmlsec
137RESLIB1IMAGES=$(PRJ)$/res
138RESLIB1SRSFILES= $(SRSFILELIST)
139
140SHL4TARGET=$(TARGET)
141SHL4LIBS=\
142                $(SLB)$/helper.lib      \
143                $(SLB)$/dialogs.lib     \
144                $(SLB)$/component.lib
145
146SHL4STDLIBS=\
147                $(CPPULIB)			\
148				$(CPPUHELPERLIB)	\
149				$(COMPHELPERLIB)	\
150				$(UCBHELPERLIB)	    \
151				$(UNOTOOLSLIB)	    \
152				$(VCLLIB)			\
153				$(TOOLSLIB) 		\
154				$(SVTOOLLIB) 		\
155				$(SALLIB)			\
156				$(SVLLIB)			\
157				$(XMLOFFLIB)		\
158				$(SVXCORELIB)
159
160SHL4VERSIONMAP = $(SOLARENV)/src/component.map
161SHL4DEPN=
162SHL4IMPLIB=i$(TARGET)
163SHL4DEF=$(MISC)$/$(SHL4TARGET).def
164DEF4NAME=$(SHL4TARGET)
165
166# --- Targets ----------------------------------------------------------
167
168.INCLUDE :  target.mk
169
170# --- Filter -----------------------------------------------------------
171
172$(MISC)$/$(SHL3TARGET).flt: makefile.mk
173	$(TYPE) $(SHL3TARGET).flt > $@
174
175ALLTAR : \
176    $(MISC)/xmlsecurity.component \
177    $(MISC)/xsec_fw.component \
178    $(MISC)/xsec_xmlsec.component
179
180.IF "$(OS)" == "WNT"
181my_platform = .windows
182.END
183
184$(MISC)/xmlsecurity.component .ERRREMOVE : \
185        $(SOLARENV)/bin/createcomponent.xslt xmlsecurity.component
186    $(XSLTPROC) --nonet --stringparam uri \
187        '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL4TARGETN:f)' -o $@ \
188        $(SOLARENV)/bin/createcomponent.xslt xmlsecurity.component
189
190$(MISC)/xsec_fw.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
191        xsec_fw.component
192    $(XSLTPROC) --nonet --stringparam uri \
193        '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
194        $(SOLARENV)/bin/createcomponent.xslt xsec_fw.component
195
196$(MISC)/xsec_xmlsec.component .ERRREMOVE : \
197        $(SOLARENV)/bin/createcomponent.xslt xsec_xmlsec.component
198    $(XSLTPROC) --nonet --stringparam uri \
199        '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \
200        $(SOLARENV)/bin/createcomponent.xslt xsec_xmlsec$(my_platform).component
201