1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
36 EXTERNAL_WARNINGS_NOT_ERRORS
:= TRUE
38 # --- Settings -----------------------------------------------------
40 .INCLUDE
: settings.mk
42 .IF
"$(WITH_MOZILLA)" == "NO"
44 @echo
"Mozilla disabled -> no nss -> no libxmlsec...."
47 # --- Files --------------------------------------------------------
51 TARFILE_NAME
=$(PRJNAME
)-$(XMLSEC1VERSION
)
52 PATCH_FILES
=$(TARFILE_NAME
).patch
55 include$/xmlsec
$/nss
$/akmngr.h \
56 include$/xmlsec
$/nss
$/ciphers.h \
57 include$/xmlsec
$/nss
$/tokens.h \
58 include$/xmlsec
$/mscrypto
$/akmngr.h \
60 src
$/mscrypto
$/akmngr.c \
61 src
$/nss
$/keytrans.c \
62 src
$/nss
$/keywrapers.c \
64 xmlsec-mscrypto.
pc.in \
65 include$/xmlsec
$/mscrypto
$/Makefile.in \
66 src
$/mscrypto
$/Makefile.in \
72 #BASEINC=$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla;$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla$/nspr;$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla$/nss;$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/external
73 #BASELIB=$(SOLARVERSION)$/$(INPATH)$/lib$(UPDMINOREXT)
81 .IF
"$(MINGW_SHARED_GCCLIB)"=="YES"
82 xmlsec_CC
+=-shared-libgcc
84 xmlsec_LIBS
=-lmingwthrd
85 .IF
"$(MINGW_SHARED_GXXLIB)"=="YES"
86 xmlsec_LIBS
+=-lstdc
++_s
89 CONFIGURE_ACTION
=chmod
777 libxml2-config
&& .
$/configure
90 CONFIGURE_FLAGS
=--with-libxslt
=no
--with-openssl
=no
--with-gnutls
=no
--with-mozilla_ver
=1.7.5 --with-mscrypto
--build
=i586-pc-mingw32
--host
=i586-pc-mingw32 CC
="$(xmlsec_CC)" CFLAGS
="-D_MT" LDFLAGS
="-no-undefined -L$(ILIB:s/;/ -L/)" LIBS
="$(xmlsec_LIBS)" LIBXML2LIB
=$(LIBXML2LIB
) ZLIB3RDLIB
=$(ZLIB3RDLIB
) OBJDUMP
="$(WRAPCMD) objdump"
91 .IF
"$(SYSTEM_MOZILLA)" != "YES"
92 CONFIGURE_FLAGS
+=--enable-pkgconfig
=no
94 BUILD_ACTION
=$(GNUMAKE
)
95 BUILD_DIR
=$(CONFIGURE_DIR
)
98 CONFIGURE_ACTION
=cscript configure.js
99 .IF
"$(product)"!="full" && "$(CCNUMVER)" >= "001399999999"
100 CONFIGURE_FLAGS
=crypto
=$(CRYPTOLIB
) debug
=yes xslt
=no iconv
=no static
=no
include=$(BASEINC
) lib
=$(BASELIB
)
102 CONFIGURE_FLAGS
=crypto
=$(CRYPTOLIB
) xslt
=no iconv
=no static
=no
include=$(BASEINC
) lib
=$(BASELIB
)
105 BUILD_DIR
=$(CONFIGURE_DIR
)
110 .IF
"$(COM)"=="C52" && "$(CPU)"=="U"
115 xmlsec_CFLAGS
+=-I
$(SYSBASE
)$/usr
$/include
116 .IF
"$(COMNAME)"=="sunpro5"
117 xmlsec_CFLAGS
+=$(C_RESTRICTIONFLAGS
)
118 .ENDIF
# "$(COMNAME)"=="sunpro5"
119 .IF
"$(EXTRA_CFLAGS)"!=""
120 xmlsec_CFLAGS
+=$(EXTRA_CFLAGS
)
121 .ENDIF
# "$(EXTRA_CFLAGS)"!=""
122 xmlsec_LDFLAGS
+=-L
$(SYSBASE
)$/usr
$/lib
123 .ENDIF
# "$(SYSBASE)"!=""
125 .IF
"$(OS)$(COM)"=="LINUXGCC" ||
"$(OS)$(COM)"=="FREEBSDGCC"
126 xmlsec_LDFLAGS
+=-Wl
,-rpath
,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
127 .ENDIF
# "$(OS)$(COM)"=="LINUXGCC"
128 .IF
"$(OS)$(COM)"=="SOLARISC52"
129 xmlsec_LDFLAGS
+=-Wl
,-R
'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
130 .ENDIF
# "$(OS)$(COM)"=="SOLARISC52"
132 .IF
"$(OS)$(COM)"=="LINUXGCC"
133 xmlsec_LDFLAGS
+=-Wl
,-z
,noexecstack
136 LDFLAGS
:=$(xmlsec_LDFLAGS
)
141 CONFIGURE_ACTION
=chmod
777 libxml2-config
&& .
$/configure ADDCFLAGS
="$(xmlsec_CFLAGS)" CPPFLAGS
="$(xmlsec_CPPFLAGS)"
142 CONFIGURE_FLAGS
=--with-pic
--disable-shared
--with-libxslt
=no
--with-openssl
=no
--with-gnutls
=no LIBXML2LIB
="$(LIBXML2LIB)" ZLIB3RDLIB
=$(ZLIB3RDLIB
)
143 # system-mozilla needs pkgconfig to get the information about nss
144 # FIXME: This also will enable pkg-config usage for libxml2. It *seems*
145 # that the internal headers still are used when they are there but....
146 # (and that pkg-config is allowed to fail...)
147 # I have no real good idea how to get mozilla (nss) pkg-config'ed and libxml2
148 # not... We need mozilla-nss pkg-config'ed since we can *not* just use
149 # --with-nss or parse -pkg-config --libs / cflags mozilla-nss since
150 # the lib may a) be in /usr/lib (Debian) and be not in $with_nss/include
152 .IF
"$(SYSTEM_MOZILLA)" != "YES"
153 CONFIGURE_FLAGS
+=--enable-pkgconfig
=no
155 BUILD_ACTION
=$(GNUMAKE
)
156 BUILD_DIR
=$(CONFIGURE_DIR
)
160 OUTDIR2INC
=include$/xmlsec
164 OUT2LIB
+=src
$/.libs
$/libxmlsec1.dll.a src
$/nss
$/.libs
$/libxmlsec1-nss.dll.a src
$/mscrypto
$/.libs
$/libxmlsec1-mscrypto.dll.a
165 OUT2BIN
+=src
$/.libs
$/libxmlsec1-1.dll src
$/nss
$/.libs
$/libxmlsec1-nss-1.dll src
$/mscrypto
$/.libs
$/libxmlsec1-mscrypto-1.dll
167 OUT2LIB
+=win32
$/binaries
$/*.lib
168 OUT2BIN
+=win32
$/binaries
$/*.dll
171 OUT2LIB
+=src
$/.libs
$/libxmlsec1.a src
$/nss
$/.libs
$/libxmlsec1-nss.a
174 # --- Targets ------------------------------------------------------
176 .INCLUDE
: set_ext.mk