Bump for 3.6-28
[LibreOffice.git] / libxmlsec / makefile.mk
blob14705033bebe607d177d7edbffac46b5b6fd2016
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
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.
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).
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.
26 #*************************************************************************
28 PRJ=.
30 PRJNAME=xmlsec1
31 TARGET=so_xmlsec1
32 EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
34 # --- Settings -----------------------------------------------------
36 .INCLUDE : settings.mk
38 .IF "$(ENABLE_XMLSEC)" != "YES"
39 @all:
40 @echo "XMLSec module disabled"
41 .ENDIF
43 # --- Files --------------------------------------------------------
45 XMLSEC1VERSION=1.2.14
47 TARFILE_NAME=$(PRJNAME)-$(XMLSEC1VERSION)
48 TARFILE_MD5=1f24ab1d39f4a51faf22244c94a6203f
50 #xmlsec1-configure.patch: Set up the build. Straightforward configuration
51 #xmlsec1-configure-libxml-libxslt.patch: empty "$with_libxml" prepends /bin :-(
52 #xmlsec1-olderlibxml2.patch: Allow build against older libxml2, for macosx
53 #xmlsec1-nssdisablecallbacks.patch: Disable use of smime3 so don't need to package it
54 #xmlsec1-customkeymanage.patch: Could we do this alternatively outside xmlsec
55 #xmlsec1-nssmangleciphers.patch: Dubious, do we still need this ?
56 #xmlsec1-noverify.patch: As per readme.txt.
57 #xmlsec1-mingw32.patch: Mingw32 support.
58 #xmlsec1-mingw-customkeymanage-addmscrypto.patch: builds the custom keymanager on mingw
59 #xmlsec1-vc.path: support for Visual C++ 10
60 PATCH_FILES=\
61 xmlsec1-configure.patch \
62 xmlsec1-configure-libxml-libxslt.patch \
63 xmlsec1-olderlibxml2.patch \
64 xmlsec1-nssdisablecallbacks.patch \
65 xmlsec1-customkeymanage.patch \
66 xmlsec1-nssmangleciphers.patch \
67 xmlsec1-noverify.patch \
68 xmlsec1-mingw32.patch \
69 xmlsec1-mingw-keymgr-mscrypto.patch \
70 xmlsec1-vc10.patch \
71 xmlsec1-1.2.14_fix_extern_c.patch \
72 xmlsec1-android.patch
74 ADDITIONAL_FILES= \
75 include$/xmlsec$/mscrypto$/akmngr.h \
76 src$/mscrypto$/akmngr.c \
77 include$/xmlsec$/nss$/akmngr.h \
78 include$/xmlsec$/nss$/ciphers.h \
79 include$/xmlsec$/nss$/tokens.h \
80 src$/nss$/akmngr.c \
81 src$/nss$/keywrapers.c \
82 src$/nss$/tokens.c
84 .IF "$(GUI)"=="WNT"
85 CRYPTOLIB=mscrypto
86 .ELSE
87 CRYPTOLIB=nss
88 .ENDIF
90 .IF "$(OS)"=="WNT"
91 .IF "$(COM)"=="GCC"
92 xmlsec_CC=$(CC) -mthreads
93 .IF "$(MINGW_SHARED_GCCLIB)"=="YES"
94 xmlsec_CC+=-shared-libgcc
95 .ENDIF
96 xmlsec_LIBS=
97 .IF "$(MINGW_SHARED_GXXLIB)"=="YES"
98 xmlsec_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
99 .ENDIF
100 CONFIGURE_DIR=
101 CONFIGURE_ACTION=.$/configure
103 # Note that this is obsolete crack for building *locally* on Windows with MinGW,
104 # something we don't see the point in here in LibreOffice
106 CONFIGURE_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"
108 .IF "$(SYSTEM_NSS)" != "YES"
109 CONFIGURE_FLAGS+=--enable-pkgconfig=no
110 .ENDIF
111 BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS)
112 BUILD_DIR=$(CONFIGURE_DIR)
113 .ELSE
114 CONFIGURE_DIR=win32
115 CONFIGURE_ACTION=cscript configure.js
116 .IF "$(product)"!="full" && "$(CCNUMVER)" >= "001399999999"
117 CONFIGURE_FLAGS=crypto=$(CRYPTOLIB) debug=yes xslt=no iconv=no static=no include=$(BASEINC) lib=$(BASELIB)
118 .ELSE
119 CONFIGURE_FLAGS=crypto=$(CRYPTOLIB) xslt=no iconv=no static=no include=$(BASEINC) lib=$(BASELIB)
120 .ENDIF
121 BUILD_ACTION=nmake
122 BUILD_DIR=$(CONFIGURE_DIR)
123 .ENDIF
124 .ELSE
125 .IF "$(GUI)"=="UNX"
127 .IF "$(COM)"=="C52" && "$(CPU)"=="U"
128 xmlsec_CFLAGS+=-m64
129 .ENDIF
131 .IF "$(SYSBASE)"!=""
132 xmlsec_CFLAGS+=-I$(SYSBASE)$/usr$/include
133 .IF "$(COMNAME)"=="sunpro5"
134 xmlsec_CFLAGS+=$(C_RESTRICTIONFLAGS)
135 .ENDIF # "$(COMNAME)"=="sunpro5"
136 .IF "$(EXTRA_CFLAGS)"!=""
137 xmlsec_CFLAGS+=$(EXTRA_CFLAGS)
138 xmlsec_CPPFLAGS+=$(EXTRA_CFLAGS)
139 .ENDIF # "$(EXTRA_CFLAGS)"!=""
140 xmlsec_LDFLAGS+=-L$(SYSBASE)$/usr$/lib
141 .ELIF "$(OS)"=="MACOSX" # "$(SYSBASE)"!=""
142 xmlsec_CPPFLAGS+=$(EXTRA_CDEFS)
143 .ENDIF
145 .IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC"
146 xmlsec_LDFLAGS+=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
147 .ENDIF # "$(OS)$(COM)"=="LINUXGCC"
148 .IF "$(OS)$(COM)"=="SOLARISC52"
149 xmlsec_LDFLAGS+=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
150 .ENDIF # "$(OS)$(COM)"=="SOLARISC52"
152 LDFLAGS:=$(xmlsec_LDFLAGS)
153 .EXPORT: LDFLAGS
155 .ENDIF
156 CONFIGURE_DIR=
157 CONFIGURE_ACTION=.$/configure ADDCFLAGS="$(xmlsec_CFLAGS)" CPPFLAGS="$(xmlsec_CPPFLAGS)"
158 CONFIGURE_FLAGS=--with-pic --disable-shared --disable-crypto-dl --with-libxslt=no --with-gnutls=no LIBXML2LIB="$(LIBXML2LIB)"
160 .IF "$(CROSS_COMPILING)"=="YES"
161 CONFIGURE_FLAGS+= --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
162 .ENDIF
164 .IF "$(OS)" == "ANDROID"
165 CONFIGURE_FLAGS+=--with-openssl=$(SOLARVER)/$(INPATH)
166 .ELSE
167 CONFIGURE_FLAGS+=--with-openssl=no
168 .ENDIF
170 .IF "$(OS)" == "MACOSX"
171 CONFIGURE_FLAGS += \
172 --prefix=/@.__________________________________________________$(EXTRPATH)
173 .END
175 # system-mozilla needs pkgconfig to get the information about nss
176 # FIXME: This also will enable pkg-config usage for libxml2. It *seems*
177 # that the internal headers still are used when they are there but....
178 # (and that pkg-config is allowed to fail...)
179 # I have no real good idea how to get mozilla (nss) pkg-config'ed and libxml2
180 # not... We need mozilla-nss pkg-config'ed since we can *not* just use
181 # --with-nss or parse -pkg-config --libs / cflags mozilla-nss since
182 # the lib may a) be in /usr/lib (Debian) and be not in $with_nss/include
183 # $with_nss/lib.
184 .IF "$(SYSTEM_NSS)" != "YES"
185 CONFIGURE_FLAGS+=--enable-pkgconfig=no
186 .ENDIF
187 BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS)
188 BUILD_DIR=$(CONFIGURE_DIR)
189 .ENDIF
192 OUTDIR2INC=include$/xmlsec
194 .IF "$(OS)"=="WNT"
195 .IF "$(COM)"=="GCC"
196 OUT2LIB+=src$/.libs$/libxmlsec1.dll.a src$/nss$/.libs$/libxmlsec1-nss.dll.a src$/mscrypto$/.libs$/libxmlsec1-mscrypto.dll.a
197 OUT2BIN+=src$/.libs$/libxmlsec1.dll src$/nss$/.libs$/libxmlsec1-nss.dll src$/mscrypto$/.libs$/libxmlsec1-mscrypto.dll
198 .ELSE
199 OUT2LIB+=win32$/binaries$/*.lib
200 OUT2BIN+=win32$/binaries$/*.dll
201 .ENDIF
202 .ELIF "$(OS)" == "ANDROID"
203 OUT2LIB+=src$/.libs$/libxmlsec1.a src$/openssl/.libs$/libxmlsec1-openssl.a
204 .ELSE
205 OUT2LIB+=src$/.libs$/libxmlsec1.a src$/nss$/.libs$/libxmlsec1-nss.a
206 .ENDIF
208 # --- Targets ------------------------------------------------------
210 .INCLUDE : set_ext.mk
211 .INCLUDE : target.mk
212 .INCLUDE : tg_ext.mk