4 LIBOBJECTS = header.o misc.o messages.o \
5 rpmerr.o falloc.o var.o \
6 md5.o md5sum.o dbindex.o \
7 rpmrc.o depends.o rpmdb.o \
8 stringbuf.o rpmlead.o package.o \
9 uninstall.o oldheader.o install.o \
10 signature.o verify.o rebuilddb.o \
11 tread.o cpio.o formats.o \
14 SOURCES = $(addprefix $(srcdir)/,$(subst .o,.c,$(LIBOBJECTS)))
17 LOADLIBES = -lrpm -lgdbm -ldb $(LIBEFENCE)
20 INSTALL_PROGRAM= @INSTALL_PROGRAM@
21 INSTALL_DATA= @INSTALL_DATA@
23 # -----------------------------------------------------------------------
25 include $(srcdir)/../Makefile.inc
27 ifeq (.depend,$(wildcard .depend))
30 TARGET=depend allprogs
35 allprogs: $(LIBRPM) $(PROGS)
39 $(LIBRPM): $(LIBRPM)($(LIBOBJECTS) $(TAGTABLE))
43 echo '#include "rpmlib.h"' > tagtable.c
45 echo 'const struct headerTagTableEntry rpmTagTable[] = {' >> tagtable.c
46 awk '/(RPMTAG_[A-Z0-9]*)[ \t]+([0-9]*)/ && !/internal/ { printf("\t{ \"%s\", %s },\n", $$2, $$3); }' < $(srcdir)/rpmlib.h >> tagtable.c
47 echo ' { NULL, 0 }' >> tagtable.c
48 echo '};' >> tagtable.c
50 echo 'const int rpmTagTableSize = sizeof(rpmTagTable) / sizeof(struct headerTagTableEntry) - 1;' >> tagtable.c
53 $(INSTALL) -m 644 $(srcdir)/rpmlib.h $(INCDIR)
54 $(INSTALL) -m 644 $(srcdir)/dbindex.h $(INCDIR)
55 $(INSTALL) -m 644 $(srcdir)/header.h $(INCDIR)
56 $(INSTALL) -m 644 librpm.a $(LIBDIR)
59 rm -f .depend Makefile
62 rm -f *.a *.o *~ $(PROGS) test.out tagtable.c
68 $(CPP) $(CFLAGS) -M $(SOURCES) > .depend
70 ifeq (.depend,$(wildcard .depend))