standalone: Use more variables, preparing to include these files from main
[metze/samba/wip.git] / lib / talloc / talloc.mk
index 7f0afed560877b294a48e9455e2365a66df45490..ce7784c8a224bed224a73070ccc053a9789ace15 100644 (file)
@@ -2,20 +2,21 @@ TALLOC_OBJ = $(tallocdir)/talloc.o
 
 TALLOC_SOLIB = libtalloc.$(SHLIBEXT).$(PACKAGE_VERSION)
 TALLOC_SONAME = libtalloc.$(SHLIBEXT).1
+TALLOC_STLIB = libtalloc.a
 
-all:: libtalloc.a $(TALLOC_SOLIB) testsuite
+all:: $(TALLOC_STLIB) $(TALLOC_SOLIB) testsuite
 
 testsuite:: $(LIBOBJ) testsuite.o testsuite_main.o
        $(CC) $(CFLAGS) -o testsuite testsuite.o testsuite_main.o $(LIBOBJ) $(LIBS)
 
-libtalloc.a: $(LIBOBJ)
+$(TALLOC_STLIB): $(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 $(TALLOC_STLIB) $(DESTDIR)$(libdir)
        ${INSTALLCMD} -m 755 $(TALLOC_SOLIB) $(DESTDIR)$(libdir)
        ${INSTALLCMD} -d $(DESTDIR)${includedir}
        ${INSTALLCMD} -m 644 $(srcdir)/talloc.h $(DESTDIR)$(includedir)
@@ -28,7 +29,7 @@ install:: all
 doc:: talloc.3 talloc.3.html
 
 clean::
-       rm -f *~ $(LIBOBJ) $(TALLOC_SOLIB) libtalloc.a testsuite testsuite.o testsuite_main.o *.gc?? talloc.3 talloc.3.html
+       rm -f *~ $(LIBOBJ) $(TALLOC_SOLIB) $(TALLOC_STLIB) testsuite testsuite.o testsuite_main.o *.gc?? talloc.3 talloc.3.html
 
 test:: testsuite
        ./testsuite