xref: /aoo42x/main/curl/makefile.mk (revision e35fcbcf)
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-7.50.1
41TARFILE_MD5=c264788f2e4313a05140d712c1ec90c2
42PATCH_FILES=
43
44.IF "$(GUI)"=="WNT"
45	PATCH_FILES+=curl-7.50.1_win.patch
46#	.IF "$(COM)"=="GCC"
47#		PATCH_FILES+=curl-7.19.7_mingw.patch
48#	.ENDIF
49.ENDIF
50
51
52#CONVERTFILES= \
53    lib$/Makefile.vc6
54
55#ADDITIONAL_FILES= lib$/config-os2.h lib$/Makefile.os2
56
57.IF "$(GUI)"=="UNX"
58
59.IF "$(SYSBASE)"!=""
60curl_CFLAGS+=-I$(SYSBASE)$/usr$/include
61curl_LDFLAGS+=-L$(SYSBASE)$/usr$/lib
62.ENDIF			# "$(SYSBASE)"!=""
63
64.IF "$(OS)$(CPU)"=="SOLARISU"
65curl_CFLAGS+:=$(ARCH_FLAGS)
66curl_LDFLAGS+:=$(ARCH_FLAGS)
67.ENDIF
68
69CONFIGURE_DIR=.$/
70#relative to CONFIGURE_DIR
71CONFIGURE_ACTION=.$/configure
72CONFIGURE_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)"
73
74BUILD_DIR=$(CONFIGURE_DIR)$/lib
75BUILD_ACTION=$(GNUMAKE)
76BUILD_FLAGS+= -j$(EXTMAXPROCESS)
77
78OUT2LIB=$(BUILD_DIR)$/.libs$/libcurl$(DLLPOST).4
79.ENDIF			# "$(GUI)"=="UNX"
80
81
82.IF "$(GUI)"=="WNT"
83.IF "$(COM)"=="GCC"
84curl_CC=$(CC) -mthreads
85.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
86curl_CC+=-shared-libgcc
87.ENDIF
88curl_LIBS=-lws2_32 -lwinmm
89.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
90curl_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
91.ENDIF
92CONFIGURE_DIR=.$/
93#relative to CONFIGURE_DIR
94CONFIGURE_ACTION=.$/configure
95CONFIGURE_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)"
96BUILD_DIR=$(CONFIGURE_DIR)$/lib
97BUILD_ACTION=make
98OUT2BIN=$(BUILD_DIR)$/.libs$/libcurl*.dll
99OUT2LIB=$(BUILD_DIR)$/.libs$/libcurl*.dll.a
100.ELSE
101# make use of stlport headerfiles
102EXT_USE_STLPORT=TRUE
103
104.IF "$(CCNUMVER)" > "001399999999"
105EXCFLAGS="/EHa /Zc:wchar_t- /D "_CRT_SECURE_NO_DEPRECATE""
106.ELSE
107EXCFLAGS="/EHsc /YX"
108.ENDIF
109
110.IF "$(CPUNAME)"=="INTEL"
111curl_MACHINE:="X86"
112.ELIF "$(CPUNAME)"=="X86_64"
113curl_MACHINE:="X64"
114.ENDIF
115
116BUILD_DIR=.$/lib
117.IF "$(debug)"==""
118BUILD_ACTION=nmake -f Makefile.vc9 cfg=release-dll EXCFLAGS=$(EXCFLAGS) MACHINE=$(curl_MACHINE)
119.ELSE
120BUILD_ACTION=nmake -f Makefile.vc9 cfg=debug-dll EXCFLAGS=$(EXCFLAGS) MACHINE=$(curl_MACHINE)
121.ENDIF
122
123OUT2BIN=$(BUILD_DIR)$/libcurl.dll
124OUT2LIB=$(BUILD_DIR)$/libcurl.lib
125
126.ENDIF
127.ENDIF			# "$(GUI)"=="WNT"
128
129.IF "$(GUI)"=="OS2"
130# make use of stlport headerfiles
131EXT_USE_STLPORT=TRUE
132
133BUILD_DIR=.$/lib
134.IF "$(debug)"==""
135BUILD_ACTION=make -f Makefile.os2
136.ELSE
137BUILD_ACTION=make -f Makefile.os2
138.ENDIF
139
140OUT2BIN=$(BUILD_DIR)$/libcurl.dll
141OUT2LIB=$(BUILD_DIR)$/libcurl.lib
142
143.ENDIF			# "$(GUI)"=="OS2"
144
145OUT2INC= \
146	include$/curl$/easy.h  			\
147	include$/curl$/multi.h  		\
148	include$/curl$/curl.h  			\
149	include$/curl$/curlver.h  		\
150	include$/curl$/typecheck-gcc.h  	\
151	include$/curl$/stdcheaders.h  	\
152	include$/curl$/mprintf.h	    \
153	include$/curl$/curlbuild.h		\
154	include$/curl$/curlrules.h
155
156# --- Targets ------------------------------------------------------
157
158.INCLUDE : set_ext.mk
159.INCLUDE : target.mk
160.INCLUDE : tg_ext.mk
161