r18129: moved the system includes into libreplace - this gives much more
[jelmer/samba4-debian.git] / source / lib / tdb / Makefile.in
1 #!gmake
2 #
3 # Makefile for tdb directory
4 #
5
6 CC = @CC@
7 prefix = @prefix@
8 exec_prefix = @exec_prefix@
9 bindir = @bindir@
10 includedir = @includedir@
11 libdir = @libdir@
12 VPATH = @srcdir@:@libreplacedir@
13 srcdir = @srcdir@
14 builddir = @builddir@
15 CFLAGS = -I$(srcdir)/include -Iinclude -I@libreplacedir@ @CFLAGS@
16
17 PROGS = bin/tdbtool bin/tdbtorture
18 TDB_OBJ = @TDBOBJ@ @LIBREPLACEOBJ@
19
20 DIRS = lib bin common tools examples
21
22 all: dirs $(PROGS)
23
24 .c.o:
25         @echo Compiling $*.c
26         @mkdir -p `dirname $@`
27         @$(CC) $(CFLAGS) -c $< -o $@
28
29 dirs:
30         @mkdir -p $(DIRS)
31
32 install: all
33         mkdir -p $(bindir)
34         mkdir -p $(includedir)
35         mkdir -p $(libdir) 
36         mkdir -p $(libdir)/pkgconfig
37         cp $(PROGS) $(bindir)
38         cp $(srcdir)/include/tdb.h $(includedir)
39         cp tdb.pc $(libdir)/pkgconfig
40
41 libtdb.a: $(TDB_OBJ)
42         ar -rv libtdb.a $(TDB_OBJ)
43
44 bin/tdbtest: tools/tdbtest.o libtdb.a
45         $(CC) $(CFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb -lgdbm
46
47 bin/tdbtool: tools/tdbtool.o libtdb.a
48         $(CC) $(CFLAGS) -o bin/tdbtool tools/tdbtool.o -L. -ltdb
49
50 bin/tdbtorture: tools/tdbtorture.o libtdb.a
51         $(CC) $(CFLAGS) -o bin/tdbtorture tools/tdbtorture.o -L. -ltdb
52
53 bin/tdbdump: tools/tdbdump.o libtdb.a
54         $(CC) $(CFLAGS) -o bin/tdbdump tools/tdbdump.o -L. -ltdb
55
56 bin/tdbbackup: tools/tdbbackup.o libtdb.a
57         $(CC) $(CFLAGS) -o bin/tdbbackup tools/tdbbackup.o -L. -ltdb
58
59 clean:
60         rm -f $(PROGS) common/*.o tools/*.o *~ *.bak */*~ */*.bak *% core test.db test.tdb test.gdbm
61
62 installcheck: install
63         $(bindir)/tdbtorture
64
65 test: installcheck