xref: /aoo41x/main/curl/makefile.mk (revision cdf0e10c)
1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
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.
14#
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).
20#
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.
25#
26#*************************************************************************
27PRJ=.
28
29PRJNAME=so_curl
30TARGET=so_curl
31
32# --- Settings -----------------------------------------------------
33
34.INCLUDE :	settings.mk
35
36.IF "$(SYSTEM_CURL)" == "YES"
37all:
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
41
42# --- Files --------------------------------------------------------
43
44TARFILE_NAME=curl-7.19.7
45TARFILE_MD5=ecb2e37e45c9933e2a963cabe03670ab
46PATCH_FILES=curl-7.19.7.patch
47
48.IF "$(GUI)"=="WNT"
49	PATCH_FILES+=curl-7.19.7_win.patch
50	.IF "$(COM)"=="GCC"
51		PATCH_FILES+=curl-7.19.7_mingw.patch
52	.ENDIF
53.ENDIF
54
55
56#CONVERTFILES= \
57    lib$/Makefile.vc6
58
59#ADDITIONAL_FILES= lib$/config-os2.h lib$/Makefile.os2
60
61.IF "$(GUI)"=="UNX"
62
63.IF "$(SYSBASE)"!=""
64curl_CFLAGS+=-I$(SYSBASE)$/usr$/include
65curl_LDFLAGS+=-L$(SYSBASE)$/usr$/lib
66.ENDIF			# "$(SYSBASE)"!=""
67
68.IF "$(OS)$(CPU)"=="SOLARISU"
69curl_CFLAGS+:=$(ARCH_FLAGS)
70curl_LDFLAGS+:=$(ARCH_FLAGS)
71.ENDIF
72
73CONFIGURE_DIR=.$/
74#relative to CONFIGURE_DIR
75CONFIGURE_ACTION=.$/configure
76CONFIGURE_FLAGS= --without-ssl --without-libidn --enable-ftp --enable-ipv6 --enable-http --disable-gopher --disable-file --disable-ldap --disable-telnet --disable-dict --disable-static CPPFLAGS="$(curl_CFLAGS)"  LDFLAGS="$(curl_LDFLAGS)"
77
78BUILD_DIR=$(CONFIGURE_DIR)$/lib
79BUILD_ACTION=$(GNUMAKE)
80BUILD_FLAGS+= -j$(EXTMAXPROCESS)
81
82OUT2LIB=$(BUILD_DIR)$/.libs$/libcurl$(DLLPOST).4
83.ENDIF			# "$(GUI)"=="UNX"
84
85
86.IF "$(GUI)"=="WNT"
87.IF "$(COM)"=="GCC"
88curl_CC=$(CC) -mthreads
89.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
90curl_CC+=-shared-libgcc
91.ENDIF
92curl_LIBS=-lws2_32 -lwinmm
93.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
94curl_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
95.ENDIF
96CONFIGURE_DIR=.$/
97#relative to CONFIGURE_DIR
98CONFIGURE_ACTION=.$/configure
99CONFIGURE_FLAGS= --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)"
100BUILD_DIR=$(CONFIGURE_DIR)$/lib
101BUILD_ACTION=make
102OUT2BIN=$(BUILD_DIR)$/.libs$/libcurl*.dll
103OUT2LIB=$(BUILD_DIR)$/.libs$/libcurl*.dll.a
104.ELSE
105# make use of stlport headerfiles
106EXT_USE_STLPORT=TRUE
107
108.IF "$(CCNUMVER)" > "001399999999"
109EXCFLAGS="/EHa /Zc:wchar_t- /D "_CRT_SECURE_NO_DEPRECATE""
110.ELSE
111EXCFLAGS="/EHsc /YX"
112.ENDIF
113
114BUILD_DIR=.$/lib
115.IF "$(debug)"==""
116BUILD_ACTION=nmake -f Makefile.vc9 cfg=release-dll EXCFLAGS=$(EXCFLAGS)
117.ELSE
118BUILD_ACTION=nmake -f Makefile.vc9 cfg=debug-dll EXCFLAGS=$(EXCFLAGS)
119.ENDIF
120
121OUT2BIN=$(BUILD_DIR)$/libcurl.dll
122OUT2LIB=$(BUILD_DIR)$/libcurl.lib
123
124.ENDIF
125.ENDIF			# "$(GUI)"=="WNT"
126
127.IF "$(GUI)"=="OS2"
128# make use of stlport headerfiles
129EXT_USE_STLPORT=TRUE
130
131BUILD_DIR=.$/lib
132.IF "$(debug)"==""
133BUILD_ACTION=make -f Makefile.os2
134.ELSE
135BUILD_ACTION=make -f Makefile.os2
136.ENDIF
137
138OUT2BIN=$(BUILD_DIR)$/libcurl.dll
139OUT2LIB=$(BUILD_DIR)$/libcurl.lib
140
141.ENDIF			# "$(GUI)"=="OS2"
142
143OUT2INC= \
144	include$/curl$/easy.h  			\
145	include$/curl$/multi.h  		\
146	include$/curl$/curl.h  			\
147	include$/curl$/curlver.h  		\
148	include$/curl$/types.h  		\
149	include$/curl$/stdcheaders.h  	\
150	include$/curl$/mprintf.h	    \
151	include$/curl$/curlbuild.h		\
152	include$/curl$/curlrules.h
153
154# --- Targets ------------------------------------------------------
155
156.INCLUDE : set_ext.mk
157.INCLUDE : target.mk
158.INCLUDE : tg_ext.mk
159