2 # Find files library Makefile
14 # this dir relative to top dir
23 # include files installed when using libtool
25 INCLUDE_FILES = bfile.h find.h protos.h
28 LIBBACFIND_SRCS = find.c match.c find_one.c attribs.c create_file.c \
29 bfile.c drivetype.c enable_priv.c fstype.c mkpath.c \
31 LIBBACFIND_OBJS = $(LIBBACFIND_SRCS:.c=.o)
32 LIBBACFIND_LOBJS = $(LIBBACFIND_SRCS:.c=.lo)
34 LIBBACFIND_LT_RELEASE = @LIBBACFIND_LT_RELEASE@
43 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
47 $(NO_ECHO)$(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
48 #-------------------------------------------------------------------------
49 all: Makefile libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
50 @echo "==== Make of findlib is good ===="
53 libbacfind.a: $(LIBBACFIND_OBJS)
55 $(AR) rc $@ $(LIBBACFIND_OBJS)
58 libbacfind.la: Makefile $(LIBBACFIND_LOBJS)
60 $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBBACFIND_LOBJS) -export-dynamic -rpath $(libdir) -release $(LIBBACFIND_LT_RELEASE)
62 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
64 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
67 $(MKDIR) $(DESTDIR)/$(includedir)/bacula/findlib
68 for I in $(INCLUDE_FILES); do \
69 $(INSTALL_DATA) $$I $(DESTDIR)$(includedir)/bacula/findlib/`basename $$I`; \
73 for I in $(INCLUDE_FILES); do \
74 $(RMF) $(DESTDIR)$(includedir)/bacula/findlib/`basename $$I`; \
78 $(MKDIR) $(DESTDIR)$(libdir)
79 $(LIBTOOL_INSTALL_FINISH) $(INSTALL_LIB) libbacfind$(DEFAULT_ARCHIVE_TYPE) $(DESTDIR)$(libdir)
82 $(LIBTOOL_UNINSTALL) $(RMF) $(DESTDIR)$(libdir)/libbacfind.la
84 install: @LIBTOOL_INSTALL_TARGET@ @INCLUDE_INSTALL_TARGET@
86 uninstall: @LIBTOOL_UNINSTALL_TARGET@ @INCLUDE_UNINSTALL_TARGET@
89 @find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF)
91 @$(RMF) -r .libs _libs
94 @$(RMF) find core a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
100 if test $(srcdir) = .; then $(MAKE) realclean; fi
101 (cd $(srcdir); $(RMF) Makefile)
104 if test $(srcdir) = .; then $(MAKE) realclean; fi
105 (cd $(srcdir); $(RMF) Makefile)
107 # Semi-automatic generation of dependencies:
108 # Use gcc -M because X11 `makedepend' doesn't work on all systems
109 # and it also includes system headers.
110 # `semi'-automatic since dependencies are generated at distribution time.
113 @$(MV) Makefile Makefile.bak
114 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
115 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
116 @for src in $(LIBBACFIND_SRCS); do \
117 $(CXX) -S -M -MT `basename $$src .c`$(DEFAULT_OBJECT_TYPE) $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) $$src >> Makefile; \
119 @if test -f Makefile ; then \
120 $(RMF) Makefile.bak; \
122 $(MV) Makefile.bak Makefile; \
123 echo " ===== Something went wrong in make depend ====="; \
126 # -----------------------------------------------------------------------
127 # DO NOT DELETE: nice dependency list follows