xref: /trunk/main/curl/makefile.mk (revision a2c60cbdcbb6eece9520ddbe417468ab37e7615f)
17871dc3eSAndrew Rist#**************************************************************
2cdf0e10cSrcweir#
37871dc3eSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
47871dc3eSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
57871dc3eSAndrew Rist#  distributed with this work for additional information
67871dc3eSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
77871dc3eSAndrew Rist#  to you under the Apache License, Version 2.0 (the
87871dc3eSAndrew Rist#  "License"); you may not use this file except in compliance
97871dc3eSAndrew Rist#  with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir#
117871dc3eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir#
137871dc3eSAndrew Rist#  Unless required by applicable law or agreed to in writing,
147871dc3eSAndrew Rist#  software distributed under the License is distributed on an
157871dc3eSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
167871dc3eSAndrew Rist#  KIND, either express or implied.  See the License for the
177871dc3eSAndrew Rist#  specific language governing permissions and limitations
187871dc3eSAndrew Rist#  under the License.
19cdf0e10cSrcweir#
207871dc3eSAndrew Rist#**************************************************************
217871dc3eSAndrew Rist
227871dc3eSAndrew Rist
23cdf0e10cSrcweirPRJ=.
24cdf0e10cSrcweir
25cdf0e10cSrcweirPRJNAME=so_curl
26cdf0e10cSrcweirTARGET=so_curl
27cdf0e10cSrcweir
28cdf0e10cSrcweir# --- Settings -----------------------------------------------------
29cdf0e10cSrcweir
30cdf0e10cSrcweir.INCLUDE :  settings.mk
31cdf0e10cSrcweir
32cdf0e10cSrcweir.IF "$(SYSTEM_CURL)" == "YES"
33cdf0e10cSrcweirall:
34cdf0e10cSrcweir    @echo "An already available installation of curl should exist on your system."
35cdf0e10cSrcweir    @echo "Therefore the version provided here does not need to be built in addition."
36cdf0e10cSrcweir.ENDIF
37cdf0e10cSrcweir
38cdf0e10cSrcweir# --- Files --------------------------------------------------------
39cdf0e10cSrcweir
40*a2c60cbdStruckmanTARFILE_NAME=curl-7.49.1
41*a2c60cbdStruckmanTARFILE_MD5=2feb3767b958add6a177c6602ff21e8c
42*a2c60cbdStruckmanPATCH_FILES=
43cdf0e10cSrcweir
44cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
45*a2c60cbdStruckman    PATCH_FILES+=curl-7.49.1_win.patch
46*a2c60cbdStruckman#   .IF "$(COM)"=="GCC"
47*a2c60cbdStruckman#       PATCH_FILES+=curl-7.19.7_mingw.patch
48*a2c60cbdStruckman#   .ENDIF
49cdf0e10cSrcweir.ENDIF
50cdf0e10cSrcweir
51cdf0e10cSrcweir
52cdf0e10cSrcweir#CONVERTFILES= \
53cdf0e10cSrcweir    lib$/Makefile.vc6
54cdf0e10cSrcweir
55cdf0e10cSrcweir#ADDITIONAL_FILES= lib$/config-os2.h lib$/Makefile.os2
56cdf0e10cSrcweir
57cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
58cdf0e10cSrcweir
59cdf0e10cSrcweir.IF "$(SYSBASE)"!=""
60cdf0e10cSrcweircurl_CFLAGS+=-I$(SYSBASE)$/usr$/include
61cdf0e10cSrcweircurl_LDFLAGS+=-L$(SYSBASE)$/usr$/lib
62cdf0e10cSrcweir.ENDIF          # "$(SYSBASE)"!=""
63cdf0e10cSrcweir
64cdf0e10cSrcweir.IF "$(OS)$(CPU)"=="SOLARISU"
65cdf0e10cSrcweircurl_CFLAGS+:=$(ARCH_FLAGS)
66cdf0e10cSrcweircurl_LDFLAGS+:=$(ARCH_FLAGS)
67cdf0e10cSrcweir.ENDIF
68cdf0e10cSrcweir
69cdf0e10cSrcweirCONFIGURE_DIR=.$/
70cdf0e10cSrcweir#relative to CONFIGURE_DIR
71cdf0e10cSrcweirCONFIGURE_ACTION=.$/configure
72cdf0e10cSrcweirCONFIGURE_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)"
73cdf0e10cSrcweir
74cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)$/lib
75cdf0e10cSrcweirBUILD_ACTION=$(GNUMAKE)
76cdf0e10cSrcweirBUILD_FLAGS+= -j$(EXTMAXPROCESS)
77cdf0e10cSrcweir
78cdf0e10cSrcweirOUT2LIB=$(BUILD_DIR)$/.libs$/libcurl$(DLLPOST).4
79cdf0e10cSrcweir.ENDIF          # "$(GUI)"=="UNX"
80cdf0e10cSrcweir
81cdf0e10cSrcweir
82cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
83cdf0e10cSrcweir.IF "$(COM)"=="GCC"
84cdf0e10cSrcweircurl_CC=$(CC) -mthreads
85cdf0e10cSrcweir.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
86cdf0e10cSrcweircurl_CC+=-shared-libgcc
87cdf0e10cSrcweir.ENDIF
88cdf0e10cSrcweircurl_LIBS=-lws2_32 -lwinmm
89cdf0e10cSrcweir.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
90cdf0e10cSrcweircurl_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
91cdf0e10cSrcweir.ENDIF
92cdf0e10cSrcweirCONFIGURE_DIR=.$/
93cdf0e10cSrcweir#relative to CONFIGURE_DIR
94cdf0e10cSrcweirCONFIGURE_ACTION=.$/configure
95cdf0e10cSrcweirCONFIGURE_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)"
96cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)$/lib
97cdf0e10cSrcweirBUILD_ACTION=make
98cdf0e10cSrcweirOUT2BIN=$(BUILD_DIR)$/.libs$/libcurl*.dll
99cdf0e10cSrcweirOUT2LIB=$(BUILD_DIR)$/.libs$/libcurl*.dll.a
100cdf0e10cSrcweir.ELSE
101cdf0e10cSrcweir# make use of stlport headerfiles
102cdf0e10cSrcweirEXT_USE_STLPORT=TRUE
103cdf0e10cSrcweir
104cdf0e10cSrcweir.IF "$(CCNUMVER)" > "001399999999"
105cdf0e10cSrcweirEXCFLAGS="/EHa /Zc:wchar_t- /D "_CRT_SECURE_NO_DEPRECATE""
106cdf0e10cSrcweir.ELSE
107cdf0e10cSrcweirEXCFLAGS="/EHsc /YX"
108cdf0e10cSrcweir.ENDIF
109cdf0e10cSrcweir
110cdf0e10cSrcweirBUILD_DIR=.$/lib
111cdf0e10cSrcweir.IF "$(debug)"==""
112cdf0e10cSrcweirBUILD_ACTION=nmake -f Makefile.vc9 cfg=release-dll EXCFLAGS=$(EXCFLAGS)
113cdf0e10cSrcweir.ELSE
114cdf0e10cSrcweirBUILD_ACTION=nmake -f Makefile.vc9 cfg=debug-dll EXCFLAGS=$(EXCFLAGS)
115cdf0e10cSrcweir.ENDIF
116cdf0e10cSrcweir
117cdf0e10cSrcweirOUT2BIN=$(BUILD_DIR)$/libcurl.dll
118cdf0e10cSrcweirOUT2LIB=$(BUILD_DIR)$/libcurl.lib
119cdf0e10cSrcweir
120cdf0e10cSrcweir.ENDIF
121cdf0e10cSrcweir.ENDIF          # "$(GUI)"=="WNT"
122cdf0e10cSrcweir
123cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
124cdf0e10cSrcweir# make use of stlport headerfiles
125cdf0e10cSrcweirEXT_USE_STLPORT=TRUE
126cdf0e10cSrcweir
127cdf0e10cSrcweirBUILD_DIR=.$/lib
128cdf0e10cSrcweir.IF "$(debug)"==""
129cdf0e10cSrcweirBUILD_ACTION=make -f Makefile.os2
130cdf0e10cSrcweir.ELSE
131cdf0e10cSrcweirBUILD_ACTION=make -f Makefile.os2
132cdf0e10cSrcweir.ENDIF
133cdf0e10cSrcweir
134cdf0e10cSrcweirOUT2BIN=$(BUILD_DIR)$/libcurl.dll
135cdf0e10cSrcweirOUT2LIB=$(BUILD_DIR)$/libcurl.lib
136cdf0e10cSrcweir
137cdf0e10cSrcweir.ENDIF          # "$(GUI)"=="OS2"
138cdf0e10cSrcweir
139cdf0e10cSrcweirOUT2INC= \
140cdf0e10cSrcweir    include$/curl$/easy.h           \
141cdf0e10cSrcweir    include$/curl$/multi.h          \
142cdf0e10cSrcweir    include$/curl$/curl.h           \
143cdf0e10cSrcweir    include$/curl$/curlver.h        \
144*a2c60cbdStruckman    include$/curl$/typecheck-gcc.h      \
145cdf0e10cSrcweir    include$/curl$/stdcheaders.h    \
146cdf0e10cSrcweir    include$/curl$/mprintf.h        \
147cdf0e10cSrcweir    include$/curl$/curlbuild.h      \
148cdf0e10cSrcweir    include$/curl$/curlrules.h
149cdf0e10cSrcweir
150cdf0e10cSrcweir# --- Targets ------------------------------------------------------
151cdf0e10cSrcweir
152cdf0e10cSrcweir.INCLUDE : set_ext.mk
153cdf0e10cSrcweir.INCLUDE : target.mk
154cdf0e10cSrcweir.INCLUDE : tg_ext.mk
155