-CC = @CC@
-CPP = @CPP@
-
srcdir = @srcdir@
VPATH = $(srcdir)
var.o md5.o md5sum.o dbindex.o rpmrc.o depends.o \
rpmdb.o stringbuf.o rpmlead.o package.o uninstall.o \
oldheader.o install.o signature.o verify.o rebuilddb.o
-SOURCES = $(subst .o,.c,$(LIBOBJECTS))
+SOURCES = $(addprefix $(srcdir)/,$(subst .o,.c,$(LIBOBJECTS)))
TAGTABLE = tagtable.o
LIBRPM = librpm.a
LOADLIBES = -lrpm -lgdbm -ldb $(LIBEFENCE)
PROGS =
-AR = ar
-RANLIB = ranlib
INSTALL= @INSTALL@
INSTALL_PROGRAM= @INSTALL_PROGRAM@
INSTALL_DATA= @INSTALL_DATA@
# -----------------------------------------------------------------------
+include $(srcdir)/../Makefile.inc
+
ifeq (.depend,$(wildcard .depend))
TARGET=allprogs
else
$(LIBRPM): $(LIBRPM)($(LIBOBJECTS) $(TAGTABLE))
$(RANLIB) $@
-tagtable.c: rpmlib.h Makefile
+tagtable.c: rpmlib.h
echo '#include "rpmlib.h"' > tagtable.c
echo '' >> tagtable.c
echo 'const struct rpmTagTableEntry rpmTagTable[] = {' >> tagtable.c
- awk '/(RPMTAG_[A-Z0-9]*)[ \t]+([0-9]*)/ { printf("\t{ \"%s\", %s },\n", $$2, $$3); }' < rpmlib.h >> tagtable.c
+ awk '/(RPMTAG_[A-Z0-9]*)[ \t]+([0-9]*)/ { printf("\t{ \"%s\", %s },\n", $$2, $$3); }' < $(srcdir)/rpmlib.h >> tagtable.c
echo '};' >> tagtable.c
echo '' >> tagtable.c
echo 'const int rpmTagTableSize = sizeof(rpmTagTable) / sizeof(struct rpmTagTableEntry);' >> tagtable.c
$(INSTALL) -m 644 -o 0 -g 0 $(srcdir)/rpmerr.h $(INCDIR)
$(INSTALL) -m 644 -o 0 -g 0 librpm.a $(LIBDIR)
+distclean: clean
+ rm -f .depend Makefile
+
clean:
rm -f *.a *.o *~ $(PROGS) test.out tagtable.c