make libdingaling static and have it properly handle building it's own deps. Use in tree static apr, apr-utils, iksemel with libdingaling

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4634 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2007-03-17 22:21:27 +00:00
parent 3972467967
commit 8a90afdb4b
4 changed files with 47 additions and 37 deletions

View File

@ -1,32 +1,39 @@
EXTRA_DIST =
SUBDIRS =
AUTOMAKE_OPTS= gnu
AUTOMAKE_OPTS=foreign
NAME=dingaling
PREFIX=$(prefix)
TOUCH_TARGET=@if test -f "$@" ; then touch "$@" ; fi ;
AM_CFLAGS = $(new_AM_CFLAGS) -I./src -I$(prefix)/include
AM_CPPFLAGS = $(AM_CFLAGS)
AM_LDFLAGS = $(new_AM_LDFLAGS)
APR_CONFIG= $(shell which ../apr/apr-1-config || which $(prefix)/bin/apr-1-config )
APU_CONFIG= $(shell which ../apr-util/apu-1-config || which $(prefix)/bin/apu-1-config)
AM_CFLAGS += -I$(PREFIX)/include $(shell $(APR_CONFIG) --cflags --cppflags --includes)
AM_LDFLAGS += -L$(PREFIX)/lib
AM_LDFLAGS += $(shell $(APR_CONFIG) --link-ld --libs )
AM_CFLAGS += $(shell $(APU_CONFIG) --includes)
AM_LDFLAGS += $(shell $(APU_CONFIG) --link-ld --libs )
AM_CFLAGS += `../apr/apr-1-config --cflags --cppflags --includes || $(prefix)/bin/apr-1-config --cflags --cppflags --includes`
AM_CFLAGS += `../apr-util/apu-1-config --includes || $(prefix)/bin/apu-1-config --includes`
AM_CFLAGS += -I../iksemel/include
lib_LTLIBRARIES = libdingaling.la
libdingaling_la_SOURCES = src/libdingaling.c src/sha1.c
libdingaling_la_CFLAGS = $(AM_CFLAGS)
libdingaling_la_LDFLAGS =
libdingaling_la_LIBADD = ../iksemel/src/libiksemel.la
libdingaling_la_LDFLAGS = $(AM_LDFLAGS)
libdingaling_la_LIBADD = ../iksemel/src/libiksemel.la ../apr/libapr-1.la ../apr-util/libaprutil-1.la
library_includedir = $(prefix)/include
library_include_HEADERS = src/libdingaling.h
$(libdingaling_la_SOURCES): $(libdingaling_la_LIBADD)
../apr/libapr-1.la: ../apr ../apr/.update
cd ../apr && $(MAKE)
$(TOUCH_TARGET)
../apr-util/libaprutil-1.la: ../apr-util ../apr-util/.update
cd ../apr-util && $(MAKE)
$(TOUCH_TARGET)
../iksemel/src/libiksemel.la: ../iksemel ../iksemel/.update
cd ../iksemel && $(MAKE)
$(TOUCH_TARGET)
dox:
cd docs && doxygen $(PWD)/docs/Doxygen.conf

View File

