summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-11 22:52:42 +0100
committerMichael Adam <obnox@samba.org>2008-02-13 01:40:11 +0100
commit81a44cb69924c6a80b631b2a8283f5f8d3049b3f (patch)
tree46c7cc36d940baa33bde7bf7f4a3a9a0e9060d20 /source3
parentff0065672e99c4693d2b3e1dcce969fd4852e609 (diff)
downloadsamba-81a44cb69924c6a80b631b2a8283f5f8d3049b3f.tar.gz
samba-81a44cb69924c6a80b631b2a8283f5f8d3049b3f.tar.bz2
samba-81a44cb69924c6a80b631b2a8283f5f8d3049b3f.zip
Split actual content out of talloc Makefile into talloc.mk.
(cherry picked from commit 2b8939975267fc4774bccd2a35ea9a35129d0a2b) (This used to be commit 7710d3dea350a85348d46747e4f4cde2b20741de)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/talloc/Makefile.in42
-rw-r--r--source3/lib/talloc/talloc.mk37
2 files changed, 42 insertions, 37 deletions
diff --git a/source3/lib/talloc/Makefile.in b/source3/lib/talloc/Makefile.in
index 5b0506d17f..ca7c302c06 100644
--- a/source3/lib/talloc/Makefile.in
+++ b/source3/lib/talloc/Makefile.in
@@ -18,53 +18,21 @@ PICFLAG = @PICFLAG@
PACKAGE_VERSION = @PACKAGE_VERSION@
SHLIBEXT = @SHLIBEXT@
SHLD_FLAGS = @SHLD_FLAGS@
+tallocdir = @tallocdir@
-LIBOBJ = @TALLOC_OBJ@ @LIBREPLACEOBJ@
+LIBOBJ = $(TALLOC_OBJ) @LIBREPLACEOBJ@
-SOLIB = libtalloc.$(SHLIBEXT).$(PACKAGE_VERSION)
-SONAME = libtalloc.$(SHLIBEXT).1
-
-all:: showflags libtalloc.a $(SOLIB) testsuite $(EXTRA_TARGETS)
+all:: showflags $(EXTRA_TARGETS)
include rules.mk
-
-testsuite:: $(LIBOBJ) testsuite.o
- $(CC) $(CFLAGS) -o testsuite testsuite.o $(LIBOBJ) $(LIBS)
-
-libtalloc.a: $(LIBOBJ)
- ar -rv $@ $(LIBOBJ)
- @-ranlib $@
+include talloc.mk
$(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
- which swig >/dev/null 2>&1 && ${INSTALLCMD} -d $(DESTDIR)`swig -swiglib` || true
- which swig >/dev/null 2>&1 && ${INSTALLCMD} -m 644 talloc.i $(DESTDIR)`swig -swiglib` || true
-
-doc:: talloc.3 talloc.3.html
-
-clean::
- rm -f *~ $(LIBOBJ) $(SOLIB) libtalloc.a testsuite testsuite.o *.gc?? talloc.3 talloc.3.html
-
check: test
-test:: testsuite
- ./testsuite
-
-gcov::
- gcov talloc.c
-
-installcheck:: test
+installcheck:: test install
distclean:: clean
rm -f Makefile
diff --git a/source3/lib/talloc/talloc.mk b/source3/lib/talloc/talloc.mk
new file mode 100644
index 0000000000..2dc75dd716
--- /dev/null
+++ b/source3/lib/talloc/talloc.mk
@@ -0,0 +1,37 @@
+all:: libtalloc.a $(SOLIB) testsuite
+
+TALLOC_OBJ = $(tallocdir)/talloc.o
+
+SOLIB = libtalloc.$(SHLIBEXT).$(PACKAGE_VERSION)
+SONAME = libtalloc.$(SHLIBEXT).1
+
+testsuite:: $(LIBOBJ) testsuite.o
+ $(CC) $(CFLAGS) -o testsuite testsuite.o $(LIBOBJ) $(LIBS)
+
+libtalloc.a: $(LIBOBJ)
+ ar -rv $@ $(LIBOBJ)
+ @-ranlib $@
+
+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
+ which swig >/dev/null 2>&1 && ${INSTALLCMD} -d $(DESTDIR)`swig -swiglib` || true
+ which swig >/dev/null 2>&1 && ${INSTALLCMD} -m 644 talloc.i $(DESTDIR)`swig -swiglib` || true
+
+doc:: talloc.3 talloc.3.html
+
+clean::
+ rm -f *~ $(LIBOBJ) $(SOLIB) libtalloc.a testsuite testsuite.o *.gc?? talloc.3 talloc.3.html
+
+test:: testsuite
+ ./testsuite
+
+gcov::
+ gcov talloc.c