2003-10-07 23:54:04 +02:00
|
|
|
# $Id$
|
|
|
|
|
|
|
|
SHELL=/bin/sh
|
|
|
|
INSTALL=@INSTALL@
|
|
|
|
RANLIB=@RANLIB@
|
|
|
|
VPATH=@srcdir@
|
|
|
|
srcdir=@srcdir@
|
|
|
|
top_srcdir=@top_srcdir@
|
|
|
|
prefix=@prefix@
|
|
|
|
exec_prefix=@exec_prefix@
|
|
|
|
libdir=@libdir@
|
|
|
|
includedir=@includedir@
|
|
|
|
mandir=@mandir@
|
|
|
|
|
2004-02-03 14:58:08 +01:00
|
|
|
LIB=libcares.a
|
2003-10-07 23:54:04 +02:00
|
|
|
CC=@CC@
|
|
|
|
CPPFLAGS=@CPPFLAGS@
|
|
|
|
CFLAGS=@CFLAGS@ ${WARN_CFLAGS} ${ERROR_CFLAGS}
|
|
|
|
DEFS=@DEFS@
|
|
|
|
LDFLAGS=@LDFLAGS@
|
|
|
|
LIBS=@LIBS@
|
|
|
|
ALL_CFLAGS=${CPPFLAGS} ${CFLAGS} ${DEFS}
|
|
|
|
OBJS= ares__close_sockets.o ares__get_hostent.o ares__read_line.o \
|
2004-02-23 14:35:28 +01:00
|
|
|
ares_destroy.o ares_expand_name.o ares_fds.o \
|
2003-10-07 23:54:04 +02:00
|
|
|
ares_free_hostent.o ares_free_string.o ares_gethostbyaddr.o \
|
|
|
|
ares_gethostbyname.o ares_init.o ares_mkquery.o ares_parse_a_reply.o \
|
|
|
|
ares_parse_ptr_reply.o ares_process.o ares_query.o ares_search.o \
|
2004-03-30 11:06:42 +02:00
|
|
|
ares_send.o ares_strerror.o ares_timeout.o ares_version.o \
|
|
|
|
ares_expand_string.o
|
|
|
|
|
|
|
|
MANPAGES= ares_destroy.3 ares_expand_name.3 ares_expand_string.3 ares_fds.3 \
|
|
|
|
ares_free_hostent.3 ares_free_string.3 ares_gethostbyaddr.3 \
|
|
|
|
ares_gethostbyname.3 ares_init.3 ares_init_options.3 ares_mkquery.3 \
|
|
|
|
ares_parse_a_reply.3 ares_parse_ptr_reply.3 ares_process.3 \
|
|
|
|
ares_query.3 ares_search.3 ares_send.3 ares_strerror.3 ares_timeout.3 \
|
|
|
|
ares_version.3
|
|
|
|
|
2003-10-07 23:54:04 +02:00
|
|
|
|
2004-02-03 14:58:08 +01:00
|
|
|
$(LIB): ${OBJS}
|
2003-10-07 23:54:04 +02:00
|
|
|
ar cru $@ ${OBJS}
|
|
|
|
${RANLIB} $@
|
|
|
|
|
2004-02-17 08:40:46 +01:00
|
|
|
all: $(LIB) demos
|
|
|
|
|
|
|
|
demos: adig ahost
|
|
|
|
|
2004-02-04 08:48:20 +01:00
|
|
|
tags:
|
|
|
|
etags *.[ch]
|
|
|
|
|
2004-02-03 14:58:08 +01:00
|
|
|
adig: adig.o $(LIB)
|
|
|
|
${CC} ${LDFLAGS} -o $@ adig.o $(LIB) ${LIBS}
|
2003-10-07 23:54:04 +02:00
|
|
|
|
2004-02-03 14:58:08 +01:00
|
|
|
ahost: ahost.o $(LIB)
|
|
|
|
${CC} ${LDFLAGS} -o $@ ahost.o $(LIB) ${LIBS}
|
2003-10-07 23:54:04 +02:00
|
|
|
|
|
|
|
${OBJS}: ares.h ares_dns.h ares_private.h
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
${CC} -c ${ALL_CFLAGS} $<
|
|
|
|
|
|
|
|
check:
|
|
|
|
|
|
|
|
install:
|
|
|
|
${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir}
|
|
|
|
${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}
|
|
|
|
${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man3
|
2004-02-03 14:58:08 +01:00
|
|
|
${INSTALL} -m 644 $(LIB) ${DESTDIR}${libdir}
|
|
|
|
${RANLIB} ${DESTDIR}${libdir}/$(LIB)
|
|
|
|
chmod u-w ${DESTDIR}${libdir}/$(LIB)
|
2003-10-07 23:54:04 +02:00
|
|
|
${INSTALL} -m 444 ${srcdir}/ares.h ${DESTDIR}${includedir}
|
2004-02-11 13:58:43 +01:00
|
|
|
${INSTALL} -m 444 ${srcdir}/ares_version.h ${DESTDIR}${includedir}
|
2004-03-30 11:06:42 +02:00
|
|
|
(for man in $(MANPAGES); do \
|
|
|
|
${INSTALL} -m 444 ${srcdir}/$${man} ${DESTDIR}${mandir}/man3; \
|
|
|
|
done)
|
2003-10-07 23:54:04 +02:00
|
|
|
|
|
|
|
clean:
|
2004-02-03 14:58:08 +01:00
|
|
|
rm -f ${OBJS} $(LIB) adig.o adig ahost.o ahost
|
2003-10-07 23:54:04 +02:00
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
rm -f config.cache config.log config.status Makefile
|