2005-11-09 23:18:13 +01:00
|
|
|
# $Id$
|
2005-11-09 23:16:58 +01:00
|
|
|
#
|
2005-11-12 19:33:32 +01:00
|
|
|
# C-ares makefile for MSVC6+
|
2005-11-09 23:16:58 +01:00
|
|
|
# G. Vanem <giva@bgnett.no>.
|
|
|
|
#
|
|
|
|
|
|
|
|
CFG_MODEL = MD
|
|
|
|
DEBUG_MODEL = d
|
|
|
|
USE_WATT32 = 0
|
|
|
|
|
|
|
|
#
|
|
|
|
# Configurations:
|
|
|
|
# -MD - msvcrt.dll, threads, release (normal)
|
|
|
|
# -MDd - msvcrtd.dll, threads, debug
|
|
|
|
# -ML - libc, no threads, release
|
|
|
|
# -MLd - libc, no threads, debug
|
|
|
|
# -MT - libc, threads, release
|
|
|
|
# -MTd - libc, threads, debug
|
|
|
|
|
|
|
|
CC = cl
|
|
|
|
|
2005-12-18 01:27:12 +01:00
|
|
|
CFLAGS = -nologo -$(CFG_MODEL)$(DEBUG_MODEL) -W3 -Yd -Zi
|
2006-01-04 15:21:57 +01:00
|
|
|
LDFLAGS = -machine:i386 -map
|
2005-11-09 23:16:58 +01:00
|
|
|
|
|
|
|
OBJ_DIR = VC6_obj
|
|
|
|
DEF_FILE = cares.def
|
|
|
|
|
|
|
|
!if "$(USE_WATT32)" == "1"
|
2008-12-08 17:09:21 +01:00
|
|
|
CFLAGS = $(CFLAGS) -UWIN32 -DWATT32 -D_USE_32BIT_TIME_T -I$(WATT_ROOT)\inc
|
2005-11-09 23:16:58 +01:00
|
|
|
EX_LIBS = $(WATT_ROOT)\lib\wattcpvc_imp.lib
|
|
|
|
|
|
|
|
!else
|
|
|
|
CFLAGS = $(CFLAGS) -DWIN32 -DWIN32_LEAN_AND_MEAN
|
|
|
|
EX_LIBS = advapi32.lib ws2_32.lib
|
|
|
|
!endif
|
|
|
|
|
|
|
|
!if "$(DEBUG_MODEL)" == "d"
|
|
|
|
CFLAGS = $(CFLAGS) -D_DEBUG -GZ
|
2005-12-18 01:27:12 +01:00
|
|
|
LDFLAGS = $(LDFLAGS) -debug -fixed:no
|
2005-11-09 23:16:58 +01:00
|
|
|
|
|
|
|
!else
|
|
|
|
CFLAGS = $(CFLAGS) -O2 -Og
|
|
|
|
LDFLAGS = $(LDFLAGS) -release
|
|
|
|
!endif
|
|
|
|
|
|
|
|
OBJECTS = $(OBJ_DIR)\ares_fds.obj \
|
|
|
|
$(OBJ_DIR)\ares_process.obj \
|
|
|
|
$(OBJ_DIR)\ares_free_hostent.obj \
|
|
|
|
$(OBJ_DIR)\ares_query.obj \
|
|
|
|
$(OBJ_DIR)\ares__close_sockets.obj \
|
|
|
|
$(OBJ_DIR)\ares_free_string.obj \
|
|
|
|
$(OBJ_DIR)\ares_search.obj \
|
|
|
|
$(OBJ_DIR)\ares__get_hostent.obj \
|
|
|
|
$(OBJ_DIR)\ares_gethostbyaddr.obj \
|
2006-01-04 15:21:57 +01:00
|
|
|
$(OBJ_DIR)\ares_getsock.obj \
|
2005-11-09 23:16:58 +01:00
|
|
|
$(OBJ_DIR)\ares_send.obj \
|
|
|
|
$(OBJ_DIR)\ares__read_line.obj \
|
|
|
|
$(OBJ_DIR)\ares_gethostbyname.obj \
|
|
|
|
$(OBJ_DIR)\ares_getnameinfo.obj \
|
2008-09-15 17:28:26 +02:00
|
|
|
$(OBJ_DIR)\ares_strcasecmp.obj \
|
2005-11-09 23:16:58 +01:00
|
|
|
$(OBJ_DIR)\ares_strerror.obj \
|
|
|
|
$(OBJ_DIR)\ares_cancel.obj \
|
|
|
|
$(OBJ_DIR)\ares_init.obj \
|
2007-10-02 04:18:01 +02:00
|
|
|
$(OBJ_DIR)\ares_llist.obj \
|
2005-11-09 23:16:58 +01:00
|
|
|
$(OBJ_DIR)\ares_timeout.obj \
|
2008-05-09 18:30:24 +02:00
|
|
|
$(OBJ_DIR)\ares__timeval.obj \
|
2005-11-09 23:16:58 +01:00
|
|
|
$(OBJ_DIR)\ares_destroy.obj \
|
|
|
|
$(OBJ_DIR)\ares_mkquery.obj \
|
|
|
|
$(OBJ_DIR)\ares_version.obj \
|
|
|
|
$(OBJ_DIR)\ares_expand_name.obj \
|
|
|
|
$(OBJ_DIR)\ares_parse_a_reply.obj \
|
|
|
|
$(OBJ_DIR)\ares_parse_aaaa_reply.obj \
|
2007-02-19 18:44:59 +01:00
|
|
|
$(OBJ_DIR)\ares_parse_ns_reply.obj \
|
2005-11-09 23:16:58 +01:00
|
|
|
$(OBJ_DIR)\windows_port.obj \
|
|
|
|
$(OBJ_DIR)\ares_expand_string.obj \
|
|
|
|
$(OBJ_DIR)\ares_parse_ptr_reply.obj \
|
2008-09-16 18:42:48 +02:00
|
|
|
$(OBJ_DIR)\ares_writev.obj \
|
2005-11-09 23:16:58 +01:00
|
|
|
$(OBJ_DIR)\bitncmp.obj \
|
|
|
|
$(OBJ_DIR)\inet_net_pton.obj \
|
|
|
|
$(OBJ_DIR)\inet_ntop.obj
|
|
|
|
|
2007-12-11 18:23:18 +01:00
|
|
|
all: $(OBJ_DIR) cares.lib cares.dll cares_imp.lib ahost.exe adig.exe acountry.exe
|
2007-02-19 18:44:59 +01:00
|
|
|
@echo Welcome to c-ares library and examples
|
2005-11-09 23:16:58 +01:00
|
|
|
|
|
|
|
$(OBJ_DIR):
|
2005-11-12 19:33:32 +01:00
|
|
|
mkdir $(OBJ_DIR)
|
2005-11-09 23:16:58 +01:00
|
|
|
|
2005-12-18 01:27:12 +01:00
|
|
|
cares.lib: $(OBJ_DIR) $(OBJECTS)
|
2005-11-12 19:33:32 +01:00
|
|
|
lib -nologo -out:$@ $(OBJECTS)
|
2005-11-09 23:16:58 +01:00
|
|
|
|
2005-12-18 01:27:12 +01:00
|
|
|
cares_imp.lib cares.dll: $(OBJ_DIR) $(DEF_FILE) $(OBJECTS)
|
2005-11-12 19:33:32 +01:00
|
|
|
link $(LDFLAGS) -dll -implib:cares_imp.lib -out:cares.dll \
|
|
|
|
-def:$(DEF_FILE) $(OBJECTS) $(EX_LIBS)
|
2005-11-09 23:16:58 +01:00
|
|
|
|
|
|
|
$(DEF_FILE): $(OBJECTS) Makefile.VC6
|
2005-11-12 19:33:32 +01:00
|
|
|
@echo ; Generated. DO NOT EDIT > $@
|
|
|
|
@echo LIBRARY cares.dll >> $@
|
|
|
|
@echo EXPORTS >> $@
|
|
|
|
@echo ares_cancel >> $@
|
|
|
|
@echo ares_destroy >> $@
|
|
|
|
@echo ares_expand_name >> $@
|
|
|
|
@echo ares_expand_string >> $@
|
|
|
|
@echo ares_fds >> $@
|
|
|
|
@echo ares_free_hostent >> $@
|
|
|
|
@echo ares_free_string >> $@
|
|
|
|
@echo ares_gethostbyaddr >> $@
|
|
|
|
@echo ares_gethostbyname >> $@
|
2006-01-04 15:21:57 +01:00
|
|
|
@echo ares_getsock >> $@
|
2005-11-12 19:33:32 +01:00
|
|
|
@echo ares_init >> $@
|
|
|
|
@echo ares_init_options >> $@
|
|
|
|
@echo ares_mkquery >> $@
|
|
|
|
@echo ares_parse_a_reply >> $@
|
|
|
|
@echo ares_parse_ptr_reply >> $@
|
2007-02-19 18:44:59 +01:00
|
|
|
@echo ares_parse_ns_reply >> $@
|
2005-11-12 19:33:32 +01:00
|
|
|
@echo ares_process >> $@
|
2008-08-21 01:38:36 +02:00
|
|
|
@echo ares_process_fd >> $@
|
2005-11-12 19:33:32 +01:00
|
|
|
@echo ares_query >> $@
|
|
|
|
@echo ares_search >> $@
|
|
|
|
@echo ares_strerror >> $@
|
|
|
|
@echo ares_strncasecmp >> $@
|
|
|
|
@echo ares_strcasecmp >> $@
|
|
|
|
@echo ares_timeout >> $@
|
|
|
|
@echo ares_version >> $@
|
|
|
|
@echo ares_inet_net_pton >> $@
|
|
|
|
@echo ares_inet_ntop >> $@
|
|
|
|
@echo ares_inet_pton >> $@
|
|
|
|
@echo ares_getnameinfo >> $@
|
|
|
|
@echo ares_parse_aaaa_reply >> $@
|
2008-12-08 17:09:21 +01:00
|
|
|
!if "$(USE_WATT32)" == "0"
|
|
|
|
@echo ares_writev >> $@
|
|
|
|
!endif
|
2005-11-09 23:16:58 +01:00
|
|
|
|
2007-04-16 11:01:16 +02:00
|
|
|
ahost.exe: $(OBJ_DIR) $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib
|
|
|
|
link $(LDFLAGS) -out:$@ $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib $(EX_LIBS)
|
2005-11-09 23:16:58 +01:00
|
|
|
|
2007-04-16 11:01:16 +02:00
|
|
|
adig.exe: $(OBJ_DIR) $(OBJ_DIR)\adig.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib
|
|
|
|
link $(LDFLAGS) -out:$@ $(OBJ_DIR)\adig.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib $(EX_LIBS)
|
2005-11-09 23:16:58 +01:00
|
|
|
|
2007-12-11 18:23:18 +01:00
|
|
|
acountry.exe: $(OBJ_DIR) $(OBJ_DIR)\acountry.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib
|
|
|
|
link $(LDFLAGS) -out:$@ $(OBJ_DIR)\acountry.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib $(EX_LIBS)
|
|
|
|
|
2005-11-09 23:16:58 +01:00
|
|
|
clean:
|
2005-11-12 19:33:32 +01:00
|
|
|
- del $(OBJ_DIR)\*.obj *.ilk *.pdb *.pbt *.pbi *.pbo *._xe *.map
|
2005-11-09 23:16:58 +01:00
|
|
|
|
|
|
|
vclean realclean: clean
|
2008-05-22 18:10:57 +02:00
|
|
|
- del $(DEF_FILE) cares.lib cares_imp.* cares.dll
|
|
|
|
- del ahost.exe adig.exe acountry.exe
|
2005-11-12 19:33:32 +01:00
|
|
|
- rd $(OBJ_DIR)
|
2005-11-09 23:16:58 +01:00
|
|
|
|
|
|
|
.c{$(OBJ_DIR)}.obj:
|
2005-11-12 19:33:32 +01:00
|
|
|
$(CC) $(CFLAGS) -Fo$*.obj -c $<
|
2005-11-09 23:16:58 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# Copyright "gcc -MM .."
|
|
|
|
#
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_fds.obj: ares_fds.c setup.h setup_once.h ares.h ares_private.h \
|
2005-11-09 23:16:58 +01:00
|
|
|
ares_ipv6.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_process.obj: ares_process.c setup.h setup_once.h nameser.h \
|
|
|
|
ares.h ares_dns.h ares_private.h ares_ipv6.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_free_hostent.obj: ares_free_hostent.c setup.h setup_once.h \
|
|
|
|
ares.h ares_private.h ares_ipv6.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_query.obj: ares_query.c setup.h setup_once.h nameser.h \
|
|
|
|
ares.h ares_dns.h ares_private.h ares_ipv6.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares__close_sockets.obj: ares__close_sockets.c setup.h setup_once.h \
|
|
|
|
ares.h ares_private.h ares_ipv6.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_free_string.obj: ares_free_string.c setup.h setup_once.h ares.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_search.obj: ares_search.c setup.h setup_once.h nameser.h \
|
|
|
|
ares.h ares_private.h ares_ipv6.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares__get_hostent.obj: ares__get_hostent.c setup.h setup_once.h \
|
|
|
|
ares.h ares_private.h ares_ipv6.h inet_net_pton.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_gethostbyaddr.obj: ares_gethostbyaddr.c setup.h setup_once.h \
|
|
|
|
nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_send.obj: ares_send.c setup.h setup_once.h nameser.h ares.h \
|
|
|
|
ares_dns.h ares_private.h ares_ipv6.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares__read_line.obj: ares__read_line.c setup.h setup_once.h ares.h \
|
2005-11-09 23:16:58 +01:00
|
|
|
ares_private.h ares_ipv6.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_gethostbyname.obj: ares_gethostbyname.c setup.h setup_once.h \
|
|
|
|
nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h bitncmp.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2008-09-15 17:28:26 +02:00
|
|
|
$(OBJ_DIR)\ares_strcasecmp.obj: ares_strcasecmp.c setup.h setup_once.h ares.h
|
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_strerror.obj: ares_strerror.c setup.h setup_once.h ares.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_cancel.obj: ares_cancel.c setup.h setup_once.h ares.h \
|
2005-11-09 23:16:58 +01:00
|
|
|
ares_private.h ares_ipv6.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_init.obj: ares_init.c setup.h setup_once.h nameser.h ares.h \
|
2005-11-09 23:16:58 +01:00
|
|
|
ares_private.h ares_ipv6.h inet_net_pton.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_timeout.obj: ares_timeout.c setup.h setup_once.h ares.h \
|
2005-11-09 23:16:58 +01:00
|
|
|
ares_private.h ares_ipv6.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2008-05-09 18:30:24 +02:00
|
|
|
$(OBJ_DIR)\ares__timeval.obj: ares__timeval.c setup.h setup_once.h ares.h \
|
|
|
|
ares_private.h ares_ipv6.h
|
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_destroy.obj: ares_destroy.c setup.h setup_once.h ares.h \
|
2005-11-09 23:16:58 +01:00
|
|
|
ares_private.h ares_ipv6.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_mkquery.obj: ares_mkquery.c setup.h setup_once.h nameser.h \
|
|
|
|
ares.h ares_dns.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_version.obj: ares_version.c setup.h setup_once.h ares_version.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_expand_name.obj: ares_expand_name.c setup.h setup_once.h \
|
|
|
|
nameser.h ares.h ares_private.h ares_ipv6.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_parse_a_reply.obj: ares_parse_a_reply.c setup.h setup_once.h \
|
|
|
|
nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\windows_port.obj: windows_port.c setup.h setup_once.h nameser.h \
|
|
|
|
ares.h ares_private.h ares_ipv6.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_expand_string.obj: ares_expand_string.c setup.h setup_once.h \
|
|
|
|
nameser.h ares.h ares_private.h ares_ipv6.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_parse_ptr_reply.obj: ares_parse_ptr_reply.c setup.h \
|
|
|
|
setup_once.h nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_parse_aaaa_reply.obj: ares_parse_aaaa_reply.c setup.h \
|
|
|
|
setup_once.h nameser.h ares.h ares_dns.h inet_net_pton.h ares_private.h \
|
2005-11-09 23:16:58 +01:00
|
|
|
ares_ipv6.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2007-04-12 21:01:19 +02:00
|
|
|
$(OBJ_DIR)\ares_parse_ns_reply.obj: ares_parse_ns_reply.c setup.h \
|
2007-02-19 18:44:59 +01:00
|
|
|
setup_once.h nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h
|
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\ares_getnameinfo.obj: ares_getnameinfo.c setup.h setup_once.h \
|
|
|
|
nameser.h ares.h ares_private.h ares_ipv6.h inet_ntop.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\inet_net_pton.obj: inet_net_pton.c setup.h setup_once.h nameser.h \
|
|
|
|
ares_ipv6.h inet_net_pton.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2005-11-09 23:16:58 +01:00
|
|
|
$(OBJ_DIR)\bitncmp.obj: bitncmp.c bitncmp.h
|
2007-02-19 18:44:59 +01:00
|
|
|
|
2006-07-29 10:39:20 +02:00
|
|
|
$(OBJ_DIR)\inet_ntop.obj: inet_ntop.c setup.h setup_once.h nameser.h \
|
|
|
|
ares_ipv6.h inet_ntop.h
|
2007-04-12 21:01:19 +02:00
|
|
|
|
2007-04-16 11:01:16 +02:00
|
|
|
$(OBJ_DIR)\ares_getopt.obj: ares_getopt.c ares_getopt.h
|
2007-10-02 04:18:01 +02:00
|
|
|
|
|
|
|
$(OBJ_DIR)\ares_llist.obj: ares_llist.c setup.h setup_once.h ares.h \
|
|
|
|
ares_private.h ares_llist.h
|
2008-09-16 18:42:48 +02:00
|
|
|
|
|
|
|
$(OBJ_DIR)\ares_writev.obj: ares_writev.c setup.h setup_once.h ares.h \
|
|
|
|
ares_writev.h
|