# @configure_input@

### Path settings
srcdir		= @srcdir@
top_srcdir	= @top_srcdir@
prefix		= @prefix@
exec_prefix	= @exec_prefix@
bindir		= @bindir@
mandir		= @mandir@
libdir		= @libdir@
includedir	= @includedir@

PACKAGE_NAME	= @PACKAGE_NAME@
PACKAGE_VERSION	= @PACKAGE_VERSION@

@ENCAP_DEFS@

### Installation programs and flags
INSTALL		= @INSTALL@
INSTALL_PROGRAM	= @INSTALL_PROGRAM@ -s
INSTALL_DATA	= @INSTALL_DATA@
LN_S		= @LN_S@
MKDIR		= @MKDIR@

### Compiler and link options
CC		= @CC@
CPPFLAGS	= -I.. \
		  -I${srcdir} \
		  -I${top_srcdir}/compat \
		  -I../netio \
		  -I../listhash \
		  -I../pathcode \
		  @CPPFLAGS@
CFLAGS		= @CFLAGS@
RANLIB		= @RANLIB@
LIBOBJS		= @LIBOBJS@
@SET_MAKE@
VPATH		= @srcdir@:@top_srcdir@/compat:../netio:../listhash:../pathcode


### Makefile rules - no user-servicable parts below

#
# netio module
#

NETIO_OBJS	= \
		  fget_netio_handle.o \
		  fget_netio_listen.o \
		  fget_netio_options.o \
		  fget_netio_recv.o \
		  fget_netio_send.o \
		  fget_netio_timeout.o

NETIO_HDRS	= \
		  ../netio/fget_netio.h \
		  ../netio/fget_netio_internal.h

NETIO_DISTCLEAN_FILES = \
		  ../netio/fget_netio_handle.c \
		  ../netio/fget_netio_listen.c \
		  ../netio/fget_netio_options.c \
		  ../netio/fget_netio_recv.c \
		  ../netio/fget_netio_send.c \
		  ../netio/fget_netio_timeout.c \
		  ${NETIO_HDRS}

#
# listhash module
#

LISTHASH_OBJS	= \
		  fget_list.o \
		  fget_hash.o

LISTHASH_HDRS	= \
		  ../listhash/fget_listhash.h

LISTHASH_DISTCLEAN_FILES = \
		  ../listhash/fget_hash.c \
		  ../listhash/fget_list.c \
		  ../listhash/fget_hash_new.3 \
		  ../listhash/fget_list_new.3 \
		  ${LISTHASH_HDRS}

#
# pathcode module
#

PATHCODE_OBJS	= \
		  fget_cleanpath.o

PATHCODE_HDRS	= \
		  ../pathcode/fget_pathcode.h

PATHCODE_DISTCLEAN_FILES = \
		  ../pathcode/fget_cleanpath.c \
		  ../pathcode/fget_gsub.c \
		  ../pathcode/fget_relativepath.c \
		  ../pathcode/fget_rmtree.c \
		  ../pathcode/fget_mkdirhier.c \
		  ${PATHCODE_HDRS}

#
# libfget
#

LIBFGET_HDRS	= \
		  ../config.h \
		  ${srcdir}/libfget.h \
		  ${srcdir}/internal.h \
		  ${top_srcdir}/compat/compat.h

LIBFGET_OBJS	= \
		  dircache.o \
		  ftpdata.o \
		  ftpdir.o \
		  ftpfile.o \
		  ftpglob.o \
		  ftplist.o \
		  ftpops.o \
		  ftpsite.o \
		  ftpstat.o \
		  handle.o \
		  list_parse_dummy.o \
		  list_parse_eplf.o \
		  list_parse_mlsd.o \
		  list_parse_nt.o \
		  list_parse_unix.o \
		  options.o \
		  protocol.o \
		  url.o \

#
# putting it all together
#

ALL		= libfget.a

OBJS		= \
		  ${LIBFGET_OBJS} \
		  ${NETIO_OBJS} \
		  ${LISTHASH_OBJS} \
		  ${PATHCODE_OBJS}

HDRS		= \
		  ${LIBFGET_HDRS} \
		  ${NETIO_HDRS} \
		  ${LISTHASH_HDRS} \
		  ${PATHCODE_HDRS}

DISTCLEANFILES	= \
		  ${NETIO_DISTCLEAN_FILES} \
		  ${LISTHASH_DISTCLEAN_FILES} \
		  ${PATHCODE_DISTCLEAN_FILES}

all: ${ALL}

.PHONY: clean distclean install

libfget.a: ${OBJS} ${LIBOBJS}
	${AR} rc libfget.a ${OBJS} ${LIBOBJS}
	${RANLIB} libfget.a

${LIBFGET_OBJS}: ${LIBFGET_HDRS}

.c.o:
	${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<

clean:
	rm -f *~ *.o ${ALL} core

distclean: clean
	rm -f Makefile ${DISTCLEANFILES}

install: all
	${MKDIR} ${DESTDIR}${libdir}
	${INSTALL_DATA} libfget.a ${DESTDIR}${libdir}
	${MKDIR} ${DESTDIR}${includedir}
	${INSTALL_DATA} ${srcdir}/libfget.h ${DESTDIR}${includedir}



syntax highlighted by Code2HTML, v. 0.9.1