From 18b47de4b2d83964bc1846956e51fb981ea400b9 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 15 Mar 2007 04:32:09 +0000 Subject: [PATCH] do a better job with dependency tracking so the the mods don't keep trying to build or install when they don't need to. This should start to help with the speed of the build. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4602 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- Makefile.am | 18 ++----------- Makefile.in | 18 ++----------- libs/iksemel/configure.gnu | 3 +++ libs/libdingaling/Makefile.am | 3 ++- libs/libdingaling/Makefile.in | 6 ++--- src/mod/Makefile.am | 16 ++++++------ src/mod/Makefile.in | 16 ++++++------ src/mod/applications/mod_enum/Makefile | 13 ++++------ src/mod/codecs/mod_amr/Makefile | 13 ++++++---- src/mod/codecs/mod_g722/Makefile | 13 ++++------ src/mod/codecs/mod_g723_1/Makefile | 6 +++-- src/mod/codecs/mod_g726/Makefile | 13 ++++------ src/mod/codecs/mod_g729/Makefile | 6 +++-- src/mod/codecs/mod_gsm/Makefile | 13 ++++------ src/mod/codecs/mod_ilbc/Makefile | 13 ++++------ src/mod/codecs/mod_lpc10/Makefile | 13 ++++------ src/mod/codecs/mod_speex/Makefile | 17 ++++++++---- src/mod/directories/mod_ldap/Makefile | 2 +- src/mod/endpoints/mod_dingaling/Makefile | 26 ++++++++++++++----- src/mod/endpoints/mod_iax/Makefile | 10 ++++--- src/mod/endpoints/mod_portaudio/Makefile | 13 +++++----- src/mod/endpoints/mod_sofia/Makefile | 11 ++++++-- .../event_handlers/mod_xmpp_event/Makefile | 16 ++++++++---- src/mod/formats/mod_sndfile/Makefile | 20 +++++++++----- src/mod/xml_int/mod_xml_rpc/Makefile | 13 +++++++--- 25 files changed, 162 insertions(+), 149 deletions(-) create mode 100644 libs/iksemel/configure.gnu diff --git a/Makefile.am b/Makefile.am index 31c433ef5f..ded0451e9b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -85,7 +85,7 @@ libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS) libfreeswitch_la_LIBADD = $(CORE_LIBS) nodist_libfreeswitch_la_SOURCES = src/include/switch_version.h -$(libfreeswitch_la_SOURCES): deps +$(libfreeswitch_la_SOURCES): $(CORE_LIBS) MOD_LINK = $(BASE)/libfreeswitch.la @@ -144,29 +144,15 @@ nodepends: .nodepends yesdepends: rm .nodepends -sqlite: +$(CORE_LIBS): cd libs/sqlite && $(MAKE) - -apr: cd libs/apr && $(MAKE) - -apr-util: cd libs/apr-util && $(MAKE) - -pcre: cd libs/pcre && $(MAKE) - -srtp: cd libs/srtp && $(MAKE) - -resample: cd libs/libresample && $(MAKE) - -teletone: cd libs/libteletone && $(MAKE) -deps: sqlite apr apr-util pcre srtp resample teletone - core: deps libfreeswitch.la install_core: install-libLTLIBRARIES diff --git a/Makefile.in b/Makefile.in index 8adb60ac78..b62a740db0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1085,7 +1085,7 @@ uninstall-info: uninstall-info-recursive uninstall-libLTLIBRARIES uninstall-library_includeHEADERS -$(libfreeswitch_la_SOURCES): deps +$(libfreeswitch_la_SOURCES): $(CORE_LIBS) install-data-local: @echo Installing $(NAME) @@ -1133,29 +1133,15 @@ nodepends: .nodepends yesdepends: rm .nodepends -sqlite: +$(CORE_LIBS): cd libs/sqlite && $(MAKE) - -apr: cd libs/apr && $(MAKE) - -apr-util: cd libs/apr-util && $(MAKE) - -pcre: cd libs/pcre && $(MAKE) - -srtp: cd libs/srtp && $(MAKE) - -resample: cd libs/libresample && $(MAKE) - -teletone: cd libs/libteletone && $(MAKE) -deps: sqlite apr apr-util pcre srtp resample teletone - core: deps libfreeswitch.la install_core: install-libLTLIBRARIES diff --git a/libs/iksemel/configure.gnu b/libs/iksemel/configure.gnu new file mode 100644 index 0000000000..f719542de6 --- /dev/null +++ b/libs/iksemel/configure.gnu @@ -0,0 +1,3 @@ +#! /bin/sh +./configure "$@" --disable-shared --with-pic + diff --git a/libs/libdingaling/Makefile.am b/libs/libdingaling/Makefile.am index 96ab8afea0..21ca13e6e5 100644 --- a/libs/libdingaling/Makefile.am +++ b/libs/libdingaling/Makefile.am @@ -16,12 +16,13 @@ AM_LDFLAGS += $(shell $(APR_CONFIG) --link-ld --libs ) AM_CFLAGS += $(shell $(APU_CONFIG) --includes) AM_LDFLAGS += $(shell $(APU_CONFIG) --link-ld --libs ) AM_CFLAGS += -I../iksemel/include -AM_LDFLAGS += ../iksemel/src/libiksemel.la + 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 library_includedir = $(prefix)/include library_include_HEADERS = src/libdingaling.h diff --git a/libs/libdingaling/Makefile.in b/libs/libdingaling/Makefile.in index 262cf6ff7b..a99f303a85 100644 --- a/libs/libdingaling/Makefile.in +++ b/libs/libdingaling/Makefile.in @@ -74,7 +74,7 @@ am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(library_includedir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) -libdingaling_la_LIBADD = +libdingaling_la_DEPENDENCIES = ../iksemel/src/libiksemel.la am_libdingaling_la_OBJECTS = libdingaling_la-libdingaling.lo \ libdingaling_la-sha1.lo libdingaling_la_OBJECTS = $(am_libdingaling_la_OBJECTS) @@ -227,14 +227,14 @@ AM_CFLAGS = $(new_AM_CFLAGS) -I./src -I$(prefix)/include \ -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 ) \ - ../iksemel/src/libiksemel.la + --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) 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 library_includedir = $(prefix)/include library_include_HEADERS = src/libdingaling.h all: all-recursive diff --git a/src/mod/Makefile.am b/src/mod/Makefile.am index 2700ddfd73..064f181dc9 100644 --- a/src/mod/Makefile.am +++ b/src/mod/Makefile.am @@ -13,8 +13,8 @@ all: echo making $$i ; \ moddir=$(MOD_DIR); \ if test -f $$moddir/Makefile ; then \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) ; else \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules ; \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) || exit 1; else \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules || exit 1; \ fi; \ done @@ -23,8 +23,8 @@ clean: echo making clean $$i ; \ moddir=$(MOD_DIR); \ if test -f $$moddir/Makefile ; then \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) clean ; else \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules clean ; \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) clean || exit 1; else \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules clean || exit 1; \ fi; \ done @@ -34,8 +34,8 @@ install: echo making install $$i ; \ moddir=$(MOD_DIR); \ if test -f $$moddir/Makefile ; then \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) install ; else \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules install ; \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) install || exit 1; else \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules install || exit 1; \ fi; \ done @echo done @@ -46,8 +46,8 @@ uninstall: echo making uninstall $$i ; \ moddir=$(MOD_DIR); \ if test -f $$moddir/Makefile ; then \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) uninstall ; else \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules uninstall ; \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) uninstall || exit 1; else \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules uninstall || exit 1; \ fi; \ done @echo done diff --git a/src/mod/Makefile.in b/src/mod/Makefile.in index 0e9353f8d9..456bd66a2e 100644 --- a/src/mod/Makefile.in +++ b/src/mod/Makefile.in @@ -362,8 +362,8 @@ all: echo making $$i ; \ moddir=$(MOD_DIR); \ if test -f $$moddir/Makefile ; then \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) ; else \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules ; \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) || exit 1; else \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules || exit 1; \ fi; \ done @@ -372,8 +372,8 @@ clean: echo making clean $$i ; \ moddir=$(MOD_DIR); \ if test -f $$moddir/Makefile ; then \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) clean ; else \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules clean ; \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) clean || exit 1; else \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules clean || exit 1; \ fi; \ done @@ -383,8 +383,8 @@ install: echo making install $$i ; \ moddir=$(MOD_DIR); \ if test -f $$moddir/Makefile ; then \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) install ; else \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules install ; \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) install || exit 1; else \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules install || exit 1; \ fi; \ done @echo done @@ -395,8 +395,8 @@ uninstall: echo making uninstall $$i ; \ moddir=$(MOD_DIR); \ if test -f $$moddir/Makefile ; then \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) uninstall ; else \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules uninstall ; \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) uninstall || exit 1; else \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules uninstall || exit 1; \ fi; \ done @echo done diff --git a/src/mod/applications/mod_enum/Makefile b/src/mod/applications/mod_enum/Makefile index f747638cf1..cc145874c9 100644 --- a/src/mod/applications/mod_enum/Makefile +++ b/src/mod/applications/mod_enum/Makefile @@ -1,14 +1,11 @@ -# define these targets in your makefile if you wish -# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean: - -# and define these variables to impact your build MODNAME=mod_enum +BASE=../../../.. +UDNSA=$(BASE)/libs/udns/libudns.a LOCAL_CFLAGS=-I$(BASE)/libs/udns -LOCAL_LDFLAGS= -LOCAL_OBJS=$(BASE)/libs/udns/libudns.a -include ../../../../build/modmake.rules +LOCAL_LIBADD=$(UDNSA) +include $(BASE)/build/modmake.rules -local_depend: +$(UDNSA): cd $(BASE)/libs/udns && $(MAKE) staticlib diff --git a/src/mod/codecs/mod_amr/Makefile b/src/mod/codecs/mod_amr/Makefile index 5427797ef5..bbdc825752 100644 --- a/src/mod/codecs/mod_amr/Makefile +++ b/src/mod/codecs/mod_amr/Makefile @@ -1,13 +1,16 @@ MODNAME=mod_amr -ifeq ($(shell ls -d $(BASE)/libs/amr),$(BASE)/libs/amr) +BASE=../../../.. -LOCAL_CFLAGS += -I$(PREFIX)/include/amr -LOCAL_LDFLAGS +=-lamr +topdir=$(shell cd $(BASE) && pwd) +ifeq ($(shell test -d $(topdir)/libs/amr && cd $(topdir)/libs/amr && pwd),$(topdir)/libs/amr) + +LOCAL_CFLAGS = -I$(PREFIX)/include/amr +LOCAL_LDFLAGS =-lamr else -LOCAL_CFLAGS += -DAMR_PASSTHROUGH +LOCAL_CFLAGS = -DAMR_PASSTHROUGH endif -include ../../../../build/modmake.rules +include $(BASE)/build/modmake.rules diff --git a/src/mod/codecs/mod_g722/Makefile b/src/mod/codecs/mod_g722/Makefile index 2889c74669..60aca28462 100644 --- a/src/mod/codecs/mod_g722/Makefile +++ b/src/mod/codecs/mod_g722/Makefile @@ -1,13 +1,10 @@ -# define these targets in your makefile if you wish -# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean: - -# and define these variables to impact your build MODNAME=mod_g722 +BASE=../../../.. +G7XXLA=$(BASE)/libs/codec/g7xx/libg7xx.la LOCAL_CFLAGS=-I$(BASE)/libs/codec/g7xx/src/include/ -LOCAL_LDFLAGS=$(BASE)/libs/codec/g7xx/libg7xx.la -LOCAL_OBJS= -include ../../../../build/modmake.rules +LOCAL_LIBADD=$(G7XXLA) +include $(BASE)/build/modmake.rules -local_depend: +$(G7XXLA): cd $(BASE)/libs/codec/g7xx && $(MAKE) diff --git a/src/mod/codecs/mod_g723_1/Makefile b/src/mod/codecs/mod_g723_1/Makefile index 67b0ef553e..bf699a3fd9 100644 --- a/src/mod/codecs/mod_g723_1/Makefile +++ b/src/mod/codecs/mod_g723_1/Makefile @@ -1,8 +1,10 @@ MODNAME=mod_g723_1 -ifeq ($(shell ls -d $(BASE)/libs/libg723_1),$(BASE)/libs/libg723_1) +BASE=../../../.. +topdir=$(shell cd $(BASE) && pwd) +ifeq ($(shell test -d $(topdir)/libs/libg723_1 && cd $(topdir)/libs/libg723_1 && pwd),$(topdir)/libs/libg723_1) LOCAL_CFLAGS += -I$(PREFIX)/include/g723 LOCAL_LDFLAGS +=-lg723 else LOCAL_CFLAGS += -DG723_PASSTHROUGH endif -include ../../../../build/modmake.rules +include $(BASE)/build/modmake.rules diff --git a/src/mod/codecs/mod_g726/Makefile b/src/mod/codecs/mod_g726/Makefile index 39ad5ecf5a..8224780902 100644 --- a/src/mod/codecs/mod_g726/Makefile +++ b/src/mod/codecs/mod_g726/Makefile @@ -1,13 +1,10 @@ -# define these targets in your makefile if you wish -# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean: - -# and define these variables to impact your build MODNAME=mod_g726 +BASE=../../../.. +G726LA=$(BASE)/libs/codec/g726/libg726.la LOCAL_CFLAGS=-I$(BASE)/libs/codec/g726/src -LOCAL_LDFLAGS= -LOCAL_OBJS=$(BASE)/libs/codec/g726/libg726.la -include ../../../../build/modmake.rules +LOCAL_LIBADD=$(G726LA) +include $(BASE)/build/modmake.rules -local_depend: +$(G726LA): cd $(BASE)/libs/codec/g726 && $(MAKE) diff --git a/src/mod/codecs/mod_g729/Makefile b/src/mod/codecs/mod_g729/Makefile index 2edcfa8c7f..9000b2a29e 100644 --- a/src/mod/codecs/mod_g729/Makefile +++ b/src/mod/codecs/mod_g729/Makefile @@ -1,9 +1,11 @@ MODNAME=mod_g729 -ifeq ($(shell ls -d $(BASE)/libs/libg729),$(BASE)/libs/libg729) +BASE=../../../.. +topdir=$(shell cd $(BASE) && pwd) +ifeq ($(shell test -d $(topdir)/libs/libg729 && cd $(topdir)/libs/libg729 && pwd),$(topdir)/libs/libg729) LOCAL_CFLAGS += -I$(PREFIX)/include/libg729 LOCAL_LDFLAGS +=-lg729 else LOCAL_CFLAGS += -DG729_PASSTHROUGH endif -include ../../../../build/modmake.rules +include $(BASE)/build/modmake.rules diff --git a/src/mod/codecs/mod_gsm/Makefile b/src/mod/codecs/mod_gsm/Makefile index b9020f68b5..0ee7c15fac 100644 --- a/src/mod/codecs/mod_gsm/Makefile +++ b/src/mod/codecs/mod_gsm/Makefile @@ -1,12 +1,9 @@ -# define these targets in your makefile if you wish -# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean: - -# and define these variables to impact your build MODNAME=mod_gsm +BASE=../../../.. +GSMLA=$(BASE)/libs/codec/gsm/libgsm.la LOCAL_CFLAGS=-I$(BASE)/libs/codec/gsm/inc -LOCAL_LDFLAGS=$(BASE)/libs/codec/gsm/libgsm.la -LOCAL_OBJS= -include ../../../../build/modmake.rules +LOCAL_LIBADD=$(GSMLA) +include $(BASE)/build/modmake.rules -local_depend: +$(GSMLA): cd $(BASE)/libs/codec/gsm && $(MAKE) diff --git a/src/mod/codecs/mod_ilbc/Makefile b/src/mod/codecs/mod_ilbc/Makefile index 4b9ec6d7c2..39a9b0a93a 100644 --- a/src/mod/codecs/mod_ilbc/Makefile +++ b/src/mod/codecs/mod_ilbc/Makefile @@ -1,12 +1,9 @@ -# define these targets in your makefile if you wish -# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean: - -# and define these variables to impact your build MODNAME=mod_ilbc +BASE=../../../.. +ILBCLA=$(BASE)/libs/codec/ilbc/libilbc.la LOCAL_CFLAGS=-I$(BASE)/libs/codec/ilbc/src -LOCAL_LDFLAGS=$(BASE)/libs/codec/ilbc/libilbc.la -LOCAL_OBJS= -include ../../../../build/modmake.rules +LOCAL_LIBADD=$(ILBCLA) +include $(BASE)/build/modmake.rules -local_depend: +$(ILBCLA): cd $(BASE)/libs/codec/ilbc && $(MAKE) diff --git a/src/mod/codecs/mod_lpc10/Makefile b/src/mod/codecs/mod_lpc10/Makefile index 6698a64d2b..f5e969293a 100644 --- a/src/mod/codecs/mod_lpc10/Makefile +++ b/src/mod/codecs/mod_lpc10/Makefile @@ -1,12 +1,9 @@ -# define these targets in your makefile if you wish -# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean: - -# and define these variables to impact your build MODNAME=mod_lpc10 +BASE=../../../.. +LPC10LA=$(BASE)/libs/codec/lpc10/liblpc10.la LOCAL_CFLAGS=-I$(BASE)/libs/codec/lpc10/src -LOCAL_LDFLAGS=$(BASE)/libs/codec/lpc10/liblpc10.la -LOCAL_OBJS= -include ../../../../build/modmake.rules +LOCAL_LIBADD=$(LPC10LA) +include $(BASE)/build/modmake.rules -local_depend: +$(LPC10LA): cd $(BASE)/libs/codec/lpc10 && $(MAKE) diff --git a/src/mod/codecs/mod_speex/Makefile b/src/mod/codecs/mod_speex/Makefile index 5fe1b0fd04..f5f2fe0dbc 100644 --- a/src/mod/codecs/mod_speex/Makefile +++ b/src/mod/codecs/mod_speex/Makefile @@ -3,10 +3,17 @@ # and define these variables to impact your build MODNAME=mod_speex -LOCAL_CFLAGS=-I$(BASE)/libs/speex/include -LOCAL_LDFLAGS=$(BASE)/libs/speex/libspeex/libspeex.la -LOCAL_OBJS= -include ../../../../build/modmake.rules -local_depend: +BASE=../../../.. + +SPEEXLA=$(BASE)/libs/speex/libspeex/libspeex.la + +LOCAL_CFLAGS=-I$(BASE)/libs/speex/include +LOCAL_LDFLAGS=$(SPEEXLA) +LOCAL_OBJS= +include $(BASE)/build/modmake.rules + +local_depend: $(SPEEXLA) + +$(SPEEXLA): $(BASE)/libs/speex/stamp-h1 cd $(BASE)/libs/speex && $(MAKE) diff --git a/src/mod/directories/mod_ldap/Makefile b/src/mod/directories/mod_ldap/Makefile index abe57097d3..0e5a32344c 100644 --- a/src/mod/directories/mod_ldap/Makefile +++ b/src/mod/directories/mod_ldap/Makefile @@ -19,5 +19,5 @@ $(LDAP_DIR)/Makefile: $(GETLIB) $(LDAP).tgz cd $(LDAP_DIR) && ./configure $(DEFAULT_ARGS) --disable-bdb --disable-hdb -$(LDAPLA) $(LIBLBERLA): $(LDAP_DIR)/Makefile +$(LDAPLA) $(LIBLBERLA): $(LDAP_DIR)/Makefile $(LDAP_DIR)/stamp-h cd $(LDAP_DIR) && $(MAKE) diff --git a/src/mod/endpoints/mod_dingaling/Makefile b/src/mod/endpoints/mod_dingaling/Makefile index d1a60acb43..f8eaa5f0b2 100644 --- a/src/mod/endpoints/mod_dingaling/Makefile +++ b/src/mod/endpoints/mod_dingaling/Makefile @@ -3,16 +3,28 @@ # and define these variables to impact your build MODNAME=mod_dingaling -LOCAL_CFLAGS=-I$(BASE)/libs/libdingaling/src -LOCAL_LDFLAGS=$(BASE)/libs/libdingaling/libdingaling.la -LOCAL_OBJS= -include ../../../../build/modmake.rules +BASE=../../../.. -local_depend: +IKSEMELLA=$(BASE)/libs/iksemel/src/libiksemel.la +DINGLA=$(BASE)/libs/libdingaling/libdingaling.la + +LOCAL_CFLAGS=-I$(BASE)/libs/libdingaling/src +LOCAL_LDFLAGS= +LOCAL_OBJS= +LOCAL_LIBADD=$(DINGLA) + +include $(BASE)/build/modmake.rules + +INST_DINGLA=$(PREFIX)/lib/libdingaling.la + +$(IKSEMELLA): cd $(BASE)/libs/iksemel && $(MAKE) + +$(DINGLA): $(IKSEMELLA) cd $(BASE)/libs/libdingaling && $(MAKE) -depend_install: - cd $(BASE)/libs/iksemel && $(MAKE) install +depend_install: $(INST_DINGLA) + +$(INST_DINGLA): $(DINGLA) cd $(BASE)/libs/libdingaling && $(MAKE) install diff --git a/src/mod/endpoints/mod_iax/Makefile b/src/mod/endpoints/mod_iax/Makefile index 17acba8899..528edfe875 100644 --- a/src/mod/endpoints/mod_iax/Makefile +++ b/src/mod/endpoints/mod_iax/Makefile @@ -3,11 +3,13 @@ # and define these variables to impact your build MODNAME=mod_iax +BASE=../../../.. +IAXLA=$(BASE)/libs/iax/src/libiax.la LOCAL_CFLAGS=-I$(BASE)/libs/iax/src -LOCAL_LDFLAGS=$(BASE)/libs/iax/src/libiax.la -LOCAL_OBJS= -include ../../../../build/modmake.rules +LOCAL_LDFLAGS= +LOCAL_LIBADD=$(IAXLA) +include $(BASE)/build/modmake.rules -local_depend: +$(IAXLA): cd $(BASE)/libs/iax && $(MAKE) diff --git a/src/mod/endpoints/mod_portaudio/Makefile b/src/mod/endpoints/mod_portaudio/Makefile index c5fb848034..eb7d36df23 100644 --- a/src/mod/endpoints/mod_portaudio/Makefile +++ b/src/mod/endpoints/mod_portaudio/Makefile @@ -1,19 +1,20 @@ -# define these targets in your makefile if you wish -# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean: BASE=../../../.. OSARCH=$(shell uname -s) -# and define these variables to impact your build MODNAME=mod_portaudio +BASE=../../../.. + +PALA=$(BASE)/libs/portaudio/lib/libportaudio.la LOCAL_CFLAGS=-I. -I$(BASE)/libs/portaudio/include -LOCAL_LDFLAGS=$(BASE)/libs/portaudio/lib/libportaudio.la +LOCAL_LDFLAGS= ifeq ($(OSARCH),Darwin) LOCAL_LDFLAGS += -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon endif +LOCAL_LIBADD=$(PALA) LOCAL_OBJS=pablio.o pa_ringbuffer.o -include ../../../../build/modmake.rules +include $(BASE)/build/modmake.rules -local_depend: +$(PALA): cd $(BASE)/libs/portaudio && $(MAKE) pa_ringbuffer.o: pa_ringbuffer.c diff --git a/src/mod/endpoints/mod_sofia/Makefile b/src/mod/endpoints/mod_sofia/Makefile index fd005d3c41..e1287495be 100644 --- a/src/mod/endpoints/mod_sofia/Makefile +++ b/src/mod/endpoints/mod_sofia/Makefile @@ -1,4 +1,7 @@ MODNAME=mod_sofia + +BASE=../../../.. + OS_ARCH := $(subst /,_,$(shell uname -s | sed /\ /s//_/)) LOCAL_CFLAGS = -I. -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/bnf -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/features @@ -11,7 +14,9 @@ LOCAL_CFLAGS += -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/soa -I$(BASE)/libs/sofi LOCAL_CFLAGS += -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/stun -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/su LOCAL_CFLAGS += -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/tport -I$(BASE)/libs/sofia-sip/libsofia-sip-ua/url -LOCAL_LDFLAGS=$(BASE)/libs/sofia-sip/libsofia-sip-ua/libsofia-sip-ua.la +SOFIALA=$(BASE)/libs/sofia-sip/libsofia-sip-ua/libsofia-sip-ua.la + +LOCAL_LDFLAGS=$(SOFIALA) ifeq ($(OS_ARCH),Darwin) LOCAL_LDFLAGS +=-framework CoreFoundation -framework SystemConfiguration @@ -19,5 +24,7 @@ endif include ../../../../build/modmake.rules -local_depend: +local_depend: $(SOFIALA) + +$(SOFIALA): cd $(BASE)/libs/sofia-sip && $(MAKE) diff --git a/src/mod/event_handlers/mod_xmpp_event/Makefile b/src/mod/event_handlers/mod_xmpp_event/Makefile index 038b301fa4..ff2e378efb 100644 --- a/src/mod/event_handlers/mod_xmpp_event/Makefile +++ b/src/mod/event_handlers/mod_xmpp_event/Makefile @@ -3,10 +3,16 @@ # and define these variables to impact your build MODNAME=mod_xmpp_event -LOCAL_CFLAGS=-I$(BASE)/libs/iksemel/include -LOCAL_LDFLAGS=$(BASE)/libs/iksemel/src/libiksemel.la -LOCAL_OBJS= -include ../../../../build/modmake.rules +BASE=../../../.. -local_depend: +IKSEMELLA=$(BASE)/libs/iksemel/src/libiksemel.la + +LOCAL_CFLAGS=-I$(BASE)/libs/iksemel/include +LOCAL_LDFLAGS=$(IKSEMELA) +LOCAL_OBJS= +include $(BASE)/build/modmake.rules + +local_depend: $(IKSEMELLA) + +$(IKSEMELLA): cd $(BASE)/libs/iksemel && $(MAKE) diff --git a/src/mod/formats/mod_sndfile/Makefile b/src/mod/formats/mod_sndfile/Makefile index 761963f3dc..6166f4de7e 100644 --- a/src/mod/formats/mod_sndfile/Makefile +++ b/src/mod/formats/mod_sndfile/Makefile @@ -2,11 +2,19 @@ # local_all local_depend local_clean depend_install local_install local_distclean local_extraclean: # and define these variables to impact your build -MONAME=mod_sndfile -LOCAL_CFLAGS=-I$(BASE)/libs/libsndfile/src -LOCAL_LDFLAGS=$(BASE)/libs/libsndfile/src/libsndfile.la -LOCAL_OBJS= -include ../../../../build/modmake.rules +MODNAME=mod_sndfile -local_depend: +BASE=../../../.. + +SNDFILELA=$(BASE)/libs/libsndfile/src/libsndfile.la + +LOCAL_CFLAGS=-I$(BASE)/libs/libsndfile/src +LOCAL_LDFLAGS=$(SNDFILELA) +LOCAL_OBJS= + +include $(BASE)/build/modmake.rules + +local_depend: $(SNDFILELA) + +$(SNDFILELA): cd $(BASE)/libs/libsndfile && $(MAKE) diff --git a/src/mod/xml_int/mod_xml_rpc/Makefile b/src/mod/xml_int/mod_xml_rpc/Makefile index a32bc53b81..93d59bc222 100644 --- a/src/mod/xml_int/mod_xml_rpc/Makefile +++ b/src/mod/xml_int/mod_xml_rpc/Makefile @@ -1,12 +1,17 @@ MODNAME=mod_xml_rpc -LOCAL_LDFLAGS = $(BASE)/libs/xmlrpc-c/src/libxmlrpc.la $(BASE)/libs/xmlrpc-c/src/libxmlrpc_server.la -LOCAL_LDFLAGS += $(BASE)/libs/xmlrpc-c/src/libxmlrpc_server_abyss.la $(BASE)/libs/xmlrpc-c/lib/abyss/src/libxmlrpc_abyss.la -LOCAL_LDFLAGS += $(BASE)/libs/xmlrpc-c/lib/expat/xmlparse/libxmlrpc_xmlparse.la +BASE=../../../.. +XMLRPCLAS = $(BASE)/libs/xmlrpc-c/src/libxmlrpc.la $(BASE)/libs/xmlrpc-c/src/libxmlrpc_server.la +XMLRPCLAS += $(BASE)/libs/xmlrpc-c/src/libxmlrpc_server_abyss.la $(BASE)/libs/xmlrpc-c/lib/abyss/src/libxmlrpc_abyss.la +XMLRPCLAS += $(BASE)/libs/xmlrpc-c/lib/expat/xmlparse/libxmlrpc_xmlparse.la + +LOCAL_LDFLAGS = $(XMLRPCLAS) LOCAL_CFLAGS=-I$(BASE)/libs/xmlrpc-c/include include ../../../../build/modmake.rules -local_depend: +local_depend: $(XMLRPCLAS) + +$(XMLRPCLAS): cd $(BASE)/libs/xmlrpc-c && $(MAKE)