xref: /aoo42x/main/curl/makefile.mk (revision 4db81550)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23PRJ=.
24
25PRJNAME=so_curl
26TARGET=so_curl
27
28# --- Settings -----------------------------------------------------
29
30.INCLUDE :	settings.mk
31
32.IF "$(SYSTEM_CURL)" == "YES"
33all:
34	@echo "An already available installation of curl should exist on your system."
35	@echo "Therefore the version provided here does not need to be built in addition."
36.ENDIF
37
38# --- Files --------------------------------------------------------
39
40TARFILE_NAME=curl-8.7.1
41TARFILE_MD5=92f7a11836678b725e2cb59fef10c273
42PATCH_FILES=curl-wnt.patch
43
44#ADDITIONAL_FILES= lib$/config-os2.h lib$/Makefile.os2
45
46.IF "$(GUI)"=="UNX"
47
48.IF "$(SYSBASE)"!=""
49curl_CFLAGS+=-I$(SYSBASE)$/usr$/include
50curl_LDFLAGS+=-L$(SYSBASE)$/usr$/lib
51.ENDIF			# "$(SYSBASE)"!=""
52
53.IF "$(OS)$(CPU)"=="SOLARISU"
54curl_CFLAGS+:=$(ARCH_FLAGS)
55curl_LDFLAGS+:=$(ARCH_FLAGS)
56.ENDIF
57
58.IF "$(SYSTEM_OPENSSL)"=="YES"
59ssl_param=--with-ssl
60.ELSE
61ssl_param=--with-ssl=$(OUTDIR)
62curl_CFLAGS+=-I$(SOLARINCDIR)$/external
63curl_LDFLAGS+=-L$(SOLARLIBDIR) -Wl,-z,origin -Wl,-rpath,\\\$$\$$ORIGIN
64PATCH_FILES+= curl-bundled_openssl.patch
65.ENDIF
66
67CONFIGURE_DIR=.$/
68#relative to CONFIGURE_DIR
69CONFIGURE_ACTION=.$/configure
70CONFIGURE_FLAGS= $(ssl_param) --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)"
71
72BUILD_DIR=$(CONFIGURE_DIR)$/lib
73BUILD_ACTION=$(GNUMAKE)
74BUILD_FLAGS+= -j$(EXTMAXPROCESS)
75
76OUT2LIB=$(BUILD_DIR)$/.libs$/libcurl$(DLLPOST).4
77.ENDIF			# "$(GUI)"=="UNX"
78
79
80.IF "$(GUI)"=="WNT"
81.IF "$(COM)"=="GCC"
82curl_CC=$(CC) -mthreads
83.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
84curl_CC+=-shared-libgcc
85.ENDIF
86curl_LIBS=-lws2_32 -lwinmm
87.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
88curl_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
89.ENDIF
90CONFIGURE_DIR=.$/
91#relative to CONFIGURE_DIR
92CONFIGURE_ACTION=.$/configure
93CONFIGURE_FLAGS= --with-ssl --enable-ftp --enable-ipv6 --enable-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)"
94BUILD_DIR=$(CONFIGURE_DIR)$/lib
95BUILD_ACTION=make
96OUT2BIN=$(BUILD_DIR)$/.libs$/libcurl*.dll
97OUT2LIB=$(BUILD_DIR)$/.libs$/libcurl*.dll.a
98.ELSE
99# make use of stlport headerfiles
100EXT_USE_STLPORT=TRUE
101
102.IF "$(CCNUMVER)" > "001399999999"
103EXCFLAGS="/EHa /Zc:wchar_t- /D "_CRT_SECURE_NO_DEPRECATE""
104.ELSE
105EXCFLAGS="/EHsc /YX"
106.ENDIF
107
108.IF "$(CPUNAME)"=="INTEL"
109curl_MACHINE:="X86"
110.ELIF "$(CPUNAME)"=="X86_64"
111curl_MACHINE:="X64"
112.ENDIF
113
114BUILD_DIR=.$/winbuild
115.IF "$(debug)"==""
116BUILD_ACTION=CC="cl.exe" nmake -f Makefile.vc mode=dll VC=9 EXCFLAGS=$(EXCFLAGS) MACHINE=$(curl_MACHINE) RTLIBCFG=static WITH_DEVEL=$(OUTDIR) WITH_ZLIB=dll WITH_SSL=dll
117.ELSE
118BUILD_ACTION=CC="cl.exe" nmake -f Makefile.vc mode=dll VC=9 DEBUG=yes EXCFLAGS=$(EXCFLAGS) MACHINE=$(curl_MACHINE) RTLIBCFG=static WITH_DEVEL=$(OUTDIR) WITH_ZLIB=dll WITH_SSL=dll
119.ENDIF
120
121.IF "$(CPUNAME)"=="INTEL"
122OUT2BIN=$(BUILD_DIR)$/../builds/libcurl-vc9-X86-release-dll-ssl-dll-zlib-dll-ipv6-sspi/bin/libcurl.dll
123OUT2LIB=$(BUILD_DIR)$/../builds/libcurl-vc9-X86-release-dll-ssl-dll-zlib-dll-ipv6-sspi/lib/libcurl.lib
124.ELIF "$(CPUNAME)"=="X86_64"
125OUT2BIN=$(BUILD_DIR)$/../builds/libcurl-vc9-X64-release-dll-ssl-dll-zlib-dll-ipv6-sspi/bin/libcurl.dll
126OUT2LIB=$(BUILD_DIR)$/../builds/libcurl-vc9-X64-release-dll-ssl-dll-zlib-dll-ipv6-sspi/lib/libcurl.lib
127.ENDIF
128
129.ENDIF
130.ENDIF			# "$(GUI)"=="WNT"
131
132.IF "$(GUI)"=="OS2"
133# make use of stlport headerfiles
134EXT_USE_STLPORT=TRUE
135
136BUILD_DIR=.$/lib
137.IF "$(debug)"==""
138BUILD_ACTION=make -f Makefile.os2
139.ELSE
140BUILD_ACTION=make -f Makefile.os2
141.ENDIF
142
143OUT2BIN=$(BUILD_DIR)$/libcurl.dll
144OUT2LIB=$(BUILD_DIR)$/libcurl.lib
145
146.ENDIF			# "$(GUI)"=="OS2"
147
148OUT2INC= \
149	include$/curl$/curl.h  			\
150	include$/curl$/curlver.h  		\
151	include$/curl$/easy.h  			\
152	include$/curl$/header.h			\
153	include$/curl$/mprintf.h	    \
154	include$/curl$/multi.h  		\
155	include$/curl$/options.h		\
156	include$/curl$/stdcheaders.h  	\
157	include$/curl$/system.h			\
158	include$/curl$/typecheck-gcc.h  	\
159	include$/curl$/urlapi.h			\
160	include$/curl$/websockets.h
161
162
163# --- Targets ------------------------------------------------------
164
165.INCLUDE : set_ext.mk
166.INCLUDE : target.mk
167.INCLUDE : tg_ext.mk
168