source: branches/samba-3.0/source/tdb/Makefile.in@ 1036

Last change on this file since 1036 was 1, checked in by Paul Smedley, 18 years ago

Initial code import

File size: 2.1 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 -I../include -I@libreplacedir@
16CFLAGS = $(CPPFLAGS) @CFLAGS@
17LDFLAGS = @LDFLAGS@
18EXEEXT = @EXEEXT@
19
20.PHONY: test
21
22PROGS = bin/tdbtool$(EXEEXT) bin/tdbtorture$(EXEEXT)
23PROGS_NOINSTALL = bin/tdbtest$(EXEEXT) bin/tdbdump$(EXEEXT) bin/tdbbackup$(EXEEXT)
24ALL_PROGS = $(PROGS) $(PROGS_NOINSTALL)
25
26TDB_OBJ = @TDBOBJ@
27
28DIRS = bin common tools
29
30all: showflags dirs $(PROGS)
31
32showflags:
33 @echo 'tdb will be compiled with flags:'
34 @echo ' CFLAGS = $(CFLAGS)'
35 @echo ' CPPFLAGS = $(CPPFLAGS)'
36 @echo ' LDFLAGS = $(LDFLAGS)'
37 @echo ' LIBS = $(LIBS)'
38
39.c.o:
40 @echo Compiling $*.c
41 @mkdir -p `dirname $@`
42 @$(CC) $(CFLAGS) -c $< -o $@
43
44dirs:
45 @mkdir -p $(DIRS)
46
47install: 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
55
56libtdb.a: $(TDB_OBJ)
57 ar -rv libtdb.a $(TDB_OBJ)
58
59bin/tdbtest$(EXEEXT): tools/tdbtest.o libtdb.a
60 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb -lgdbm
61
62bin/tdbtool$(EXEEXT): tools/tdbtool.o libtdb.a
63 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtool tools/tdbtool.o -L. -ltdb
64
65bin/tdbtorture$(EXEEXT): tools/tdbtorture.o libtdb.a
66 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtorture tools/tdbtorture.o -L. -ltdb
67
68bin/tdbdump$(EXEEXT): tools/tdbdump.o libtdb.a
69 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbdump tools/tdbdump.o -L. -ltdb
70
71bin/tdbbackup$(EXEEXT): tools/tdbbackup.o libtdb.a
72 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbbackup tools/tdbbackup.o -L. -ltdb
73
74test: bin/tdbtorture$(EXEEXT)
75 bin/tdbtorture$(EXEEXT)
76
77installcheck: test install
78
79clean:
80 rm -f $(ALL_PROGS) *.o *.a common/*.o tools/*.o tdb.pc
81 rm -f test.db test.tdb torture.tdb test.gdbm
82
83distclean: clean
84 rm -f *~ */*~
85 rm -f config.log config.status include/config.h config.cache
86 rm -f Makefile
87
88realdistclean: distclean
89 rm -f configure include/config.h.in
Note: See TracBrowser for help on using the repository browser.