summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/Makefile.in
blob: 1e5884a9681b2311fece9df3cc4822c0d705ab50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!gmake
#
# Makefile for tdb directory
#

CC = @CC@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
includedir = @includedir@
libdir = @libdir@
VPATH = @srcdir@
srcdir = @srcdir@
builddir = @builddir@
CFLAGS = -I$(srcdir)/include -Iinclude @CFLAGS@

PROGS = bin/tdbtool bin/tdbtorture
TDB_OBJ = @TDBOBJ@

DIRS = lib bin common tools examples

all: dirs $(PROGS)

.c.o:
	@echo Compiling $*.c
	@mkdir -p `dirname $@`
	$(CC) $(CFLAGS) -c $< -o $@

dirs:
	@mkdir -p $(DIRS)

install: all
	mkdir -p $(bindir)
	mkdir -p $(includedir)
	mkdir -p $(libdir) 
	mkdir -p $(libdir)/pkgconfig
	cp $(PROGS) $(bindir)
	cp $(srcdir)/include/tdb.h $(includedir)
	cp tdb.pc $(libdir)/pkgconfig

libtdb.a: $(TDB_OBJ)
	ar -rv libtdb.a $(TDB_OBJ)

bin/tdbtest: tools/tdbtest.o libtdb.a
	$(CC) $(CFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb -lgdbm

bin/tdbtool: tools/tdbtool.o libtdb.a
	$(CC) $(CFLAGS) -o bin/tdbtool tools/tdbtool.o -L. -ltdb

bin/tdbtorture: tools/tdbtorture.o libtdb.a
	$(CC) $(CFLAGS) -o bin/tdbtorture tools/tdbtorture.o -L. -ltdb

bin/tdbdump: tools/tdbdump.o libtdb.a
	$(CC) $(CFLAGS) -o bin/tdbdump tools/tdbdump.o -L. -ltdb

bin/tdbbackup: tools/tdbbackup.o libtdb.a
	$(CC) $(CFLAGS) -o bin/tdbbackup tools/tdbbackup.o -L. -ltdb

clean:
	rm -f $(PROGS) common/*.o tools/*.o *~ *.bak */*~ */*.bak *% core test.db test.tdb test.gdbm

installcheck: install
	$(bindir)/tdbtorture

test: installcheck