3 # C-ares makefile for MSVC6+
4 # G. Vanem <giva@bgnett.no>.
13 # -MD - msvcrt.dll, threads, release (normal)
14 # -MDd - msvcrtd.dll, threads, debug
15 # -ML - libc, no threads, release
16 # -MLd - libc, no threads, debug
17 # -MT - libc, threads, release
18 # -MTd - libc, threads, debug
22 CFLAGS = -nologo -$(CFG_MODEL)$(DEBUG_MODEL) -W3 -Yd -Zi
23 LDFLAGS = -machine:i386 -map
28 !if "$(USE_WATT32)" == "1"
29 CFLAGS = $(CFLAGS) -UWIN32 -DWATT32 -I$(WATT_ROOT)\inc
30 EX_LIBS = $(WATT_ROOT)\lib\wattcpvc_imp.lib
33 CFLAGS = $(CFLAGS) -DWIN32 -DWIN32_LEAN_AND_MEAN
34 EX_LIBS = advapi32.lib ws2_32.lib
37 !if "$(DEBUG_MODEL)" == "d"
38 CFLAGS = $(CFLAGS) -D_DEBUG -GZ
39 LDFLAGS = $(LDFLAGS) -debug -fixed:no
42 CFLAGS = $(CFLAGS) -O2 -Og
43 LDFLAGS = $(LDFLAGS) -release
46 OBJECTS = $(OBJ_DIR)\ares_fds.obj \
47 $(OBJ_DIR)\ares_process.obj \
48 $(OBJ_DIR)\ares_free_hostent.obj \
49 $(OBJ_DIR)\ares_query.obj \
50 $(OBJ_DIR)\ares__close_sockets.obj \
51 $(OBJ_DIR)\ares_free_string.obj \
52 $(OBJ_DIR)\ares_search.obj \
53 $(OBJ_DIR)\ares__get_hostent.obj \
54 $(OBJ_DIR)\ares_gethostbyaddr.obj \
55 $(OBJ_DIR)\ares_getsock.obj \
56 $(OBJ_DIR)\ares_send.obj \
57 $(OBJ_DIR)\ares__read_line.obj \
58 $(OBJ_DIR)\ares_gethostbyname.obj \
59 $(OBJ_DIR)\ares_getnameinfo.obj \
60 $(OBJ_DIR)\ares_strerror.obj \
61 $(OBJ_DIR)\ares_cancel.obj \
62 $(OBJ_DIR)\ares_init.obj \
63 $(OBJ_DIR)\ares_llist.obj \
64 $(OBJ_DIR)\ares_timeout.obj \
65 $(OBJ_DIR)\ares__timeval.obj \
66 $(OBJ_DIR)\ares_destroy.obj \
67 $(OBJ_DIR)\ares_mkquery.obj \
68 $(OBJ_DIR)\ares_version.obj \
69 $(OBJ_DIR)\ares_expand_name.obj \
70 $(OBJ_DIR)\ares_parse_a_reply.obj \
71 $(OBJ_DIR)\ares_parse_aaaa_reply.obj \
72 $(OBJ_DIR)\ares_parse_ns_reply.obj \
73 $(OBJ_DIR)\windows_port.obj \
74 $(OBJ_DIR)\ares_expand_string.obj \
75 $(OBJ_DIR)\ares_parse_ptr_reply.obj \
76 $(OBJ_DIR)\bitncmp.obj \
77 $(OBJ_DIR)\inet_net_pton.obj \
78 $(OBJ_DIR)\inet_ntop.obj
80 all: $(OBJ_DIR) cares.lib cares.dll cares_imp.lib ahost.exe adig.exe acountry.exe
81 @echo Welcome to c-ares library and examples
86 cares.lib: $(OBJ_DIR) $(OBJECTS)
87 lib -nologo -out:$@ $(OBJECTS)
89 cares_imp.lib cares.dll: $(OBJ_DIR) $(DEF_FILE) $(OBJECTS)
90 link $(LDFLAGS) -dll -implib:cares_imp.lib -out:cares.dll \
91 -def:$(DEF_FILE) $(OBJECTS) $(EX_LIBS)
93 $(DEF_FILE): $(OBJECTS) Makefile.VC6
94 @echo ; Generated. DO NOT EDIT > $@
95 @echo LIBRARY cares.dll >> $@
97 @echo ares_cancel >> $@
98 @echo ares_destroy >> $@
99 @echo ares_expand_name >> $@
100 @echo ares_expand_string >> $@
102 @echo ares_free_hostent >> $@
103 @echo ares_free_string >> $@
104 @echo ares_gethostbyaddr >> $@
105 @echo ares_gethostbyname >> $@
106 @echo ares_getsock >> $@
107 @echo ares_init >> $@
108 @echo ares_init_options >> $@
109 @echo ares_mkquery >> $@
110 @echo ares_parse_a_reply >> $@
111 @echo ares_parse_ptr_reply >> $@
112 @echo ares_parse_ns_reply >> $@
113 @echo ares_process >> $@
114 @echo ares_query >> $@
115 @echo ares_search >> $@
116 @echo ares_strerror >> $@
117 @echo ares_strncasecmp >> $@
118 @echo ares_strcasecmp >> $@
119 @echo ares_timeout >> $@
120 @echo ares_version >> $@
121 @echo ares_inet_net_pton >> $@
122 @echo ares_inet_ntop >> $@
123 @echo ares_inet_pton >> $@
124 @echo ares_writev >> $@
125 @echo ares_getnameinfo >> $@
126 @echo ares_parse_aaaa_reply >> $@
128 ahost.exe: $(OBJ_DIR) $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib
129 link $(LDFLAGS) -out:$@ $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib $(EX_LIBS)
131 adig.exe: $(OBJ_DIR) $(OBJ_DIR)\adig.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib
132 link $(LDFLAGS) -out:$@ $(OBJ_DIR)\adig.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib $(EX_LIBS)
134 acountry.exe: $(OBJ_DIR) $(OBJ_DIR)\acountry.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib
135 link $(LDFLAGS) -out:$@ $(OBJ_DIR)\acountry.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib $(EX_LIBS)
138 - del $(OBJ_DIR)\*.obj *.ilk *.pdb *.pbt *.pbi *.pbo *._xe *.map
140 vclean realclean: clean
141 - del $(DEF_FILE) cares.lib cares_imp.* cares.dll
142 - del ahost.exe adig.exe acountry.exe
146 $(CC) $(CFLAGS) -Fo$*.obj -c $<
149 # Copyright "gcc -MM .."
151 $(OBJ_DIR)\ares_fds.obj: ares_fds.c setup.h setup_once.h ares.h ares_private.h \
154 $(OBJ_DIR)\ares_process.obj: ares_process.c setup.h setup_once.h nameser.h \
155 ares.h ares_dns.h ares_private.h ares_ipv6.h
157 $(OBJ_DIR)\ares_free_hostent.obj: ares_free_hostent.c setup.h setup_once.h \
158 ares.h ares_private.h ares_ipv6.h
160 $(OBJ_DIR)\ares_query.obj: ares_query.c setup.h setup_once.h nameser.h \
161 ares.h ares_dns.h ares_private.h ares_ipv6.h
163 $(OBJ_DIR)\ares__close_sockets.obj: ares__close_sockets.c setup.h setup_once.h \
164 ares.h ares_private.h ares_ipv6.h
166 $(OBJ_DIR)\ares_free_string.obj: ares_free_string.c setup.h setup_once.h ares.h
168 $(OBJ_DIR)\ares_search.obj: ares_search.c setup.h setup_once.h nameser.h \
169 ares.h ares_private.h ares_ipv6.h
171 $(OBJ_DIR)\ares__get_hostent.obj: ares__get_hostent.c setup.h setup_once.h \
172 ares.h ares_private.h ares_ipv6.h inet_net_pton.h
174 $(OBJ_DIR)\ares_gethostbyaddr.obj: ares_gethostbyaddr.c setup.h setup_once.h \
175 nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h
177 $(OBJ_DIR)\ares_send.obj: ares_send.c setup.h setup_once.h nameser.h ares.h \
178 ares_dns.h ares_private.h ares_ipv6.h
180 $(OBJ_DIR)\ares__read_line.obj: ares__read_line.c setup.h setup_once.h ares.h \
181 ares_private.h ares_ipv6.h
183 $(OBJ_DIR)\ares_gethostbyname.obj: ares_gethostbyname.c setup.h setup_once.h \
184 nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h bitncmp.h
186 $(OBJ_DIR)\ares_strerror.obj: ares_strerror.c setup.h setup_once.h ares.h
188 $(OBJ_DIR)\ares_cancel.obj: ares_cancel.c setup.h setup_once.h ares.h \
189 ares_private.h ares_ipv6.h
191 $(OBJ_DIR)\ares_init.obj: ares_init.c setup.h setup_once.h nameser.h ares.h \
192 ares_private.h ares_ipv6.h inet_net_pton.h
194 $(OBJ_DIR)\ares_timeout.obj: ares_timeout.c setup.h setup_once.h ares.h \
195 ares_private.h ares_ipv6.h
197 $(OBJ_DIR)\ares__timeval.obj: ares__timeval.c setup.h setup_once.h ares.h \
198 ares_private.h ares_ipv6.h
200 $(OBJ_DIR)\ares_destroy.obj: ares_destroy.c setup.h setup_once.h ares.h \
201 ares_private.h ares_ipv6.h
203 $(OBJ_DIR)\ares_mkquery.obj: ares_mkquery.c setup.h setup_once.h nameser.h \
206 $(OBJ_DIR)\ares_version.obj: ares_version.c setup.h setup_once.h ares_version.h
208 $(OBJ_DIR)\ares_expand_name.obj: ares_expand_name.c setup.h setup_once.h \
209 nameser.h ares.h ares_private.h ares_ipv6.h
211 $(OBJ_DIR)\ares_parse_a_reply.obj: ares_parse_a_reply.c setup.h setup_once.h \
212 nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h
214 $(OBJ_DIR)\windows_port.obj: windows_port.c setup.h setup_once.h nameser.h \
215 ares.h ares_private.h ares_ipv6.h
217 $(OBJ_DIR)\ares_expand_string.obj: ares_expand_string.c setup.h setup_once.h \
218 nameser.h ares.h ares_private.h ares_ipv6.h
220 $(OBJ_DIR)\ares_parse_ptr_reply.obj: ares_parse_ptr_reply.c setup.h \
221 setup_once.h nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h
223 $(OBJ_DIR)\ares_parse_aaaa_reply.obj: ares_parse_aaaa_reply.c setup.h \
224 setup_once.h nameser.h ares.h ares_dns.h inet_net_pton.h ares_private.h \
227 $(OBJ_DIR)\ares_parse_ns_reply.obj: ares_parse_ns_reply.c setup.h \
228 setup_once.h nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h
230 $(OBJ_DIR)\ares_getnameinfo.obj: ares_getnameinfo.c setup.h setup_once.h \
231 nameser.h ares.h ares_private.h ares_ipv6.h inet_ntop.h
233 $(OBJ_DIR)\inet_net_pton.obj: inet_net_pton.c setup.h setup_once.h nameser.h \
234 ares_ipv6.h inet_net_pton.h
236 $(OBJ_DIR)\bitncmp.obj: bitncmp.c bitncmp.h
238 $(OBJ_DIR)\inet_ntop.obj: inet_ntop.c setup.h setup_once.h nameser.h \
239 ares_ipv6.h inet_ntop.h
241 $(OBJ_DIR)\ares_getopt.obj: ares_getopt.c ares_getopt.h
243 $(OBJ_DIR)\ares_llist.obj: ares_llist.c setup.h setup_once.h ares.h \
244 ares_private.h ares_llist.h