# @configure_input@

### Path settings
srcdir		= @srcdir@
top_srcdir	= @top_srcdir@
prefix		= @prefix@
exec_prefix	= @exec_prefix@
bindir		= @bindir@
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../lib \
		  -I../listhash \
		  -I${top_srcdir}/lib \
		  -I${top_srcdir}/compat \
		  @CPPFLAGS@
CFLAGS		= @CFLAGS@
LDFLAGS		= @LDFLAGS@
LIBS		= @LIBS@
LIBOBJS		= @LIBOBJS@
RANLIB		= @RANLIB@
@SET_MAKE@
VPATH		= @srcdir@


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

LIBTAR_OBJS	= libtar.o
LIBTAR_HDRS	= ../config.h \
		  ${top_srcdir}/compat/compat.h \
		  ${top_srcdir}/lib/libtar.h \
		  ../listhash/libtar_listhash.h
LIBTAR_LIBS	= ../lib/libtar.a
ALL		= libtar


all: ${ALL}

.PHONY: clean distclean install

libtar: ${LIBTAR_OBJS} ${LIBTAR_LIBS} ${LIBTAR_HDRS}
	${CC} ${CFLAGS} ${LDFLAGS} -o libtar libtar.o ${LIBTAR_LIBS} ${LIBS}

${LIBTAR_OBJS}: ${LIBTAR_HDRS}

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

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

distclean: clean
	rm -f Makefile

install: ${ALL}
	${MKDIR} ${DESTDIR}${bindir}
	${INSTALL_PROGRAM} libtar ${DESTDIR}${bindir}