@ -74,7 +74,8 @@ am__installdirs = "$(DESTDIR)$(libdir)" \
"$(DESTDIR)$(library_includedir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
libdingaling_la_DEPENDENCIES = ../iksemel/src/libiksemel.la
libdingaling_la_DEPENDENCIES = ../iksemel/src/libiksemel.la \
../apr/libapr-1.la ../apr-util/libaprutil-1.la
am_libdingaling_la_OBJECTS = libdingaling_la-libdingaling.lo \
libdingaling_la-sha1.lo
libdingaling_la_OBJECTS = $(am_libdingaling_la_OBJECTS)
@ -218,23 +219,22 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
EXTRA_DIST =
SUBDIRS =
AUTOMAKE_OPTS = gnu
AUTOMAKE_OPTS = foreign
NAME = dingaling
PREFIX = $(prefix)
TOUCH_TARGET = @if test -f "$@" ; then touch "$@" ; fi ;
AM_CFLAGS = $(new_AM_CFLAGS) -I./src -I$(prefix)/include \
-I$(PREFIX)/include $(shell $(APR_CONFIG) --cflags --cppflags \
--includes) $(shell $(APU_CONFIG) --includes) \
-I../iksemel/include
`../apr/apr-1-config --cflags --cppflags --includes || \
$(prefix)/bin/apr-1-config --cflags --cppflags --includes` \
`../apr-util/apu-1-config --includes || \
$(prefix)/bin/apu-1-config --includes` -I../iksemel/include
AM_CPPFLAGS = $(AM_CFLAGS)
AM_LDFLAGS = $(new_AM_LDFLAGS) -L$(PREFIX)/lib $(shell $(APR_CONFIG) \
--link-ld --libs ) $(shell $(APU_CONFIG) --link-ld --libs )
APR_CONFIG = $(shell which ../apr/apr-1-config || which $(prefix)/bin/apr-1-config )
APU_CONFIG = $(shell which ../apr-util/apu-1-config || which $(prefix)/bin/apu-1-config)
AM_LDFLAGS = $(new_AM_LDFLAGS)
lib_LTLIBRARIES = libdingaling.la
libdingaling_la_SOURCES = src/libdingaling.c src/sha1.c
libdingaling_la_CFLAGS = $(AM_CFLAGS)
libdingaling_la_LDFLAGS =
libdingaling_la_LIBADD = ../iksemel/src/libiksemel.la
libdingaling_la_LDFLAGS = $(AM_LDFLAGS)
libdingaling_la_LIBADD = ../iksemel/src/libiksemel.la ../apr/libapr-1.la ../apr-util/libaprutil-1.la
library_includedir = $(prefix)/include
library_include_HEADERS = src/libdingaling.h
all: all-recursive
@ -763,6 +763,20 @@ uninstall-info: uninstall-info-recursive
uninstall-library_includeHEADERS
$(libdingaling_la_SOURCES): $(libdingaling_la_LIBADD)
../apr/libapr-1.la: ../apr ../apr/.update
cd ../apr && $(MAKE)
$(TOUCH_TARGET)
../apr-util/libaprutil-1.la: ../apr-util ../apr-util/.update
cd ../apr-util && $(MAKE)
$(TOUCH_TARGET)
../iksemel/src/libiksemel.la: ../iksemel ../iksemel/.update
cd ../iksemel && $(MAKE)
$(TOUCH_TARGET)
dox:
cd docs && doxygen $(PWD)/docs/Doxygen.conf

View File

@ -0,0 +1,3 @@
#! /bin/sh
./configure "$@" --disable-shared

View File

@ -1,8 +1,6 @@
BASE=../../../..
IKSEMEL_DIR=$(BASE)/libs/iksemel
DING_DIR=$(BASE)/libs/libdingaling
IKSEMELLA=$(IKSEMEL_DIR)/src/libiksemel.la
DINGLA=$(DING_DIR)/libdingaling.la
LOCAL_CFLAGS=-I$(DING_DIR)/src
@ -10,18 +8,6 @@ LOCAL_LIBADD=$(DINGLA)
include $(BASE)/build/modmake.rules
INST_DINGLA=$(PREFIX)/lib/libdingaling.la
$(IKSEMELLA): $(IKSEMEL_DIR) $(IKSEMEL_DIR)/.update
cd $(IKSEMEL_DIR) && $(MAKE)
$(TOUCH_TARGET)
$(DINGLA): $(IKSEMELLA) $(DING_DIR) $(DING_DIR)/.update
$(DINGLA): $(DING_DIR) $(DING_DIR)/.update
cd $(DING_DIR) && $(MAKE)
$(TOUCH_TARGET)
depend_install: $(INST_DINGLA)
$(INST_DINGLA): $(DINGLA)
cd $(DING_DIR) && $(MAKE) install