2004-08-19 11:16:40 -04:00
|
|
|
#
|
2004-08-19 11:24:49 -04:00
|
|
|
# c-ares Makefile for djgpp/gcc/Watt-32.
|
2004-08-19 11:16:40 -04:00
|
|
|
# By Gisle Vanem <giva@bgnett.no> 2004.
|
|
|
|
#
|
2006-10-31 12:24:25 -05:00
|
|
|
# $Id$
|
2004-08-19 11:16:40 -04:00
|
|
|
|
2007-02-27 10:35:06 -05:00
|
|
|
TOPDIR = ..
|
|
|
|
|
2006-10-31 12:24:25 -05:00
|
|
|
include ../packages/DOS/common.dj
|
2004-08-19 11:16:40 -04:00
|
|
|
|
2006-10-31 12:24:25 -05:00
|
|
|
include Makefile.inc
|
2004-08-19 11:16:40 -04:00
|
|
|
|
2006-10-31 12:24:25 -05:00
|
|
|
CFLAGS += -DWATT32 -DHAVE_AF_INET6 -DHAVE_PF_INET6 -DHAVE_FIONBIO \
|
|
|
|
-DHAVE_STRUCT_IN6_ADDR -DHAVE_SOCKADDR_IN6_SIN6_SCOPE_ID \
|
|
|
|
-DHAVE_SYS_TIME_H -DHAVE_STRUCT_SOCKADDR_IN6 -DHAVE_STRUCT_ADDRINFO \
|
2007-02-06 14:09:57 -05:00
|
|
|
-DHAVE_SIGNAL_H -DHAVE_SIG_ATOMIC_T -DRETSIGTYPE='void' -DHAVE_PROCESS_H \
|
2006-10-31 12:24:25 -05:00
|
|
|
-DHAVE_ARPA_NAMESER_H -DNS_INADDRSZ=4 -DHAVE_RECV -DHAVE_SEND \
|
|
|
|
-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 10:35:06 -05:00
|
|
|
-DRECV_TYPE_RETV='int' -DHAVE_STRUCT_TIMEVAL \
|
|
|
|
-UHAVE_CONFIG_H
|
2005-11-09 17:52:45 -05:00
|
|
|
|
2004-08-19 11:16:40 -04:00
|
|
|
LDFLAGS = -s
|
|
|
|
|
2006-10-31 12:24:25 -05:00
|
|
|
ifeq ($(USE_DEBUG),1)
|
2007-03-17 13:56:21 -04:00
|
|
|
EX_LIBS = ../lib/libcurl.a
|
|
|
|
OBJ_HACK = $(OBJECTS)
|
|
|
|
else
|
|
|
|
OBJ_HACK = libcares.a
|
2006-10-31 12:24:25 -05: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
|
|
|
|
CFLAGS += -DUSE_MANUAL
|
|
|
|
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 11:16:40 -04:00
|
|
|
|
|
|
|
OBJECTS = $(addprefix $(OBJ_DIR)/, $(CSOURCES:.c=.o))
|
|
|
|
|
|
|
|
all: $(OBJ_DIR) libcares.a ahost.exe adig.exe
|
|
|
|
@echo Welcome to c-ares.
|
|
|
|
|
|
|
|
libcares.a: $(OBJECTS)
|
|
|
|
ar rs $@ $?
|
|
|
|
|
2007-03-17 13:56:21 -04:00
|
|
|
ahost.exe: ahost.c $(OBJ_HACK)
|
2004-08-19 11:16:40 -04:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
|
|
|
|
|
2007-03-17 13:56:21 -04:00
|
|
|
adig.exe: adig.c $(OBJ_HACK)
|
2004-08-19 11:16:40 -04:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(OBJECTS) libcares.a
|
|
|
|
|
|
|
|
vclean realclean: clean
|
2007-02-27 10:35:06 -05:00
|
|
|
rm -f ahost.exe adig.exe depend.dj
|
2004-08-19 11:16:40 -04:00
|
|
|
- rmdir $(OBJ_DIR)
|
|
|
|
|
2007-02-27 10:35:06 -05:00
|
|
|
-include depend.dj
|
|
|
|
|