verion 2.9
[sahlberg/remote-cache.git] / Makefile.in
1 #!gmake
2
3 CC = @CC@
4 prefix = @prefix@
5 exec_prefix = @exec_prefix@
6 datarootdir = @datarootdir@
7 includedir = @includedir@
8 libdir = @libdir@
9 bindir = @bindir@
10 sbindir = @sbindir@
11 mandir = @mandir@
12 localstatedir = @localstatedir@
13 VPATH = @srcdir@:@tdbdir@:@tallocdir@:@libreplacedir@:@poptdir@
14 srcdir = @srcdir@
15 etcdir = @sysconfdir@
16 builddir = @builddir@
17 DESTDIR = /
18 EXTRA_OBJ=@EXTRA_OBJ@
19 XSLTPROC = /usr/bin/xsltproc
20 INSTALLCMD = @INSTALL@
21
22 POPT_LIBS = @POPT_LIBS@
23 POPT_CFLAGS = @POPT_CFLAGS@
24 POPT_OBJ = @POPT_OBJ@
25
26 FUSE_LIBS = @FUSE_LIBS@
27
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
32
33 LIB_FLAGS=@LDFLAGS@ -Llib @LIBS@ $(POPT_LIBS) -lfuse -pthread -lrt -ldl
34
35 UTIL_OBJ = lib/util/util_time.o
36
37 CLIENT_OBJ = $(POPT_OBJ) $(UTIL_OBJ) @TALLOC_OBJ@ @TDB_OBJ@ \
38         lib/util/debug.o \
39         @LIBREPLACEOBJ@ $(EXTRA_OBJ)
40
41 BINS = bin/remote-cache
42
43 DIRS = lib bin
44
45 .SUFFIXES: .c .o .h
46
47 all: showflags dirs doc $(CLIENT_OBJ) $(BINS)
48
49 showflags:
50         @echo 'remote-cache will be compiled with flags:'
51         @echo '  CFLAGS = $(CFLAGS)'
52         @echo '  LIBS = $(LIBS)'
53
54 .c.o:
55         @echo Compiling $*.c
56         @mkdir -p `dirname $@`
57         @$(CC) $(CFLAGS) -c $< -o $@
58
59 dirs:
60         @mkdir -p $(DIRS)
61
62 bin/remote-cache: migrate/remote-cache.o
63         @echo Linking $@
64         @$(CC) $(CFLAGS) -o $@ migrate/remote-cache.o $(CLIENT_OBJ) $(LIB_FLAGS) $(FUSE_LIBS)
65
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 $<
68
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 $<
71
72 doc: doc/remote-cache.1 doc/remote-cache.1.html
73
74 install: $(BINS)
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
77
78 clean:
79         rm -f *.o */*.o */*/*.o */*~
80         rm -f $(BINS)
81
82 distclean: clean
83         rm -f *~ */*~
84         rm -rf bin
85         rm -f config.log config.status config.cache config.h
86         rm -f Makefile
87
88 realdistclean: distclean
89         rm -f configure config.h.in