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 $(RMF) $(DESTDIR)$(libdir)/libbacfind-*.so $(DESTDIR)$(libdir)/libbacfind.la
80 $(LIBTOOL_INSTALL_FINISH) $(INSTALL_LIB) libbacfind$(DEFAULT_ARCHIVE_TYPE) $(DESTDIR)$(libdir)
83 $(LIBTOOL_UNINSTALL) $(RMF) $(DESTDIR)$(libdir)/libbacfind.la
85 install: @LIBTOOL_INSTALL_TARGET@ @INCLUDE_INSTALL_TARGET@
87 uninstall: @LIBTOOL_UNINSTALL_TARGET@ @INCLUDE_UNINSTALL_TARGET@
90 @find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF)
92 @$(RMF) -r .libs _libs
95 @$(RMF) find core a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
101 if test $(srcdir) = .; then $(MAKE) realclean; fi
102 (cd $(srcdir); $(RMF) Makefile)
105 if test $(srcdir) = .; then $(MAKE) realclean; fi
106 (cd $(srcdir); $(RMF) Makefile)
108 # Semi-automatic generation of dependencies:
109 # Use gcc -M because X11 `makedepend' doesn't work on all systems
110 # and it also includes system headers.
111 # `semi'-automatic since dependencies are generated at distribution time.
114 @$(MV) Makefile Makefile.bak
115 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
116 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
117 @for src in $(LIBBACFIND_SRCS); do \
118 $(CXX) -S -M -MT `basename $$src .c`$(DEFAULT_OBJECT_TYPE) $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $$src >> Makefile; \
120 @if test -f Makefile ; then \
121 $(RMF) Makefile.bak; \
123 $(MV) Makefile.bak Makefile; \
124 echo " ===== Something went wrong in make depend ====="; \
127 # -----------------------------------------------------------------------
128 # DO NOT DELETE: nice dependency list follows