source: branches/samba-3.2.x/source/lib/tdb/Makefile.in

Last change on this file was 133, checked in by Paul Smedley, 17 years ago

Update trunk to 3.2.0pre3

File size: 2.7 KB
Line 
1#!gmake
2#
3# Makefile for tdb directory
4#
5
6CC = @CC@
7prefix = @prefix@
8exec_prefix = @exec_prefix@
9bindir = @bindir@
10includedir = @includedir@
11libdir = @libdir@
12VPATH = @srcdir@:@libreplacedir@
13srcdir = @srcdir@
14builddir = @builddir@
15CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/include -Iinclude
16CFLAGS = $(CPPFLAGS) @CFLAGS@
17LDFLAGS = @LDFLAGS@
18EXEEXT = @EXEEXT@
19SHLD_FLAGS = @SHLD_FLAGS@
20PACKAGE_VERSION = @PACKAGE_VERSION@
21PICFLAG = @PICFLAG@
22SONAMEFLAG = @SONAMEFLAG@
23SHLIBEXT = @SHLIBEXT@
24
25.PHONY: test
26
27PROGS = bin/tdbtool$(EXEEXT) bin/tdbdump$(EXEEXT) bin/tdbbackup$(EXEEXT)
28PROGS_NOINSTALL = bin/tdbtest$(EXEEXT) bin/tdbtorture$(EXEEXT)
29ALL_PROGS = $(PROGS) $(PROGS_NOINSTALL)
30
31TDB_OBJ = @TDB_OBJ@ @LIBREPLACEOBJ@
32
33DIRS = bin common tools
34
35SONAME = libtdb.$(SHLIBEXT).1
36SOLIB = libtdb.$(SHLIBEXT).$(PACKAGE_VERSION)
37
38all: showflags dirs $(PROGS) $(SOLIB) libtdb.a
39
40showflags:
41 @echo 'tdb will be compiled with flags:'
42 @echo ' CFLAGS = $(CFLAGS)'
43 @echo ' CPPFLAGS = $(CPPFLAGS)'
44 @echo ' LDFLAGS = $(LDFLAGS)'
45 @echo ' LIBS = $(LIBS)'
46
47.SUFFIXES: .c .o
48
49.c.o:
50 @echo Compiling $*.c
51 @mkdir -p `dirname $@`
52 @$(CC) $(PICFLAG) $(CFLAGS) -c $< -o $@
53
54dirs:
55 @mkdir -p $(DIRS)
56
57install: 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)
66
67libtdb.a: $(TDB_OBJ)
68 ar -rv libtdb.a $(TDB_OBJ)
69
70libtdb.(SHLIBEXT): $(SOLIB)
71 ln -s $< $@
72
73$(SONAME): $(SOLIB)
74 ln -s $< $@
75
76$(SOLIB): $(TDB_OBJ)
77 $(CC) $(SHLD_FLAGS) -o $@ $(TDB_OBJ) $(SONAMEFLAG)$(SONAME)
78
79TDB_LIB = libtdb.a
80
81bin/tdbtest$(EXEEXT): tools/tdbtest.o $(TDB_LIB)
82 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb -lgdbm
83
84bin/tdbtool$(EXEEXT): tools/tdbtool.o $(TDB_LIB)
85 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtool tools/tdbtool.o -L. -ltdb
86
87bin/tdbtorture$(EXEEXT): tools/tdbtorture.o $(TDB_LIB)
88 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtorture tools/tdbtorture.o -L. -ltdb
89
90bin/tdbdump$(EXEEXT): tools/tdbdump.o $(TDB_LIB)
91 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbdump tools/tdbdump.o -L. -ltdb
92
93bin/tdbbackup$(EXEEXT): tools/tdbbackup.o $(TDB_LIB)
94 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbbackup tools/tdbbackup.o -L. -ltdb
95
96test: bin/tdbtorture$(EXEEXT)
97 bin/tdbtorture$(EXEEXT)
98
99installcheck: test install
100
101clean:
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
105
106distclean: clean
107 rm -f *~ */*~
108 rm -f config.log config.status include/config.h config.cache
109 rm -f Makefile
110
111realdistclean: distclean
112 rm -f configure include/config.h.in
Note: See TracBrowser for help on using the repository browser.