@echo "Compiling $<"
$(NO_ECHO)$(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
#-------------------------------------------------------------------------
-all: Makefile libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+all: Makefile libbacfind$(DEFAULT_ARCHIVE_TYPE) libbacfind.a ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
@echo "==== Make of findlib is good ===="
@echo " "
$(AR) rc $@ $(LIBOBJS)
$(RANLIB) $@
-libbacfind.la: $(LIBOBJS)
+libbacfind.la: Makefile $(LIBOBJS)
@echo "Making $@ ..."
$(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBOBJS) -export-dynamic -rpath $(libdir) -version-info $(LIBBACFIND_LT_CURRENT):$(LIBBACFIND_LT_REVISION):$(LIBBACFIND_LT_AGE)
install-includes:
$(MKDIR) $(DESTDIR)/$(includedir)/bacula/findlib
- for I in ${INCLUDE_FILES}; do \
+ for I in $(INCLUDE_FILES); do \
$(INSTALL_DATA) $$I $(DESTDIR)$(includedir)/bacula/findlib/`basename $$I`; \
done
uninstall-includes:
- for I in ${INCLUDE_FILES}; do \
+ for I in $(INCLUDE_FILES); do \
$(RMF) $(DESTDIR)$(includedir)/bacula/findlib/`basename $$I`; \
done
uninstall: @LIBTOOL_UNINSTALL_TARGET@ @INCLUDE_UNINSTALL_TARGET@
libtool-clean:
- find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF)
- $(RMF) *.la
- $(RMF) -r .libs _libs
+ @find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF)
+ @$(RMF) *.la
+ @$(RMF) -r .libs _libs
-clean: @LIBTOOL_CLEAN_TARGET@
- $(RMF) find core a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
+clean: libtool-clean
+ @$(RMF) find core a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
realclean: clean
- $(RMF) tags
+ @$(RMF) tags
distclean: realclean
if test $(srcdir) = .; then $(MAKE) realclean; fi
@$(MV) Makefile Makefile.bak
@$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
@$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
- @$(CXX) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
+ @for src in $(LIBSRCS); do \
+ $(CXX) -S -M -MT `basename $$src .c`$(DEFAULT_OBJECT_TYPE) $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) $$src >> Makefile; \
+ done
@if test -f Makefile ; then \
$(RMF) Makefile.bak; \
else \