s3/docs: Fix serveral typos.
[Samba.git] / source / lib / tdb / Makefile.in
blobfd36ed078e11835df05d330fcfdb2d8e6a0d14a2
1 #!gmake
3 # Makefile for tdb directory
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 CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/include -Iinclude
16 CFLAGS = $(CPPFLAGS) @CFLAGS@
17 LDFLAGS = @LDFLAGS@
18 EXEEXT = @EXEEXT@
19 SHLD_FLAGS = @SHLD_FLAGS@
20 PACKAGE_VERSION = @PACKAGE_VERSION@
21 PICFLAG = @PICFLAG@
22 SONAMEFLAG = @SONAMEFLAG@
23 SHLIBEXT = @SHLIBEXT@
25 .PHONY: test
27 PROGS = bin/tdbtool$(EXEEXT) bin/tdbdump$(EXEEXT) bin/tdbbackup$(EXEEXT)
28 PROGS_NOINSTALL = bin/tdbtest$(EXEEXT) bin/tdbtorture$(EXEEXT)
29 ALL_PROGS = $(PROGS) $(PROGS_NOINSTALL)
31 TDB_OBJ = @TDB_OBJ@ @LIBREPLACEOBJ@
33 DIRS = bin common tools
35 SONAME = libtdb.$(SHLIBEXT).1
36 SOLIB = libtdb.$(SHLIBEXT).$(PACKAGE_VERSION)
38 all: showflags dirs $(PROGS) $(SOLIB) libtdb.a
40 showflags:
41 @echo 'tdb will be compiled with flags:'
42 @echo ' CFLAGS = $(CFLAGS)'
43 @echo ' CPPFLAGS = $(CPPFLAGS)'
44 @echo ' LDFLAGS = $(LDFLAGS)'
45 @echo ' LIBS = $(LIBS)'
47 .SUFFIXES: .c .o
49 .c.o:
50 @echo Compiling $*.c
51 @mkdir -p `dirname $@`
52 @$(CC) $(PICFLAG) $(CFLAGS) -c $< -o $@
54 dirs:
55 @mkdir -p $(DIRS)
57 install: all
58 mkdir -p $(DESTDIR)$(bindir)
59 mkdir -p $(DESTDIR)$(includedir)
60 mkdir -p $(DESTDIR)$(libdir)
61 mkdir -p $(DESTDIR)$(libdir)/pkgconfig
62 cp $(PROGS) $(DESTDIR)$(bindir)
63 cp $(srcdir)/include/tdb.h $(DESTDIR)$(includedir)
64 cp tdb.pc $(DESTDIR)$(libdir)/pkgconfig
65 cp libtdb.a $(SOLIB) $(DESTDIR)$(libdir)
67 libtdb.a: $(TDB_OBJ)
68 ar -rv libtdb.a $(TDB_OBJ)
70 libtdb.(SHLIBEXT): $(SOLIB)
71 ln -s $< $@
73 $(SONAME): $(SOLIB)
74 ln -s $< $@
76 $(SOLIB): $(TDB_OBJ)
77 $(CC) $(SHLD_FLAGS) -o $@ $(TDB_OBJ) $(SONAMEFLAG)$(SONAME)
79 TDB_LIB = libtdb.a
81 bin/tdbtest$(EXEEXT): tools/tdbtest.o $(TDB_LIB)
82 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb -lgdbm
84 bin/tdbtool$(EXEEXT): tools/tdbtool.o $(TDB_LIB)
85 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtool tools/tdbtool.o -L. -ltdb
87 bin/tdbtorture$(EXEEXT): tools/tdbtorture.o $(TDB_LIB)
88 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtorture tools/tdbtorture.o -L. -ltdb
90 bin/tdbdump$(EXEEXT): tools/tdbdump.o $(TDB_LIB)
91 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbdump tools/tdbdump.o -L. -ltdb
93 bin/tdbbackup$(EXEEXT): tools/tdbbackup.o $(TDB_LIB)
94 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbbackup tools/tdbbackup.o -L. -ltdb
96 test: bin/tdbtorture$(EXEEXT)
97 bin/tdbtorture$(EXEEXT)
99 installcheck: test install
101 clean:
102 rm -f $(ALL_PROGS) *.o *.a common/*.o tools/*.o tdb.pc
103 rm -f test.db test.tdb torture.tdb test.gdbm
104 rm -f $(SONAME) $(SOLIB) libtdb.a
106 distclean: clean
107 rm -f *~ */*~
108 rm -f config.log config.status include/config.h config.cache
109 rm -f Makefile
111 realdistclean: distclean
112 rm -f configure include/config.h.in