# Makefile to build QDBM using libtool #================================================================ # Setting Variables #================================================================ # Generic settings SHELL = @SHELL@ # Packaging PACKAGE = @PACKAGE_NAME@ VERSION = @PACKAGE_VERSION@ # Targets MYHEADS = depot.h curia.h relic.h hovel.h cabin.h villa.h vista.h odeum.h MYLIBOBJS = depot.lo curia.lo relic.lo hovel.lo cabin.lo villa.lo vista.lo odeum.lo myconf.lo MYLIBS = libqdbm.la MYBINS = dpmgr dptest dptsv crmgr crtest crtsv rlmgr rltest hvmgr hvtest \ cbtest cbcodec vlmgr vltest vltsv odmgr odtest odidx MYMAN3S = qdbm.3 depot.3 dpopen.3 curia.3 cropen.3 relic.3 hovel.3 \ cabin.3 villa.3 vlopen.3 vista.3 odeum.3 odopen.3 MYDOCS = spex.html spex-ja.html COPYING ChangeLog THANKS # Install destinations prefix = @prefix@ exec_prefix = @exec_prefix@ MYHEADDIR = @includedir@ MYLIBDIR = @libdir@ MYBINDIR = @bindir@ MYMAN3DIR = @mandir@/man3 MYSHAREDIR = $(prefix)/share/$(PACKAGE) # Building binaries LIBTOOL = libtool CC = gcc CFLAGS = -I. @MYDEFS@ -D_POSIX_C_SOURCE -D_GNU_SOURCE \ -D__EXTENSIONS__ -DPIC -D__XSI_VISIBLE -D_REENTRANT -O3 LD = gcc LIBLDFLAGS = -rpath $(MYLIBDIR) -R $(MYLIBDIR) -version-info 1:0:0 -lc LDFLAGS = -rpath $(MYLIBDIR) -R $(MYLIBDIR) -L. -lqdbm -lc INSTALL = install MKDIR = mkdir -p CP = cp -rf RM = rm -rf #================================================================ # Suffix rules #================================================================ .SUFFIXES : .SUFFIXES : .c .lo .c.lo : $(LIBTOOL) --mode=compile --tag=CC $(CC) -c $(CFLAGS) $< #================================================================ # Actions #================================================================ all : $(MYLIBS) $(MYBINS) @printf '\n' @printf '#================================================================\n' @printf '# Ready to install.\n' @printf '#================================================================\n' clean : $(RM) $(MYLIBS) $(MYBINS) *.o *.lo *.la a.out .libs \ *.exe *.dll.a *.dll TAGS srcdoc gmon.out leak.log casket casket.* *~ install : $(LIBTOOL) --mode=install $(INSTALL) $(MYHEADS) $(MYHEADDIR) $(LIBTOOL) --mode=install $(INSTALL) $(MYLIBS) $(MYLIBDIR) $(LIBTOOL) --mode=install $(INSTALL) $(MYBINS) $(MYBINDIR) $(MKDIR) $(MYMAN3DIR) cd man && $(CP) $(MYMAN3S) $(MYMAN3DIR) $(MKDIR) $(MYSHAREDIR) $(CP) $(MYDOCS) $(MYSHAREDIR) @printf '\n' @printf '#================================================================\n' @printf '# Thanks for using QDBM.\n' @printf '#================================================================\n' uninstall : cd $(MYHEADDIR) && $(LIBTOOL) --mode=uninstall $(RM) $(MYHEADS) cd $(MYLIBDIR) && $(LIBTOOL) --mode=uninstall $(RM) $(MYLIBS) cd $(MYBINDIR) && $(LIBTOOL) --mode=uninstall $(RM) $(MYBINS) cd $(MYMAN3DIR) && $(RM) $(MYMAN3S) $(RM) $(MYSHAREDIR) distclean : clean $(RM) Makefile LTmakefile rpmspec config.cache config.log config.status autom4te.cache check : $(RM) casket* $(LIBTOOL) --mode=execute ./dptest write casket 50000 5000 $(LIBTOOL) --mode=execute ./dptest read casket $(LIBTOOL) --mode=execute ./dptest rcat casket 50000 50 500 32 $(LIBTOOL) --mode=execute ./dptest combo casket $(LIBTOOL) --mode=execute ./dptest wicked casket 5000 $(RM) casket* $(LIBTOOL) --mode=execute ./crtest write casket 50000 500 10 $(LIBTOOL) --mode=execute ./crtest read casket $(LIBTOOL) --mode=execute ./crtest rcat casket 50000 5 10 500 32 $(LIBTOOL) --mode=execute ./crtest combo casket $(LIBTOOL) --mode=execute ./crtest wicked casket 5000 $(RM) casket* $(LIBTOOL) --mode=execute ./crtest write -lob casket 1000 50 10 $(LIBTOOL) --mode=execute ./crtest read -lob casket $(RM) casket* $(LIBTOOL) --mode=execute ./rltest write casket 50000 $(LIBTOOL) --mode=execute ./rltest read casket 50000 $(RM) casket* $(LIBTOOL) --mode=execute ./hvtest write casket 50000 $(LIBTOOL) --mode=execute ./hvtest read casket 50000 $(RM) casket* $(LIBTOOL) --mode=execute ./hvtest write -qdbm casket 50000 $(LIBTOOL) --mode=execute ./hvtest read -qdbm casket 50000 $(RM) casket* $(LIBTOOL) --mode=execute ./cbtest sort 5000 $(LIBTOOL) --mode=execute ./cbtest list 50000 $(LIBTOOL) --mode=execute ./cbtest map 50000 $(LIBTOOL) --mode=execute ./cbtest wicked 5000 $(LIBTOOL) --mode=execute ./cbtest misc $(RM) casket* $(LIBTOOL) --mode=execute ./vltest write -tune 25 64 32 32 casket 50000 $(LIBTOOL) --mode=execute ./vltest read casket $(LIBTOOL) --mode=execute ./vltest rdup -tune 25 64 256 256 casket 50000 50000 $(LIBTOOL) --mode=execute ./vltest combo casket $(LIBTOOL) --mode=execute ./vltest wicked casket 5000 $(RM) casket* $(LIBTOOL) --mode=execute ./odtest write casket 500 50 5000 $(LIBTOOL) --mode=execute ./odtest read casket $(LIBTOOL) --mode=execute ./odtest combo casket $(LIBTOOL) --mode=execute ./odtest wicked casket 500 $(RM) casket* @printf '\n' @printf '#================================================================\n' @printf '# Checking completed.\n' @printf '#================================================================\n' .PHONY : all clean install check #================================================================ # Building binaries #================================================================ libqdbm.la : $(MYLIBOBJS) $(LIBTOOL) --mode=link --tag=CC $(LD) $(MYLIBOBJS) -o $@ $(LIBLDFLAGS) dpmgr : dpmgr.lo $(MYLIBS) $(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ dpmgr.lo $(LDFLAGS) dptest : dptest.lo $(MYLIBS) $(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ dptest.lo $(LDFLAGS) dptsv : dptsv.lo $(MYLIBS) $(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ dptsv.lo $(LDFLAGS) crmgr : crmgr.lo $(MYLIBS) $(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ crmgr.lo $(LDFLAGS) crtest : crtest.lo $(MYLIBS) $(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ crtest.lo $(LDFLAGS) crtsv : crtsv.lo $(MYLIBS) $(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ crtsv.lo $(LDFLAGS) rlmgr : rlmgr.lo $(MYLIBS) $(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ rlmgr.lo $(LDFLAGS) rltest : rltest.lo $(MYLIBS) $(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ rltest.lo $(LDFLAGS) hvmgr : hvmgr.lo $(MYLIBS) $(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ hvmgr.lo $(LDFLAGS) hvtest : hvtest.lo $(MYLIBS) $(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ hvtest.lo $(LDFLAGS) cbtest : cbtest.lo $(MYLIBS) $(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ cbtest.lo $(LDFLAGS) cbcodec : cbcodec.lo $(MYLIBS) $(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ cbcodec.lo $(LDFLAGS) vlmgr : vlmgr.lo $(MYLIBS) $(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ vlmgr.lo $(LDFLAGS) vltest : vltest.lo $(MYLIBS) $(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ vltest.lo $(LDFLAGS) vltsv : vltsv.lo $(MYLIBS) $(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ vltsv.lo $(LDFLAGS) odmgr : odmgr.lo $(MYLIBS) $(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ odmgr.lo $(LDFLAGS) odtest : odtest.lo $(MYLIBS) $(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ odtest.lo $(LDFLAGS) odidx : odidx.lo $(MYLIBS) $(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ odidx.lo $(LDFLAGS) depot.lo dpmgr.lo dptest.lo dptsv.lo : depot.h myconf.h curia.lo crmgr.lo crtest.lo crtsv.lo : curia.h depot.h myconf.h relic.lo rlmgr.lo rltest.lo : relic.h depot.h myconf.h hovel.lo hvmgr.lo hvtest.lo : hovel.h depot.h curia.h myconf.h cabin.lo cbtest.lo : cabin.h myconf.h villa.lo vlmgr.lo vltest.lo vltsv.lo : villa.h depot.h cabin.h myconf.h vista.lo : vista.h villa.h depot.h curia.h cabin.h myconf.h odeum.lo odmgr.lo odtest.lo odidx.lo : odeum.h depot.h curia.h cabin.h villa.h myconf.h myconf.lo : myconf.h # END OF FILE