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 "$(ENABLE_NSS_MODULE)" != "YES" 39@all: 40 @echo "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 71.IF "$(GUI)"=="OS2" 72SHL2NAME=xsec_xs 73.ENDIF 74SHL2TARGET= $(SHL2NAME) 75 76 77SHL2LIBS= \ 78 $(SLB)$/xs_comm.lib 79 80.IF "$(CRYPTO_ENGINE)" == "mscrypto" 81SHL2LIBS += \ 82 $(SLB)$/xs_mscrypt.lib 83.ENDIF 84 85SHL2LIBS += \ 86 $(SLB)$/xs_nss.lib 87 88 89SHL2STDLIBS += \ 90 $(SALLIB) \ 91 $(CPPULIB) \ 92 $(CPPUHELPERLIB) \ 93 $(SALLIB) \ 94 $(SVLLIB) \ 95 $(TOOLSLIB) \ 96 $(COMPHELPERLIB) \ 97 $(CPPUHELPERLIB) \ 98 $(XMLOFFLIB) 99 100.IF "$(OS)"=="SOLARIS" 101SHL2STDLIBS +=-ldl 102.ENDIF 103 104.IF "$(ENABLE_NSS_MODULE)"=="YES" 105.IF "$(SYSTEM_NSS)"!="YES" 106.IF "$(NSPR_LIB)" != "" 107SHL2STDLIBS += $(NSPR_LIB) 108.ENDIF 109.IF "$(NSS_LIB)" != "" 110SHL2STDLIBS += $(NSS_LIB) 111.ENDIF 112.ELSE 113SHL2STDLIBS += $(NSS_LIBS) 114.ENDIF 115.ENDIF 116 117.IF "$(CRYPTO_ENGINE)" == "mscrypto" 118SHL2STDLIBS+= $(MSCRYPTOLIBS) 119# SHL2STDLIBS+= $(XMLSECLIB) $(LIBXML2LIB) $(NSS3LIB) $(NSPR4LIB) $(PLC4LIB) 120SHL2STDLIBS+= $(NSS3LIB) $(NSPR4LIB) 121.ELIF "$(OS)$(SYSTEM_LIBXML)"=="MACOSXYES" 122# The macOS shared-library link template (tg_shl.mk) always searches 123# $(SOLARLIB) -- which includes /usr/lib -- before any of this makefile's 124# own libs, and the SDK bundles its own older libxml2 under /usr/lib. A 125# plain "-lxml2" (as pulled in by NSSCRYPTOLIBS via LIBXML2LIB) resolves 126# to that bundled copy instead of the configured --with-system-libxml one, 127# and it is missing symbols (xmlCtxtPushInput, xmlXPathValuePush) that 128# xmlsec1 needs. Link the intended libxml2 statically by absolute path 129# so the search order can't shadow it and no dylib needs to be bundled. 130XMLSECURITY_SYSTEM_LIBXML2:=$(shell xml2-config --prefix)/lib/libxml2.a 131SHL2STDLIBS+= $(XMLSECLIB-NSS) $(XMLSECLIB) $(XMLSECURITY_SYSTEM_LIBXML2) $(NSS3LIB) $(NSPR4LIB) $(PLC4LIB) 132.ELSE 133SHL2STDLIBS+= $(NSSCRYPTOLIBS) 134.ENDIF 135 136 137SHL2IMPLIB = $(SHL2TARGET) 138SHL2DEF = $(MISC)$/$(SHL2TARGET).def 139DEF2NAME = $(SHL2TARGET) 140.IF "$(CRYPTO_ENGINE)" == "mscrypto" 141DEF2EXPORTFILE = exports_xsmscrypt.dxp 142.ENDIF 143 144DEF2EXPORTFILE = exports_xsnss.dxp 145 146SRSFILELIST= \ 147 $(SRS)$/component.srs \ 148 $(SRS)$/dialogs.srs 149 150RESLIB1NAME=xmlsec 151RESLIB1IMAGES=$(PRJ)$/res 152RESLIB1SRSFILES= $(SRSFILELIST) 153 154SHL4TARGET=$(TARGET) 155.IF "$(GUI)"=="OS2" 156SHL4TARGET=xmlsecur 157.ENDIF 158SHL4LIBS=\ 159 $(SLB)$/helper.lib \ 160 $(SLB)$/dialogs.lib \ 161 $(SLB)$/component.lib 162 163SHL4STDLIBS=\ 164 $(CPPULIB) \ 165 $(CPPUHELPERLIB) \ 166 $(COMPHELPERLIB) \ 167 $(UCBHELPERLIB) \ 168 $(UNOTOOLSLIB) \ 169 $(VCLLIB) \ 170 $(TOOLSLIB) \ 171 $(SVTOOLLIB) \ 172 $(SALLIB) \ 173 $(SVLLIB) \ 174 $(XMLOFFLIB) \ 175 $(SVXCORELIB) 176 177SHL4VERSIONMAP = $(SOLARENV)/src/component.map 178SHL4DEPN= 179SHL4IMPLIB=i$(TARGET) 180SHL4DEF=$(MISC)$/$(SHL4TARGET).def 181DEF4NAME=$(SHL4TARGET) 182 183# --- Targets ---------------------------------------------------------- 184 185.INCLUDE : target.mk 186 187# --- Filter ----------------------------------------------------------- 188 189$(MISC)$/$(SHL3TARGET).flt: makefile.mk 190 $(TYPE) $(SHL3TARGET).flt > $@ 191 192ALLTAR : \ 193 $(MISC)/xmlsecurity.component \ 194 $(MISC)/xsec_fw.component \ 195 $(MISC)/xsec_xmlsec.component 196 197.IF "$(OS)" == "WNT" 198my_platform = .windows 199.END 200 201$(MISC)/xmlsecurity.component .ERRREMOVE : \ 202 $(SOLARENV)/bin/createcomponent.xslt xmlsecurity.component 203 $(XSLTPROC) --nonet --stringparam uri \ 204 '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL4TARGETN:f)' -o $@ \ 205 $(SOLARENV)/bin/createcomponent.xslt xmlsecurity.component 206 207$(MISC)/xsec_fw.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ 208 xsec_fw.component 209 $(XSLTPROC) --nonet --stringparam uri \ 210 '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ 211 $(SOLARENV)/bin/createcomponent.xslt xsec_fw.component 212 213$(MISC)/xsec_xmlsec.component .ERRREMOVE : \ 214 $(SOLARENV)/bin/createcomponent.xslt xsec_xmlsec.component 215 $(XSLTPROC) --nonet --stringparam uri \ 216 '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \ 217 $(SOLARENV)/bin/createcomponent.xslt xsec_xmlsec$(my_platform).component 218