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_FILE_NAME
=$(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 CONFIGURE_ACTION
=chmod
777 libxml2-config
&& .
$/configure
82 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 CFLAGS
="-D_MT" LDFLAGS
="-no-undefined -L$(ILIB:s/;/ -L/)" LIBS
="-lmingwthrd" LIBXML2LIB
="$(LIBXML2LIB)" ZLIB3RDLIB
=$(ZLIB3RDLIB
) OBJDUMP
="$(WRAPCMD) objdump"
83 .IF
"$(SYSTEM_MOZILLA)" != "YES"
84 CONFIGURE_FLAGS
+=--enable-pkgconfig
=no
86 BUILD_ACTION
=$(GNUMAKE
)
87 BUILD_DIR
=$(CONFIGURE_DIR
)
90 CONFIGURE_ACTION
=cscript configure.js
91 .IF
"$(product)"!="full" && "$(CCNUMVER)" >= "001399999999"
92 CONFIGURE_FLAGS
=crypto
=$(CRYPTOLIB
) debug
=yes xslt
=no iconv
=no static
=no
include=$(BASEINC
) lib
=$(BASELIB
)
94 CONFIGURE_FLAGS
=crypto
=$(CRYPTOLIB
) xslt
=no iconv
=no static
=no
include=$(BASEINC
) lib
=$(BASELIB
)
97 BUILD_DIR
=$(CONFIGURE_DIR
)
102 .IF
"$(COM)"=="C52" && "$(CPU)"=="U"
107 xmlsec_CFLAGS
+=-I
$(SYSBASE
)$/usr
$/include
108 .IF
"$(COMNAME)"=="sunpro5"
109 xmlsec_CFLAGS
+=$(C_RESTRICTIONFLAGS
)
110 .ENDIF
# "$(COMNAME)"=="sunpro5"
111 .IF
"$(EXTRA_CFLAGS)"!=""
112 xmlsec_CFLAGS
+=$(EXTRA_CFLAGS
)
113 .ENDIF
# "$(EXTRA_CFLAGS)"!=""
114 xmlsec_LDFLAGS
+=-L
$(SYSBASE
)$/usr
$/lib
115 .ENDIF
# "$(SYSBASE)"!=""
117 .IF
"$(OS)$(COM)"=="LINUXGCC" ||
"$(OS)$(COM)"=="FREEBSDGCC"
118 xmlsec_LDFLAGS
+=-Wl
,-rpath
,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
119 .ENDIF
# "$(OS)$(COM)"=="LINUXGCC"
120 .IF
"$(OS)$(COM)"=="SOLARISC52"
121 xmlsec_LDFLAGS
+=-Wl
,-R
'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
122 .ENDIF
# "$(OS)$(COM)"=="SOLARISC52"
124 .IF
"$(OS)$(COM)"=="LINUXGCC"
125 xmlsec_LDFLAGS
+=-Wl
,-z
,noexecstack
128 LDFLAGS
:=$(xmlsec_LDFLAGS
)
133 CONFIGURE_ACTION
=chmod
777 libxml2-config
&& .
$/configure ADDCFLAGS
="$(xmlsec_CFLAGS)" CPPFLAGS
="$(xmlsec_CPPFLAGS)"
134 CONFIGURE_FLAGS
=--with-pic
--disable-shared
--with-libxslt
=no
--with-openssl
=no
--with-gnutls
=no LIBXML2LIB
="$(LIBXML2LIB)" ZLIB3RDLIB
=$(ZLIB3RDLIB
)
135 # system-mozilla needs pkgconfig to get the information about nss
136 # FIXME: This also will enable pkg-config usage for libxml2. It *seems*
137 # that the internal headers still are used when they are there but....
138 # (and that pkg-config is allowed to fail...)
139 # I have no real good idea how to get mozilla (nss) pkg-config'ed and libxml2
140 # not... We need mozilla-nss pkg-config'ed since we can *not* just use
141 # --with-nss or parse -pkg-config --libs / cflags mozilla-nss since
142 # the lib may a) be in /usr/lib (Debian) and be not in $with_nss/include
144 .IF
"$(SYSTEM_MOZILLA)" != "YES"
145 CONFIGURE_FLAGS
+=--enable-pkgconfig
=no
147 BUILD_ACTION
=$(GNUMAKE
)
148 BUILD_DIR
=$(CONFIGURE_DIR
)
152 OUTDIR2INC
=include$/xmlsec
156 OUT2BIN
+=src
$/.libs
$/libxmlsec1-1.dll src
$/nss
$/.libs
$/libxmlsec1-nss-1.dll src
$/mscrypto
$/.libs
$/libxmlsec1-mscrypto-1.dll
158 OUT2LIB
+=win32
$/binaries
$/*.lib
159 OUT2BIN
+=win32
$/binaries
$/*.dll
162 OUT2LIB
+=src
$/.libs
$/libxmlsec1.a src
$/nss
$/.libs
$/libxmlsec1-nss.a
165 # --- Targets ------------------------------------------------------
167 .INCLUDE
: set_ext.mk