]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/Makefile.in
Big backport from Enterprise
[bacula/bacula] / bacula / src / dird / Makefile.in
index fd727ecd0cfac8bdf2149efb0d776d2373eee380..f7478962b3c8fe6265244480c12597572af0b9c2 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  Bacula Director Makefile
 #
-# Copyright (C) 2000-2015 Kern Sibbald
+# Copyright (C) 2000-2017 Kern Sibbald
 # License: BSD 2-Clause; see file LICENSE-FOSS
 #
 @MCOMMON@
@@ -26,6 +26,7 @@ CAP_LIBS = @CAP_LIBS@
 ZLIBS=@ZLIBS@
 DB_LIBS=@DB_LIBS@
 
+
 first_rule: all
 dummy:
 
@@ -46,6 +47,8 @@ SVRSRCS = dird.c admin.c authenticate.c \
          ua_status.c ua_tree.c ua_update.c vbackup.c verify.c
 SVROBJS = $(SVRSRCS:.c=.o)
 
+JSONOBJS = bdirjson.o dird_conf.o run_conf.o inc_conf.o ua_acl.o
+
 # these are the objects that are changed by the .configure process
 EXTRAOBJS = @OBJLIST@
 
@@ -58,7 +61,7 @@ EXTRAOBJS = @OBJLIST@
        @echo "Compiling $<"
        $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
 #-------------------------------------------------------------------------
-all: Makefile bacula-dir @STATIC_DIR@
+all: Makefile bacula-dir @STATIC_DIR@ bdirjson
        @echo "==== Make of dird is good ===="
        @echo " "
 
@@ -78,6 +81,12 @@ static-bacula-dir:  Makefile $(SVROBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../
              $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
        strip $@
 
+bdirjson: Makefile $(JSONOBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+       @echo "Linking $@ ..."
+       $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib  -o $@ $(JSONOBJS) \
+             -lbaccfg -lbac -lm $(DLIB) $(DB_LIBS) $(LIBS) \
+             $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
+
 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
        cd $(topdir) \
          && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
@@ -87,7 +96,7 @@ libtool-clean:
 
 clean: libtool-clean
        @$(RMF) dird bacula-dir core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
-       @$(RMF) static-bacula-dir
+       @$(RMF) static-bacula-dir bdirjson
 
 realclean: clean
        @$(RMF) tags bacula-dir.conf
@@ -102,6 +111,7 @@ devclean: realclean
 
 install: all
        $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bacula-dir $(DESTDIR)$(sbindir)/bacula-dir
+       $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bdirjson $(DESTDIR)$(sbindir)/bdirjson
        @srcconf=bacula-dir.conf; \
           if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
              destconf=$$srcconf.new; \
@@ -125,6 +135,7 @@ install: all
 
 
 uninstall:
+       (cd $(DESTDIR)$(sbindir); $(RMF) bacula-dir bdirjson)
        (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-dir.conf bacula-dir.conf.new)
        (cd $(DESTDIR)$(scriptdir); $(RMF) query.sql)