update dev300-m58
[ooovba.git] / libxmlsec / makefile.mk
blob817dc6d846586edc1b90b61d92fa2725b7a8a6bf
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_FILES=$(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 xmlsec_CC=$(CC)
81 .IF "$(MINGW_SHARED_GCCLIB)"=="YES"
82 xmlsec_CC+=-shared-libgcc
83 .ENDIF
84 xmlsec_LIBS=-lmingwthrd
85 .IF "$(MINGW_SHARED_GXXLIB)"=="YES"
86 xmlsec_LIBS+=-lstdc++_s
87 .ENDIF
88 CONFIGURE_DIR=
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
93 .ENDIF
94 BUILD_ACTION=$(GNUMAKE)
95 BUILD_DIR=$(CONFIGURE_DIR)
96 .ELSE
97 CONFIGURE_DIR=win32
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)
101 .ELSE
102 CONFIGURE_FLAGS=crypto=$(CRYPTOLIB) xslt=no iconv=no static=no include=$(BASEINC) lib=$(BASELIB)
103 .ENDIF
104 BUILD_ACTION=nmake
105 BUILD_DIR=$(CONFIGURE_DIR)
106 .ENDIF
107 .ELSE
108 .IF "$(GUI)"=="UNX"
110 .IF "$(COM)"=="C52" && "$(CPU)"=="U"
111 xmlsec_CFLAGS+=-m64
112 .ENDIF
114 .IF "$(SYSBASE)"!=""
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
134 .ENDIF
136 LDFLAGS:=$(xmlsec_LDFLAGS)
137 .EXPORT: LDFLAGS
139 .ENDIF
140 CONFIGURE_DIR=
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
151 # $with_nss/lib.
152 .IF "$(SYSTEM_MOZILLA)" != "YES"
153 CONFIGURE_FLAGS+=--enable-pkgconfig=no
154 .ENDIF
155 BUILD_ACTION=$(GNUMAKE)
156 BUILD_DIR=$(CONFIGURE_DIR)
157 .ENDIF
160 OUTDIR2INC=include$/xmlsec
162 .IF "$(OS)"=="WNT"
163 .IF "$(COM)"=="GCC"
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
166 .ELSE
167 OUT2LIB+=win32$/binaries$/*.lib
168 OUT2BIN+=win32$/binaries$/*.dll
169 .ENDIF
170 .ELSE
171 OUT2LIB+=src$/.libs$/libxmlsec1.a src$/nss$/.libs$/libxmlsec1-nss.a
172 .ENDIF
174 # --- Targets ------------------------------------------------------
176 .INCLUDE : set_ext.mk
177 .INCLUDE : target.mk
178 .INCLUDE : tg_ext.mk