]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/Makefile.in
Restore win32 dir from Branch-5.2 and update it
[bacula/bacula] / bacula / src / filed / Makefile.in
index 7fca1a8e492f4177994c765b89beff47c14da433..643f410267cf1d89dcd4a5d78514ae7f3dd2bd5a 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Bacula Makefile for the File daemon
 #
-# Copyright (C) 2000-2015 Kern Sibbald
+# Copyright (C) 2000-2016 Kern Sibbald
 # License: BSD 2-Clause; see file LICENSE-FOSS
 #
 @MCOMMON@
@@ -30,13 +30,17 @@ first_rule: all
 dummy:
 
 #
-SVRSRCS = filed.c authenticate.c acl.c backup.c crypto.c \
-         estimate.c \
+SVRSRCS = filed.c authenticate.c backup.c crypto.c \
+         win_efs.c estimate.c \
          fd_plugins.c accurate.c \
          filed_conf.c heartbeat.c hello.c job.c fd_snapshot.c \
-         restore.c status.c verify.c verify_vol.c xattr.c
+         restore.c status.c verify.c verify_vol.c \
+         bacl.c bacl_linux.c bacl_osx.c bacl_solaris.c bacl_freebsd.c \
+         bxattr.c bxattr_linux.c bxattr_osx.c bxattr_solaris.c bxattr_freebsd.c
 SVROBJS = $(SVRSRCS:.c=.o)
 
+JSONOBJS = bfdjson.o filed_conf.o
+
 # these are the objects that are changed by the .configure process
 EXTRAOBJS = @OBJLIST@
 
@@ -46,6 +50,12 @@ ZLIBS = @ZLIBS@
 LZO_LIBS = @LZO_LIBS@
 LZO_INC= @LZO_INC@
 
+# extra items for linking on Win32
+WIN32OBJS = win32/winmain.o win32/winlib.a win32/winres.res
+win32 = $(WIN32OBJS) -luser32 -lgdi32
+
+WIN32LIBS = $(@WIN32@)
+
 .SUFFIXES:     .c .o
 .PHONY:
 .DONTCARE:
@@ -55,23 +65,54 @@ LZO_INC= @LZO_INC@
        @echo "Compiling $<"
        $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(LZO_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
 #-------------------------------------------------------------------------
-all: Makefile bacula-fd @STATIC_FD@
+all: Makefile @WIN32@ bacula-fd @STATIC_FD@ bfdjson
        @echo "==== Make of filed is good ===="
        @echo " "
 
-acl.o: acl.c
+bacl.o: bacl.c
        @echo "Compiling $<"
        $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(LZO_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $(AFS_CFLAGS) $<
 
-bacula-fd:  Makefile $(SVROBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+win32/winlib.a:
+       @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
+          (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \
+       fi
+       @rm -f bacula-fd.exe
+
+win32/winmain.o:
+       @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
+          (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \
+       fi
+       @rm -f bacula-fd.exe
+
+win32/winres.res:
+       @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
+          (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \
+       fi
+       @rm -f bacula-fd.exe
+
+# win32 libraries if needed
+win32: $(WIN32OBJS)
+       @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
+          (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \
+       fi
+       @rm -f bacula-fd.exe
+
+bacula-fd:  Makefile $(SVROBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) @WIN32@
        @echo "Linking $@ ..."
        $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(SVROBJS) \
-         $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
+         $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
+         $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
+
+bfdjson:  Makefile $(JSONOBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) @WIN32@
+       @echo "Linking $@ ..."
+       $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(JSONOBJS) \
+         $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
          $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
 
-static-bacula-fd: Makefile $(SVROBJS) ../findlib/libbacfind.a ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+static-bacula-fd: Makefile $(SVROBJS) ../findlib/libbacfind.a ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) @WIN32@
        $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../findlib -o $@ $(SVROBJS) \
-          $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
+          $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
           $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
        strip $@
 
@@ -85,6 +126,9 @@ libtool-clean:
 clean: libtool-clean
        @$(RMF) bacula-fd filed core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
        @$(RMF) static-bacula-fd
+       @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
+          (cd win32; $(GMAKE) clean); \
+       fi
 
 realclean: clean
        @$(RMF) tags bacula-fd.conf
@@ -92,13 +136,20 @@ realclean: clean
 distclean: realclean
        if test $(srcdir) = .; then $(MAKE) realclean; fi
        (cd $(srcdir); $(RMF) Makefile)
+       @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
+          (cd win32; $(GMAKE) distclean); \
+       fi
 
 devclean: realclean
        if test $(srcdir) = .; then $(MAKE) realclean; fi
        (cd $(srcdir); $(RMF) Makefile)
+       @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
+          (cd win32; $(GMAKE) devclean); \
+       fi
 
 install: all
        $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bacula-fd $(DESTDIR)$(sbindir)/bacula-fd
+       $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bfdjson $(DESTDIR)$(sbindir)/bfdjson
        @srcconf=bacula-fd.conf; \
        if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
           destconf=$$srcconf.new; \
@@ -108,7 +159,7 @@ install: all
        fi; \
        echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
        ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
-       @if test "x${fd_group}" != "x"; then \
+       @if test "x${fd_group}" != "x" -a "x${DESTDIR}" = "x" ; then \
           chgrp -f ${fd_group} ${DESTDIR}${sysconfdir}/$$destconf ; \
        fi
        @if test -f static-bacula-fd; then \
@@ -116,6 +167,7 @@ install: all
        fi
 
 uninstall:
+       (cd $(DESTDIR)$(sbindir); $(RMF) bacula-fd bfdjson)
        (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-fd.conf)
        (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-fd.conf.new)