enable support for import custom menu ( on builtin bar only )
[ooovba.git] / libxmlsec / makefile.mk
blob5a40390be0b077b7850eff98a2e941045b13c11d
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
11 # $Revision: 1.19 $
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 #*************************************************************************
32 PRJ=.
34 PRJNAME=xmlsec1
35 TARGET=so_xmlsec1
36 EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
38 # --- Settings -----------------------------------------------------
40 .INCLUDE : settings.mk
42 .IF "$(WITH_MOZILLA)" == "NO"
43 @all:
44 @echo "Mozilla disabled -> no nss -> no libxmlsec...."
45 .ENDIF
47 # --- Files --------------------------------------------------------
49 XMLSEC1VERSION=1.2.6
51 TARFILE_NAME=$(PRJNAME)-$(XMLSEC1VERSION)
52 PATCH_FILE_NAME=$(TARFILE_NAME).patch
54 ADDITIONAL_FILES= \
55 include$/xmlsec$/nss$/akmngr.h \
56 include$/xmlsec$/nss$/ciphers.h \
57 include$/xmlsec$/nss$/tokens.h \
58 include$/xmlsec$/mscrypto$/akmngr.h \
59 src$/nss$/akmngr.c \
60 src$/mscrypto$/akmngr.c \
61 src$/nss$/keytrans.c \
62 src$/nss$/keywrapers.c \
63 src$/nss$/tokens.c \
64 xmlsec-mscrypto.pc.in \
65 include$/xmlsec$/mscrypto$/Makefile.in \
66 src$/mscrypto$/Makefile.in \
67 libxml2-config
69 .IF "$(GUI)"=="WNT"
70 CRYPTOLIB=mscrypto
71 #CRYPTOLIB=nss
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)
74 .ELSE
75 CRYPTOLIB=nss
76 .ENDIF
78 .IF "$(OS)"=="WNT"
79 .IF "$(COM)"=="GCC"
80 CONFIGURE_DIR=
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
85 .ENDIF
86 BUILD_ACTION=$(GNUMAKE)
87 BUILD_DIR=$(CONFIGURE_DIR)
88 .ELSE
89 CONFIGURE_DIR=win32
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)
93 .ELSE
94 CONFIGURE_FLAGS=crypto=$(CRYPTOLIB) xslt=no iconv=no static=no include=$(BASEINC) lib=$(BASELIB)
95 .ENDIF
96 BUILD_ACTION=nmake
97 BUILD_DIR=$(CONFIGURE_DIR)
98 .ENDIF
99 .ELSE
100 .IF "$(GUI)"=="UNX"
102 .IF "$(COM)"=="C52" && "$(CPU)"=="U"
103 xmlsec_CFLAGS+=-m64
104 .ENDIF
106 .IF "$(SYSBASE)"!=""
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
126 .ENDIF
128 LDFLAGS:=$(xmlsec_LDFLAGS)
129 .EXPORT: LDFLAGS
131 .ENDIF
132 CONFIGURE_DIR=
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
143 # $with_nss/lib.
144 .IF "$(SYSTEM_MOZILLA)" != "YES"
145 CONFIGURE_FLAGS+=--enable-pkgconfig=no
146 .ENDIF
147 BUILD_ACTION=$(GNUMAKE)
148 BUILD_DIR=$(CONFIGURE_DIR)
149 .ENDIF
152 OUTDIR2INC=include$/xmlsec
154 .IF "$(OS)"=="WNT"
155 .IF "$(COM)"=="GCC"
156 OUT2BIN+=src$/.libs$/libxmlsec1-1.dll src$/nss$/.libs$/libxmlsec1-nss-1.dll src$/mscrypto$/.libs$/libxmlsec1-mscrypto-1.dll
157 .ELSE
158 OUT2LIB+=win32$/binaries$/*.lib
159 OUT2BIN+=win32$/binaries$/*.dll
160 .ENDIF
161 .ELSE
162 OUT2LIB+=src$/.libs$/libxmlsec1.a src$/nss$/.libs$/libxmlsec1-nss.a
163 .ENDIF
165 # --- Targets ------------------------------------------------------
167 .INCLUDE : set_ext.mk
168 .INCLUDE : target.mk
169 .INCLUDE : tg_ext.mk