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
37 CLIENT_OBJ = $(POPT_OBJ) $(UTIL_OBJ) @TALLOC_OBJ@ @TDB_OBJ@ \
39 @LIBREPLACEOBJ@ $(EXTRA_OBJ)
41 BINS = bin/remote-cache
47 all: showflags dirs doc $(CLIENT_OBJ) $(BINS)
50 @echo 'remote-cache will be compiled with flags:'
51 @echo ' CFLAGS = $(CFLAGS)'
52 @echo ' LIBS = $(LIBS)'
56 @mkdir -p `dirname $@`
57 @$(CC) $(CFLAGS) -c $< -o $@
62 bin/remote-cache: migrate/remote-cache.o
64 @$(CC) $(CFLAGS) -o $@ migrate/remote-cache.o $(CLIENT_OBJ) $(LIB_FLAGS) $(FUSE_LIBS)
66 doc/remote-cache.1.html: doc/remote-cache.1.xml
67 -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
69 doc/remote-cache.1: doc/remote-cache.1.xml
70 -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
72 doc: doc/remote-cache.1 doc/remote-cache.1.html
75 ${INSTALLCMD} -m 755 bin/remote-cache $(DESTDIR)$(bindir)
76 if [ -f doc/remote-cache.1 ];then ${INSTALLCMD} -m 644 doc/remote-cache.1 $(DESTDIR)$(mandir)/man1; fi
79 rm -f *.o */*.o */*/*.o */*~
85 rm -f config.log config.status config.cache config.h
88 realdistclean: distclean
89 rm -f configure config.h.in