
VPATH		= @srcdir@
srcdir		= @srcdir@
top_srcdir	= @top_srcdir@

default: all
include ../Makefile.conf

SOURCES		= compat.c compression.c database.c dbmodify.c dump.c \
		    ehandle.c fields.c lock.c mlib.c myopt.c nfmalloc.c \
		    parse.c parsehelp.c showcright.c showpkg.c tarfn.c \
		    varbuf.c vercmp.c md5.c utils.c

OBJECTS		= $(patsubst %.c, %.o, $(SOURCES))
GENFILES	= $(OBJECTS) libdpkg.a

ALL_CFLAGS	+= -DCOPYINGFILE=\"$(copyingfile)\"

.PHONY: all
all:: libdpkg.a

libdpkg.a: $(OBJECTS) 
	$(AR) r $@ $^
	$(RANLIB) $@

.PHONY: install
install:: all

.PHONY: clean
clean::
	$(RM) $(GENFILES)


.PHONY: distclean
cvslean:: clean
	$(RM) Makefile

