5 exec_prefix = @exec_prefix@
6 datarootdir = @datarootdir@
7 includedir = @includedir@
12 localstatedir = @localstatedir@
13 VPATH = @srcdir@:@tdbdir@:@tallocdir@:@libreplacedir@:@poptdir@
19 XSLTPROC = /usr/bin/xsltproc
20 INSTALLCMD = @INSTALL@
22 POPT_LIBS = @POPT_LIBS@
23 POPT_CFLAGS = @POPT_CFLAGS@
26 FUSE_LIBS = @FUSE_LIBS@
28 CFLAGS=-g -I$(srcdir)/include -Iinclude -Ilib -Ilib/util -I$(srcdir) \
29 -I@tallocdir@ -I@tdbdir@/include -I@libreplacedir@ \
30 -DVARDIR=\"$(localstatedir)\" -DETCDIR=\"$(etcdir)\" \
31 -DUSE_MMAP=1 @CFLAGS@ $(POPT_CFLAGS) -D_FILE_OFFSET_BITS=64
33 LIB_FLAGS=@LDFLAGS@ -Llib @LIBS@ $(POPT_LIBS) -lfuse -pthread -lrt -ldl
35 UTIL_OBJ = lib/util/util_time.o lib/util/util.o lib/util/strlist.o
37 CLIENT_OBJ = $(POPT_OBJ) $(UTIL_OBJ) @TALLOC_OBJ@ @TDB_OBJ@ @EVENTS_OBJ@ \
38 migrate/remote-cache.o \
39 migrate/remote-cached.o \
41 @LIBREPLACEOBJ@ $(EXTRA_OBJ)
43 BINS = bin/remote-cache
49 all: showflags dirs doc $(CLIENT_OBJ) $(BINS)
52 @echo 'remote-cache will be compiled with flags:'
53 @echo ' CFLAGS = $(CFLAGS)'
54 @echo ' LIBS = $(LIBS)'
58 @mkdir -p `dirname $@`
59 @$(CC) $(CFLAGS) -c $< -o $@
64 bin/remote-cache: migrate/remote-cache.o migrate/remote-cached.o
66 @$(CC) $(CFLAGS) -o $@ $(CLIENT_OBJ) $(LIB_FLAGS) $(FUSE_LIBS)
68 doc/remote-cache.8.html: doc/remote-cache.8.xml
69 -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
71 doc/remote-cache.8: doc/remote-cache.8.xml
72 -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
74 doc/remote-cache-clean.8.html: doc/remote-cache-clean.8.xml
75 -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
77 doc/remote-cache-clean.8: doc/remote-cache-clean.8.xml
78 -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
80 doc: doc/remote-cache.8 doc/remote-cache.8.html \
81 doc/remote-cache-clean.8 doc/remote-cache-clean.8.html
84 ${INSTALLCMD} -m 755 bin/remote-cache $(DESTDIR)$(sbindir)
85 ${INSTALLCMD} -m 755 migrate/remote-cache-clean.py $(DESTDIR)$(sbindir)/remote-cache-clean
86 if [ -f doc/remote-cache.8 ];then ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man8; fi
87 if [ -f doc/remote-cache.8 ];then ${INSTALLCMD} -m 644 doc/remote-cache.8 $(DESTDIR)$(mandir)/man8; fi
88 if [ -f doc/remote-cache-clean.8 ];then ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man8; fi
89 if [ -f doc/remote-cache-clean.8 ];then ${INSTALLCMD} -m 644 doc/remote-cache-clean.8 $(DESTDIR)$(mandir)/man8; fi
92 rm -f *.o */*.o */*/*.o */*~
98 rm -f config.log config.status config.cache config.h
101 realdistclean: distclean
102 rm -f configure config.h.in