blob: 6eee227f7ac80a2384e9938028fad57c3fb45027 (
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
#!gmake
#
prefix = @prefix@
datarootdir = @datarootdir@
exec_prefix = @exec_prefix@
includedir = @includedir@
libdir = @libdir@
mandir = @mandir@
VPATH = @srcdir@:@libreplacedir@
srcdir = @srcdir@
builddir = @builddir@
XSLTPROC = @XSLTPROC@
INSTALLCMD = @INSTALL@
CC = @CC@
CFLAGS = @CFLAGS@ -DHAVE_CONFIG_H= -I. -I@srcdir@
EXTRA_TARGETS = @DOC_TARGET@
PICFLAG = @PICFLAG@
PACKAGE_VERSION = @PACKAGE_VERSION@
SHLIBEXT = @SHLIBEXT@
SHLD_FLAGS = @SHLD_FLAGS@
.SUFFIXES: .c .o .3 .3.xml .xml .html
LIBOBJ = @TALLOC_OBJ@ @LIBREPLACEOBJ@
SOLIB = libtalloc.$(SHLIBEXT).$(PACKAGE_VERSION)
SONAME = libtalloc.$(SHLIBEXT).1
.c.o:
$(CC) $(PICFLAG) -o $@ -c $< $(CFLAGS)
all: showflags libtalloc.a $(SOLIB) testsuite $(EXTRA_TARGETS)
showflags:
@echo 'talloc will be compiled with flags:'
@echo ' CFLAGS = $(CFLAGS)'
@echo ' LIBS = $(LIBS)'
testsuite: $(LIBOBJ) testsuite.o
$(CC) $(CFLAGS) -o testsuite testsuite.o $(LIBOBJ) $(LIBS)
libtalloc.a: $(LIBOBJ)
ar -rv $@ $(LIBOBJ)
@-ranlib $@
$(SOLIB): $(LIBOBJ)
$(CC) $(SHLD_FLAGS) -o $@ $(LIBOBJ) @SONAMEFLAG@$(SONAME)
install: all
${INSTALLCMD} -d $(DESTDIR)$(libdir)
${INSTALLCMD} -d $(DESTDIR)$(libdir)/pkgconfig
${INSTALLCMD} -m 755 libtalloc.a $(DESTDIR)$(libdir)
${INSTALLCMD} -m 755 $(SOLIB) $(DESTDIR)$(libdir)
${INSTALLCMD} -d $(DESTDIR)${includedir}
${INSTALLCMD} -m 644 $(srcdir)/talloc.h $(DESTDIR)$(includedir)
${INSTALLCMD} -m 644 talloc.pc $(DESTDIR)$(libdir)/pkgconfig
if [ -f talloc.3 ];then ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man3; fi
if [ -f talloc.3 ];then ${INSTALLCMD} -m 644 talloc.3 $(DESTDIR)$(mandir)/man3; fi
doc: talloc.3 talloc.3.html
.3.xml.3:
-test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
.xml.html:
-test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
clean:
rm -f *~ $(LIBOBJ) $(SOLIB) libtalloc.a testsuite testsuite.o *.gc?? talloc.3 talloc.3.html
test: testsuite
./testsuite
gcov:
gcov talloc.c
installcheck:
$(MAKE) test
distclean: clean
rm -f *~ */*~
rm -f Makefile
rm -f config.log config.status config.h config.cache
realdistclean: distclean
rm -f configure config.h.in
|