2004-08-19 17:16:40 +02:00
|
|
|
#
|
2004-08-19 17:24:49 +02:00
|
|
|
# c-ares Makefile for djgpp/gcc/Watt-32.
|
2004-08-19 17:16:40 +02:00
|
|
|
# By Gisle Vanem <giva@bgnett.no> 2004.
|
|
|
|
#
|
2006-10-31 18:24:25 +01:00
|
|
|
# $Id$
|
2004-08-19 17:16:40 +02:00
|
|
|
|
2007-02-27 16:35:06 +01:00
|
|
|
TOPDIR = ..
|
|
|
|
|
2006-10-31 18:24:25 +01:00
|
|
|
include ../packages/DOS/common.dj
|
2004-08-19 17:16:40 +02:00
|
|
|
|
2006-10-31 18:24:25 +01:00
|
|
|
include Makefile.inc
|
2004-08-19 17:16:40 +02:00
|
|
|
|
2008-05-15 22:47:45 +02:00
|
|
|
CFLAGS += -DWATT32 -DHAVE_AF_INET6 -DHAVE_PF_INET6 -DHAVE_IOCTLSOCKET \
|
2008-12-08 15:58:56 +01:00
|
|
|
-DHAVE_IOCTLSOCKET_FIONBIO -DHAVE_STRUCT_IN6_ADDR \
|
|
|
|
-DHAVE_SOCKADDR_IN6_SIN6_SCOPE_ID -DHAVE_SYS_TIME_H \
|
|
|
|
-DHAVE_STRUCT_SOCKADDR_IN6 -DHAVE_STRUCT_ADDRINFO \
|
|
|
|
-DHAVE_ARPA_NAMESER_H -DHAVE_ARPA_INET_H -DHAVE_SYS_SOCKET_H \
|
2008-05-15 22:47:45 +02:00
|
|
|
-DHAVE_SYS_UIO_H -DHAVE_NETINET_IN_H -DHAVE_NETINET_TCP_H \
|
|
|
|
-DNS_INADDRSZ=4 -DHAVE_RECV -DHAVE_SEND -DHAVE_GETTIMEOFDAY \
|
2006-10-31 18:24:25 +01:00
|
|
|
-DSEND_TYPE_ARG1='int' -DSEND_QUAL_ARG2='const' \
|
|
|
|
-DSEND_TYPE_ARG2='void*' -DSEND_TYPE_ARG3='int' \
|
|
|
|
-DSEND_TYPE_ARG4='int' -DSEND_TYPE_RETV='int' \
|
|
|
|
-DRECV_TYPE_ARG1='int' -DRECV_TYPE_ARG2='void*' \
|
|
|
|
-DRECV_TYPE_ARG3='int' -DRECV_TYPE_ARG4='int' \
|
2007-02-27 16:35:06 +01:00
|
|
|
-DRECV_TYPE_RETV='int' -DHAVE_STRUCT_TIMEVAL \
|
2009-05-02 04:36:47 +02:00
|
|
|
-Dselect=select_s -UHAVE_CONFIG_H \
|
2008-07-17 05:07:54 +02:00
|
|
|
-DRECVFROM_TYPE_ARG1='int' -DRECVFROM_TYPE_ARG2='void' \
|
|
|
|
-DRECVFROM_TYPE_ARG3='int' -DRECVFROM_TYPE_ARG4='int' \
|
|
|
|
-DRECVFROM_TYPE_ARG6='int' -DRECVFROM_TYPE_RETV='int' \
|
2008-07-21 02:36:55 +02:00
|
|
|
-DRECVFROM_TYPE_ARG5='struct sockaddr' -DHAVE_RECVFROM \
|
2008-09-21 15:03:07 +02:00
|
|
|
-DRECVFROM_TYPE_ARG2_IS_VOID -DHAVE_STRDUP -DHAVE_NETDB_H \
|
2009-04-18 18:49:29 +02:00
|
|
|
-DHAVE_STRCASECMP -DHAVE_STRNCASECMP -DHAVE_GETHOSTNAME \
|
|
|
|
-DHAVE_LIMITS_H
|
2005-11-09 23:52:45 +01:00
|
|
|
|
2004-08-19 17:16:40 +02:00
|
|
|
LDFLAGS = -s
|
|
|
|
|
2006-10-31 18:24:25 +01:00
|
|
|
ifeq ($(USE_DEBUG),1)
|
2009-06-13 02:52:48 +02:00
|
|
|
CFLAGS += -DDEBUGBUILD
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_CURLDEBUG),1)
|
|
|
|
CFLAGS += -DCURLDEBUG
|
2007-03-17 18:56:21 +01:00
|
|
|
EX_LIBS = ../lib/libcurl.a
|
|
|
|
OBJ_HACK = $(OBJECTS)
|
|
|
|
else
|
|
|
|
OBJ_HACK = libcares.a
|
2006-10-31 18:24:25 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_SSL),1)
|
|
|
|
EX_LIBS += $(OPENSSL_ROOT)/lib/libssl.a $(OPENSSL_ROOT)/lib/libcrypt.a
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_ZLIB),1)
|
|
|
|
EX_LIBS += $(ZLIB_ROOT)/libz.a
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_IDNA),1)
|
|
|
|
EX_LIBS += $(LIBIDN_ROOT)/lib/dj_obj/libidn.a -liconv
|
|
|
|
endif
|
|
|
|
|
|
|
|
EX_LIBS += $(WATT32_ROOT)/lib/libwatt.a
|
2004-08-19 17:16:40 +02:00
|
|
|
|
|
|
|
OBJECTS = $(addprefix $(OBJ_DIR)/, $(CSOURCES:.c=.o))
|
|
|
|
|
2007-12-11 18:22:20 +01:00
|
|
|
all: $(OBJ_DIR) libcares.a ahost.exe adig.exe acountry.exe
|
2004-08-19 17:16:40 +02:00
|
|
|
@echo Welcome to c-ares.
|
|
|
|
|
|
|
|
libcares.a: $(OBJECTS)
|
|
|
|
ar rs $@ $?
|
|
|
|
|
2007-04-16 18:52:56 +02:00
|
|
|
ahost.exe: ahost.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
|
2004-08-19 17:16:40 +02:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
|
|
|
|
|
2007-04-16 18:52:56 +02:00
|
|
|
adig.exe: adig.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
|
2004-08-19 17:16:40 +02:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
|
|
|
|
|
2007-12-11 18:22:20 +01:00
|
|
|
acountry.exe: acountry.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
|
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
|
|
|
|
|
2004-08-19 17:16:40 +02:00
|
|
|
clean:
|
2009-05-21 13:43:15 +02:00
|
|
|
rm -f $(OBJECTS) $(OBJ_DIR)/ares_getopt.o libcares.a
|
2004-08-19 17:16:40 +02:00
|
|
|
|
|
|
|
vclean realclean: clean
|
2007-12-11 18:22:20 +01:00
|
|
|
rm -f ahost.exe adig.exe acountry.exe depend.dj
|
2004-08-19 17:16:40 +02:00
|
|
|
- rmdir $(OBJ_DIR)
|
|
|
|
|
2007-02-27 16:35:06 +01:00
|
|
|
-include depend.dj
|
|
|
|
|