r19992: Add support to the tdb Makefile.in for executable extensions and for
[Samba/nascimento.git] / source / tdb / Makefile.in
blob455a6e52ce462a0706e9a5b9b03be43d9736270f
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 -I../include -I@libreplacedir@
16 CFLAGS = $(CPPFLAGS) @CFLAGS@
17 LDFLAGS = @LDFLAGS@
18 EXEEXT = @EXEEXT@
20 .PHONY: test
22 PROGS = bin/tdbtool$(EXEEXT) bin/tdbtorture$(EXEEXT)
23 PROGS_NOINSTALL = bin/tdbtest$(EXEEXT) bin/tdbdump$(EXEEXT) bin/tdbbackup$(EXEEXT)
24 ALL_PROGS = $(PROGS) $(PROGS_NOINSTALL)
26 TDB_OBJ = @TDBOBJ@
28 DIRS = bin common tools
30 all: showflags dirs $(PROGS)
32 showflags:
33 @echo 'tdb will be compiled with flags:'
34 @echo ' CFLAGS = $(CFLAGS)'
35 @echo ' CPPFLAGS = $(CPPFLAGS)'
36 @echo ' LDFLAGS = $(LDFLAGS)'
37 @echo ' LIBS = $(LIBS)'
39 .c.o:
40 @echo Compiling $*.c
41 @mkdir -p `dirname $@`
42 @$(CC) $(CFLAGS) -c $< -o $@
44 dirs:
45 @mkdir -p $(DIRS)
47 install: all
48 mkdir -p $(bindir)
49 mkdir -p $(includedir)
50 mkdir -p $(libdir)
51 mkdir -p $(libdir)/pkgconfig
52 cp $(PROGS) $(bindir)
53 cp $(srcdir)/include/tdb.h $(includedir)
54 cp tdb.pc $(libdir)/pkgconfig
56 libtdb.a: $(TDB_OBJ)
57 ar -rv libtdb.a $(TDB_OBJ)
59 bin/tdbtest$(EXEEXT): tools/tdbtest.o libtdb.a
60 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb -lgdbm
62 bin/tdbtool$(EXEEXT): tools/tdbtool.o libtdb.a
63 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtool tools/tdbtool.o -L. -ltdb
65 bin/tdbtorture$(EXEEXT): tools/tdbtorture.o libtdb.a
66 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtorture tools/tdbtorture.o -L. -ltdb
68 bin/tdbdump$(EXEEXT): tools/tdbdump.o libtdb.a
69 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbdump tools/tdbdump.o -L. -ltdb
71 bin/tdbbackup$(EXEEXT): tools/tdbbackup.o libtdb.a
72 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbbackup tools/tdbbackup.o -L. -ltdb
74 test: bin/tdbtorture$(EXEEXT)
75 bin/tdbtorture$(EXEEXT)
77 installcheck: test install
79 clean:
80 rm -f $(ALL_PROGS) *.o *.a common/*.o tools/*.o tdb.pc
81 rm -f test.db test.tdb torture.tdb test.gdbm
83 distclean: clean
84 rm -f *~ */*~
85 rm -f config.log config.status include/config.h config.cache
86 rm -f Makefile
88 realdistclean: distclean
89 rm -f configure include/config.h.in