Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / curl / makefile.mk
blob7a8d784f23327105a5c2ce0e19ba4c63a37b24a6
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 #*************************************************************************
27 PRJ=.
29 PRJNAME=so_curl
30 TARGET=so_curl
32 # --- Settings -----------------------------------------------------
34 .INCLUDE : settings.mk
36 .IF "$(SYSTEM_CURL)" == "YES"
37 all:
38 @echo "An already available installation of curl should exist on your system."
39 @echo "Therefore the version provided here does not need to be built in addition."
40 .ENDIF
42 # --- Files --------------------------------------------------------
44 TARFILE_NAME=curl-7.26.0
45 TARFILE_MD5=3fa4d5236f2a36ca5c3af6715e837691
46 PATCH_FILES=\
47 curl-7.26.0.patch \
48 curl-7.26.0_nspr.patch \
49 curl-aix.patch
51 .IF "$(GUI)"=="WNT"
52 PATCH_FILES+=curl-7.26.0_win.patch
53 .IF "$(COM)"=="GCC"
54 PATCH_FILES+=curl-7.26.0_mingw.patch
55 .ENDIF
56 .ENDIF
58 .IF "$(OS)" == "ANDROID"
59 PATCH_FILES+=curl-android.patch
60 .ENDIF
62 #CONVERTFILES= \
63 lib$/Makefile.vc6
65 #ADDITIONAL_FILES= lib$/config-os2.h lib$/Makefile.os2
67 .IF "$(GUI)"=="UNX"
69 .IF "$(SYSBASE)"!=""
70 curl_CFLAGS+=-I$(SYSBASE)$/usr$/include
71 curl_LDFLAGS+=-L$(SYSBASE)$/usr$/lib
72 .ENDIF # "$(SYSBASE)"!=""
74 .IF "$(OS)$(CPU)"=="SOLARISU"
75 curl_CFLAGS+:=$(ARCH_FLAGS)
76 curl_LDFLAGS+:=$(ARCH_FLAGS)
77 .ENDIF
79 .IF "$(OS)"=="AIX"
80 curl_LDFLAGS+:=$(LINKFLAGS) $(LINKFLAGSRUNPATH_OOO)
81 .ENDIF
83 CONFIGURE_DIR=.$/
84 #relative to CONFIGURE_DIR
85 CONFIGURE_ACTION=.$/configure
86 .IF "$(DISABLE_DYNLOADING)" == "TRUE"
87 CONFIGURE_FLAGS=--disable-shared
88 .ELSE
89 CONFIGURE_FLAGS=--disable-static
90 .ENDIF
91 CONFIGURE_FLAGS+= --with-nss --without-ssl --without-libidn --enable-ftp --enable-ipv6 --enable-http --disable-gopher --disable-file --disable-ldap --disable-telnet --disable-dict --without-libssh2 CPPFLAGS="$(curl_CFLAGS)" LDFLAGS="$(curl_LDFLAGS)"
92 .IF "$(debug)" != ""
93 CONFIGURE_FLAGS+=--enable-debug
94 .ENDIF
96 .IF "$(OS)" == "MACOSX"
97 CONFIGURE_FLAGS += \
98 --prefix=/@.__________________________________________________$(EXTRPATH)
99 .END
101 .IF "$(CROSS_COMPILING)"=="YES"
102 CONFIGURE_FLAGS+=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
103 .ENDIF
105 BUILD_DIR=$(CONFIGURE_DIR)$/lib
106 BUILD_ACTION=$(GNUMAKE)
107 BUILD_FLAGS+= -j$(EXTMAXPROCESS)
109 .IF "$(DISABLE_DYNLOADING)" == "TRUE"
110 OUT2LIB=$(BUILD_DIR)$/.libs$/libcurl.a
111 .ELIF "$(OS)"=="ANDROID"
112 OUT2LIB=$(BUILD_DIR)$/.libs$/libcurl.so
113 .ELSE
114 OUT2LIB=$(BUILD_DIR)$/.libs$/libcurl$(DLLPOST).?
115 .ENDIF
116 .ENDIF # "$(GUI)"=="UNX"
119 .IF "$(GUI)"=="WNT"
120 .IF "$(COM)"=="GCC"
121 curl_CC=$(CC) -mthreads
122 .IF "$(MINGW_SHARED_GCCLIB)"=="YES"
123 curl_CC+=-shared-libgcc
124 .ENDIF
125 curl_LIBS=-lws2_32 -lwinmm
126 .IF "$(MINGW_SHARED_GXXLIB)"=="YES"
127 curl_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
128 .ENDIF
129 CONFIGURE_DIR=.$/
130 #relative to CONFIGURE_DIR
131 CONFIGURE_ACTION=.$/configure
132 CONFIGURE_FLAGS= --with-nss --without-ssl --enable-ftp --enable-ipv6 --disable-http --disable-gopher --disable-file --disable-ldap --disable-telnet --disable-dict --build=i586-pc-mingw32 --host=i586-pc-mingw32 CC="$(curl_CC)" CPPFLAGS="$(INCLUDE)" OBJDUMP="objdump" LDFLAGS="-L$(ILIB:s/;/ -L/)" LIBS="$(curl_LIBS)"
133 .IF "$(debug)" != ""
134 CONFIGURE_FLAGS+=--enable-debug
135 .ENDIF
136 BUILD_DIR=$(CONFIGURE_DIR)$/lib
137 BUILD_ACTION=make
138 OUT2BIN=$(BUILD_DIR)$/.libs$/libcurl*.dll
139 OUT2LIB=$(BUILD_DIR)$/.libs$/libcurl*.a
140 .ELSE
142 .IF "$(CCNUMVER)" > "001399999999"
143 EXCFLAGS="/EHa /Zc:wchar_t- /D "_CRT_SECURE_NO_DEPRECATE""
144 .ELSE
145 EXCFLAGS="/EHsc /YX"
146 .ENDIF
148 BUILD_DIR=.$/lib
150 .IF "$(CPUNAME)" == "INTEL"
151 MACHINE=X86
152 .ELSE
153 MACHINE=X64
154 .ENDIF
156 # that debug configuration is disabled for now because it needs msvcr90d.dll
157 # (the debug MSVC runtime) and that is not copied into the solver currently,
158 # causing unit tests to fail
159 #.IF "$(debug)"==""
160 BUILD_ACTION=nmake -f Makefile.vc9 cfg=release-dll EXCFLAGS=$(EXCFLAGS) MACHINE=$(MACHINE)
161 #.ELSE
162 #BUILD_ACTION=nmake -f Makefile.vc9 cfg=debug-dll EXCFLAGS=$(EXCFLAGS) MACHINE=$(MACHINE)
163 #.ENDIF
165 OUT2BIN=$(BUILD_DIR)$/libcurl.dll
166 OUT2LIB=$(BUILD_DIR)$/libcurl.lib
168 .ENDIF
169 .ENDIF # "$(GUI)"=="WNT"
171 OUT2INC= \
172 include$/curl$/easy.h \
173 include$/curl$/multi.h \
174 include$/curl$/curl.h \
175 include$/curl$/curlver.h \
176 include$/curl$/typecheck-gcc.h \
177 include$/curl$/stdcheaders.h \
178 include$/curl$/mprintf.h \
179 include$/curl$/curlbuild.h \
180 include$/curl$/curlrules.h
182 .IF "$(GUI)"=="UNX" || "$(COM)"=="GCC"
183 OUT2INC+=libcurl.pc
184 .ENDIF
186 # --- Targets ------------------------------------------------------
188 .INCLUDE : set_ext.mk
189 .INCLUDE : target.mk
190 .INCLUDE : tg_ext.mk