aboutsummaryrefslogtreecommitdiff
path: root/ares/Makefile.dj
blob: 51439284b4034971cede1e0cbd4250e9af735fa4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#
# c-ares Makefile for djgpp/gcc/Watt-32.
#   By Gisle Vanem <giva@bgnett.no> 2004.
#
# $Id$

TOPDIR = ..

include ../packages/DOS/common.dj

include Makefile.inc

CFLAGS += -DWATT32 -DHAVE_AF_INET6 -DHAVE_PF_INET6 -DHAVE_IOCTLSOCKET \
          -DHAVE_STRUCT_IN6_ADDR -DHAVE_SOCKADDR_IN6_SIN6_SCOPE_ID \
          -DHAVE_SYS_TIME_H -DHAVE_STRUCT_SOCKADDR_IN6 -DHAVE_STRUCT_ADDRINFO \
          -DHAVE_SIGNAL_H -DHAVE_SIG_ATOMIC_T -DRETSIGTYPE='void' \
          -DHAVE_PROCESS_H -DHAVE_ARPA_NAMESER_H -DHAVE_SYS_SOCKET_H \
          -DHAVE_SYS_UIO_H -DHAVE_NETINET_IN_H -DHAVE_NETINET_TCP_H \
          -DNS_INADDRSZ=4 -DHAVE_RECV -DHAVE_SEND -DHAVE_GETTIMEOFDAY \
          -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' \
          -DRECV_TYPE_RETV='int'   -DHAVE_STRUCT_TIMEVAL \
          -Dselect=select_s        -Dsocklen_t=int -UHAVE_CONFIG_H \
          -DRECVFROM_TYPE_ARG1='int' -DRECVFROM_TYPE_ARG2='void' \
          -DRECVFROM_TYPE_ARG3='int' -DRECVFROM_TYPE_ARG4='int' \
          -DRECVFROM_TYPE_ARG6='int' -DRECVFROM_TYPE_RETV='int' \
          -DRECVFROM_TYPE_ARG5='struct sockaddr' -DHAVE_RECVFROM

LDFLAGS = -s

ifeq ($(USE_DEBUG),1)
  EX_LIBS  = ../lib/libcurl.a
  OBJ_HACK = $(OBJECTS)
else
  OBJ_HACK = libcares.a
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

OBJECTS = $(addprefix $(OBJ_DIR)/, $(CSOURCES:.c=.o))

all: $(OBJ_DIR) libcares.a ahost.exe adig.exe acountry.exe
	@echo Welcome to c-ares.

libcares.a: $(OBJECTS)
	ar rs $@ $?

ahost.exe: ahost.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)

adig.exe: adig.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)

acountry.exe: acountry.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)

clean:
	rm -f $(OBJECTS) libcares.a

vclean realclean: clean
	rm -f ahost.exe adig.exe acountry.exe depend.dj
	- rmdir $(OBJ_DIR)

-include depend.dj