2 # Watcom / OpenWatcom / Win32 makefile for cURL.
3 # G. Vanem <gvanem@broadpark.no>
7 !error WATCOM environment variable not set!
15 TARGETS = $(LIBNAME).dll $(LIBNAME)_imp.lib $(LIBNAME).lib
23 ! loaddll wcc386 wccd386
24 ! loaddll wpp386 wppd386
26 ! if $(__VERSION__) > 1270
27 ! loaddll wlink wlinkd
43 RD = rmdir /q /s 2>NUL
44 !if $(__VERSION__) < 1250
51 SYS_INCL = -I$(%watcom)$(DS)h$(DS)nt -I$(%watcom)$(DS)h
52 SYS_LIBS = $(%watcom)$(DS)lib386$(DS)nt;$(%watcom)$(DS)lib386
54 CFLAGS = -3r -mf -hc -zff -zgf -zq -zm -s -fr=con -w2 -fpi -oilrtfm &
55 -wcd=201 -bt=nt -bc -d+ -dWIN32 -dHAVE_STRTOLL &
56 -I..$(DS)include -I..$(DS)lib $(SYS_INCL)
59 DEBUG = -dDEBUG=1 -dDEBUGBUILD
60 CFLAGS += -d3 $(DEBUG)
66 CFLAGS += -d_WIN32_WINNT=0x0501 -dENABLE_IPV6
73 ZLIB_ROOT = $(%zlib_root)
75 ZLIB_ROOT = ..$(DS)..$(DS)zlib-1.2.8
79 LIBSSH2_ROOT = $(%libssh2_root)
81 LIBSSH2_ROOT = ..$(DS)..$(DS)libssh2-1.4.3
85 LIBRTMP_ROOT = $(%librtmp_root)
87 LIBRTMP_ROOT = ..$(DS)..$(DS)rtmpdump-2.3
91 OPENSSL_ROOT = $(%openssl_root)
93 OPENSSL_ROOT = ..$(DS)..$(DS)openssl-0.9.8y
97 ARES_ROOT = $(%ares_root)
99 ARES_ROOT = ..$(DS)ares
103 CFLAGS += -wcd=138 -dUSE_OPENSSL -dUSE_SSLEAY -I$(OPENSSL_ROOT)$(DS)inc32
106 OBJ_DIR = WC_Win32.obj
107 LINK_ARG = $(OBJ_DIR)$(DS)wlink.arg
109 # In order to process Makefile.inc wmake must be called with -u switch!
111 !error You MUST call wmake with the -u switch!
113 !include Makefile.inc
115 # For now we still define the CURLX_ONES sources here unless we know how
116 # to split off the prefixed path.
117 CURLX_SOURCES = rawstr.c nonblock.c
119 OBJS = $(CURL_CFILES:.c=.obj)
121 CFLAGS += -DCURL_STATICLIB
124 OBJS += $(CURLX_SOURCES:.c=.obj)
127 OBJS = $OBJ_DIR/$(OBJS: = $OBJ_DIR/)
130 OBJS = $OBJ_DIR\$(OBJS: = $OBJ_DIR\)
133 RESOURCE = $(OBJ_DIR)$(DS)curl.res
135 all: tool_hugehelp.c $(OBJ_DIR) curl.exe .SYMBOLIC
136 @echo Welcome to cURL
140 -$(RM) $(RESOURCE) $(LINK_ARG)
142 vclean distclean: clean .SYMBOLIC
144 -$(RM) curl.exe curl.map curl.sym tool_hugehelp.c
146 tool_hugehelp.c: tool_hugehelp.c.cvs
149 tool_hugehelp.c.cvs: .EXISTSONLY
150 $(CP) tool_hugehelp.c $^@
155 curl.exe: $(OBJS) $(RESOURCE) $(LINK_ARG)
159 $(RC) $(DEBUG) -q -r -zm -bt=nt -I..$(DS)include $(SYS_INCL) $[@ -fo=$^@
161 # suffix search path - vpath-like hack
166 $(CC) $(CFLAGS) $[@ -fo=$^@
168 $(LINK_ARG): $(__MAKEFILES__)
170 @%append $^@ system nt
171 @%append $^@ file { $(OBJS) }
173 @%append $^@ debug all
174 @%append $^@ option symfile
176 @%append $^@ option quiet, map, caseexact, eliminate,
177 @%append $^@ res=$(RESOURCE) libpath $(SYS_LIBS)
179 @%append $^@ library wldap32.lib
180 @%append $^@ library ..$(DS)lib$(DS)$(LIBNAME).lib
182 @%append $^@ library $(ZLIB_ROOT)$(DS)zlib.lib
185 @%append $^@ library $(LIBRTMP_ROOT)$(DS)librtmp$(DS)librtmp.lib, winmm.lib
188 @%append $^@ library $(LIBSSH2_ROOT)$(DS)win32$(DS)libssh2.lib
191 @%append $^@ library $(OPENSSL_ROOT)$(DS)out32$(DS)libeay32.lib, $(OPENSSL_ROOT)$(DS)out32$(DS)ssleay32.lib
194 @%append $^@ library $(ARES_ROOT)$(DS)cares.lib
197 ! if $(__VERSION__) > 1290
198 @%append $^@ library normaliz.lib
200 @%append $^@ import '_IdnToAscii@20' 'NORMALIZ.DLL'.'IdnToAscii'
201 @%append $^@ import '_IdnToUnicode@20' 'NORMALIZ.DLL'.'IdnToUnicode'
205 @%append $^@ library ..$(DS)lib$(DS)$(LIBNAME)_imp.lib
208 @%append $^@ library $(%watt_root)$(DS)lib$(DS)wattcpw_imp.lib
210 @%append $^@ library ws2_32.lib