xref: /trunk/main/libxmlsec/makefile.mk (revision cdf0e10c)
1*cdf0e10cSrcweir#*************************************************************************
2*cdf0e10cSrcweir#
3*cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir#
5*cdf0e10cSrcweir# Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir#
7*cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir#
9*cdf0e10cSrcweir# This file is part of OpenOffice.org.
10*cdf0e10cSrcweir#
11*cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir# only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir#
15*cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir#
21*cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir# version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir# <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir# for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir#
26*cdf0e10cSrcweir#*************************************************************************
27*cdf0e10cSrcweir
28*cdf0e10cSrcweirPRJ=.
29*cdf0e10cSrcweir
30*cdf0e10cSrcweirPRJNAME=xmlsec1
31*cdf0e10cSrcweirTARGET=so_xmlsec1
32*cdf0e10cSrcweirEXTERNAL_WARNINGS_NOT_ERRORS := TRUE
33*cdf0e10cSrcweir
34*cdf0e10cSrcweir# --- Settings -----------------------------------------------------
35*cdf0e10cSrcweir
36*cdf0e10cSrcweir.INCLUDE :	settings.mk
37*cdf0e10cSrcweir
38*cdf0e10cSrcweir.IF "$(WITH_MOZILLA)" == "NO"
39*cdf0e10cSrcweir@all:
40*cdf0e10cSrcweir	@echo "Mozilla disabled -> no nss -> no libxmlsec...."
41*cdf0e10cSrcweir.ENDIF
42*cdf0e10cSrcweir
43*cdf0e10cSrcweir# --- Files --------------------------------------------------------
44*cdf0e10cSrcweir
45*cdf0e10cSrcweirXMLSEC1VERSION=1.2.14
46*cdf0e10cSrcweir
47*cdf0e10cSrcweirTARFILE_NAME=$(PRJNAME)-$(XMLSEC1VERSION)
48*cdf0e10cSrcweirTARFILE_MD5=1f24ab1d39f4a51faf22244c94a6203f
49*cdf0e10cSrcweir
50*cdf0e10cSrcweir#xmlsec1-configure.patch: Set up the build. Straightforward configuration
51*cdf0e10cSrcweir#xmlsec1-configure-libxml-libxslt.patch: empty "$with_libxml" prepends /bin :-(
52*cdf0e10cSrcweir#xmlsec1-olderlibxml2.patch: Allow build against older libxml2, for macosx
53*cdf0e10cSrcweir#xmlsec1-nssdisablecallbacks.patch: Disable use of smime3 so don't need to package it
54*cdf0e10cSrcweir#xmlsec1-customkeymanage.patch: Could we do this alternatively outside xmlsec
55*cdf0e10cSrcweir#xmlsec1-nssmangleciphers.patch: Dubious, do we still need this ?
56*cdf0e10cSrcweir#xmlsec1-noverify.patch: As per readme.txt.
57*cdf0e10cSrcweir#xmlsec1-mingw32.patch: Mingw32 support.
58*cdf0e10cSrcweir#xmlsec1-mingw-customkeymanage-addmscrypto.patch builds the custom keymanager on mingw
59*cdf0e10cSrcweirPATCH_FILES=\
60*cdf0e10cSrcweir   xmlsec1-configure.patch \
61*cdf0e10cSrcweir   xmlsec1-configure-libxml-libxslt.patch \
62*cdf0e10cSrcweir   xmlsec1-olderlibxml2.patch \
63*cdf0e10cSrcweir   xmlsec1-nssdisablecallbacks.patch \
64*cdf0e10cSrcweir   xmlsec1-customkeymanage.patch \
65*cdf0e10cSrcweir   xmlsec1-nssmangleciphers.patch \
66*cdf0e10cSrcweir   xmlsec1-noverify.patch \
67*cdf0e10cSrcweir   xmlsec1-mingw32.patch \
68*cdf0e10cSrcweir   xmlsec1-mingw-keymgr-mscrypto.patch
69*cdf0e10cSrcweir
70*cdf0e10cSrcweir
71*cdf0e10cSrcweirADDITIONAL_FILES= \
72*cdf0e10cSrcweir    include$/xmlsec$/mscrypto$/akmngr.h \
73*cdf0e10cSrcweir    src$/mscrypto$/akmngr.c \
74*cdf0e10cSrcweir    include$/xmlsec$/nss$/akmngr.h \
75*cdf0e10cSrcweir    include$/xmlsec$/nss$/ciphers.h \
76*cdf0e10cSrcweir    include$/xmlsec$/nss$/tokens.h \
77*cdf0e10cSrcweir    src$/nss$/akmngr.c \
78*cdf0e10cSrcweir    src$/nss$/keywrapers.c \
79*cdf0e10cSrcweir    src$/nss$/tokens.c
80*cdf0e10cSrcweir
81*cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
82*cdf0e10cSrcweirCRYPTOLIB=mscrypto
83*cdf0e10cSrcweir#CRYPTOLIB=nss
84*cdf0e10cSrcweir#BASEINC=$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla;$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla$/nspr;$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla$/nss;$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/external
85*cdf0e10cSrcweir#BASELIB=$(SOLARVERSION)$/$(INPATH)$/lib$(UPDMINOREXT)
86*cdf0e10cSrcweir.ELSE
87*cdf0e10cSrcweirCRYPTOLIB=nss
88*cdf0e10cSrcweir.ENDIF
89*cdf0e10cSrcweir
90*cdf0e10cSrcweir.IF "$(OS)"=="WNT"
91*cdf0e10cSrcweir.IF "$(COM)"=="GCC"
92*cdf0e10cSrcweirxmlsec_CC=$(CC) -mthreads
93*cdf0e10cSrcweir.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
94*cdf0e10cSrcweirxmlsec_CC+=-shared-libgcc
95*cdf0e10cSrcweir.ENDIF
96*cdf0e10cSrcweirxmlsec_LIBS=
97*cdf0e10cSrcweir.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
98*cdf0e10cSrcweirxmlsec_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
99*cdf0e10cSrcweir.ENDIF
100*cdf0e10cSrcweirCONFIGURE_DIR=
101*cdf0e10cSrcweirCONFIGURE_ACTION=.$/configure
102*cdf0e10cSrcweirCONFIGURE_FLAGS=--with-libxslt=no --with-openssl=no --with-gnutls=no --with-mozilla_ver=1.7.5 --enable-mscrypto --disable-crypto-dl --build=i586-pc-mingw32 --host=i586-pc-mingw32 CC="$(xmlsec_CC)" LDFLAGS="-no-undefined -L$(ILIB:s/;/ -L/)" LIBS="$(xmlsec_LIBS)" LIBXML2LIB=$(LIBXML2LIB) ZLIB3RDLIB=$(ZLIB3RDLIB) OBJDUMP="$(WRAPCMD) objdump"
103*cdf0e10cSrcweir
104*cdf0e10cSrcweir.IF "$(SYSTEM_MOZILLA)" != "YES"
105*cdf0e10cSrcweirCONFIGURE_FLAGS+=--enable-pkgconfig=no
106*cdf0e10cSrcweir.ENDIF
107*cdf0e10cSrcweirBUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS)
108*cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)
109*cdf0e10cSrcweir.ELSE
110*cdf0e10cSrcweirCONFIGURE_DIR=win32
111*cdf0e10cSrcweirCONFIGURE_ACTION=cscript configure.js
112*cdf0e10cSrcweir.IF "$(product)"!="full" && "$(CCNUMVER)" >= "001399999999"
113*cdf0e10cSrcweirCONFIGURE_FLAGS=crypto=$(CRYPTOLIB) debug=yes xslt=no iconv=no static=no include=$(BASEINC) lib=$(BASELIB)
114*cdf0e10cSrcweir.ELSE
115*cdf0e10cSrcweirCONFIGURE_FLAGS=crypto=$(CRYPTOLIB) xslt=no iconv=no static=no include=$(BASEINC) lib=$(BASELIB)
116*cdf0e10cSrcweir.ENDIF
117*cdf0e10cSrcweirBUILD_ACTION=nmake
118*cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)
119*cdf0e10cSrcweir.ENDIF
120*cdf0e10cSrcweir.ELSE
121*cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
122*cdf0e10cSrcweir
123*cdf0e10cSrcweir.IF "$(COM)"=="C52" && "$(CPU)"=="U"
124*cdf0e10cSrcweirxmlsec_CFLAGS+=-m64
125*cdf0e10cSrcweir.ENDIF
126*cdf0e10cSrcweir
127*cdf0e10cSrcweir.IF "$(SYSBASE)"!=""
128*cdf0e10cSrcweirxmlsec_CFLAGS+=-I$(SYSBASE)$/usr$/include
129*cdf0e10cSrcweir.IF "$(COMNAME)"=="sunpro5"
130*cdf0e10cSrcweirxmlsec_CFLAGS+=$(C_RESTRICTIONFLAGS)
131*cdf0e10cSrcweir.ENDIF			# "$(COMNAME)"=="sunpro5"
132*cdf0e10cSrcweir.IF "$(EXTRA_CFLAGS)"!=""
133*cdf0e10cSrcweirxmlsec_CFLAGS+=$(EXTRA_CFLAGS)
134*cdf0e10cSrcweirxmlsec_CPPFLAGS+=$(EXTRA_CFLAGS)
135*cdf0e10cSrcweir.ENDIF # "$(EXTRA_CFLAGS)"!=""
136*cdf0e10cSrcweirxmlsec_LDFLAGS+=-L$(SYSBASE)$/usr$/lib
137*cdf0e10cSrcweir.ELIF "$(OS)"=="MACOSX" # "$(SYSBASE)"!=""
138*cdf0e10cSrcweirxmlsec_CPPFLAGS+=$(EXTRA_CDEFS)
139*cdf0e10cSrcweir.ENDIF
140*cdf0e10cSrcweir
141*cdf0e10cSrcweir.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC"
142*cdf0e10cSrcweirxmlsec_LDFLAGS+=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
143*cdf0e10cSrcweir.ENDIF			# "$(OS)$(COM)"=="LINUXGCC"
144*cdf0e10cSrcweir.IF "$(OS)$(COM)"=="SOLARISC52"
145*cdf0e10cSrcweirxmlsec_LDFLAGS+=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
146*cdf0e10cSrcweir.ENDIF			# "$(OS)$(COM)"=="SOLARISC52"
147*cdf0e10cSrcweir
148*cdf0e10cSrcweirLDFLAGS:=$(xmlsec_LDFLAGS)
149*cdf0e10cSrcweir.EXPORT: LDFLAGS
150*cdf0e10cSrcweir
151*cdf0e10cSrcweir.ENDIF
152*cdf0e10cSrcweirCONFIGURE_DIR=
153*cdf0e10cSrcweirCONFIGURE_ACTION=.$/configure ADDCFLAGS="$(xmlsec_CFLAGS)" CPPFLAGS="$(xmlsec_CPPFLAGS)"
154*cdf0e10cSrcweirCONFIGURE_FLAGS=--with-pic --disable-shared --disable-crypto-dl --with-libxslt=no --with-openssl=no --with-gnutls=no LIBXML2LIB="$(LIBXML2LIB)"
155*cdf0e10cSrcweir# system-mozilla needs pkgconfig to get the information about nss
156*cdf0e10cSrcweir# FIXME: This also will enable pkg-config usage for libxml2. It *seems*
157*cdf0e10cSrcweir# that the internal headers still are used when they are there but....
158*cdf0e10cSrcweir# (and that pkg-config is allowed to fail...)
159*cdf0e10cSrcweir# I have no real good idea how to get mozilla (nss) pkg-config'ed and libxml2
160*cdf0e10cSrcweir# not... We need mozilla-nss pkg-config'ed since we can *not* just use
161*cdf0e10cSrcweir# --with-nss or parse -pkg-config --libs / cflags mozilla-nss since
162*cdf0e10cSrcweir# the lib may a) be in /usr/lib (Debian) and be not in $with_nss/include
163*cdf0e10cSrcweir# $with_nss/lib.
164*cdf0e10cSrcweir.IF "$(SYSTEM_MOZILLA)" != "YES"
165*cdf0e10cSrcweirCONFIGURE_FLAGS+=--enable-pkgconfig=no
166*cdf0e10cSrcweir.ENDIF
167*cdf0e10cSrcweirBUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS)
168*cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)
169*cdf0e10cSrcweir.ENDIF
170*cdf0e10cSrcweir
171*cdf0e10cSrcweir
172*cdf0e10cSrcweirOUTDIR2INC=include$/xmlsec
173*cdf0e10cSrcweir
174*cdf0e10cSrcweir.IF "$(OS)"=="WNT"
175*cdf0e10cSrcweir.IF "$(COM)"=="GCC"
176*cdf0e10cSrcweirOUT2LIB+=src$/.libs$/libxmlsec1.dll.a src$/nss$/.libs$/libxmlsec1-nss.dll.a src$/mscrypto$/.libs$/libxmlsec1-mscrypto.dll.a
177*cdf0e10cSrcweirOUT2BIN+=src$/.libs$/libxmlsec1.dll src$/nss$/.libs$/libxmlsec1-nss.dll src$/mscrypto$/.libs$/libxmlsec1-mscrypto.dll
178*cdf0e10cSrcweir.ELSE
179*cdf0e10cSrcweirOUT2LIB+=win32$/binaries$/*.lib
180*cdf0e10cSrcweirOUT2BIN+=win32$/binaries$/*.dll
181*cdf0e10cSrcweir.ENDIF
182*cdf0e10cSrcweir.ELSE
183*cdf0e10cSrcweirOUT2LIB+=src$/.libs$/libxmlsec1.a src$/nss$/.libs$/libxmlsec1-nss.a
184*cdf0e10cSrcweir.ENDIF
185*cdf0e10cSrcweir
186*cdf0e10cSrcweir# --- Targets ------------------------------------------------------
187*cdf0e10cSrcweir
188*cdf0e10cSrcweir.INCLUDE : set_ext.mk
189*cdf0e10cSrcweir.INCLUDE : target.mk
190*cdf0e10cSrcweir.INCLUDE : tg_ext.mk
191*cdf0e10cSrcweir
192*cdf0e10cSrcweir
193