diff --git a/Makefile.am b/Makefile.am index 26b4b9e186..0d420e09f4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,6 +12,7 @@ OSARCH=`uname -s` LIBTOOL=$(switch_builddir)/libtool LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL) +TOUCH_TARGET=if test -f "$@" ; then touch "$@" ; fi ; if CRASHPROT AM_CFLAGS += -DCRASH_PROT @@ -85,8 +86,6 @@ 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): $(CORE_LIBS) $(library_include_HEADERS) - MOD_LINK = $(BASE)/libfreeswitch.la CLEANFILES = src/include/switch_version.h @@ -144,16 +143,35 @@ nodepends: .nodepends yesdepends: rm .nodepends -$(CORE_LIBS): - cd libs/sqlite && $(MAKE) +libs/apr/libapr-1.la: libs/apr libs/apr/.update cd libs/apr && $(MAKE) - cd libs/apr-util && $(MAKE) - cd libs/pcre && $(MAKE) - cd libs/srtp && $(MAKE) - cd libs/libresample && $(MAKE) - cd libs/libteletone && $(MAKE) + $(TOUCH_TARGET) -core: $(CORE_LIBS) libfreeswitch.la +libs/apr-util/libaprutil-1.la: libs/apr-util libs/apr-util/.update + cd libs/apr-util && $(MAKE) + $(TOUCH_TARGET) + +libs/sqlite/libsqlite3.la: libs/sqlite libs/sqlite/.update + cd libs/sqlite && $(MAKE) + $(TOUCH_TARGET) + +libs/pcre/libpcre.la: libs/pcre libs/pcre/.update + cd libs/pcre && $(MAKE) + $(TOUCH_TARGET) + +libs/srtp/libsrtp.la: libs/srtp libs/srtp/.update + cd libs/srtp && $(MAKE) + $(TOUCH_TARGET) + +libs/libteletone/libteletone.la: libs/libteletone libs/libteletone/.update + cd libs/libteletone && $(MAKE) + $(TOUCH_TARGET) + +libs/libresample/libresample.la: libs/libresample libs/libresample/.update + cd libs/libresample && $(MAKE) + $(TOUCH_TARGET) + +core: libfreeswitch.la install_core: install-libLTLIBRARIES diff --git a/Makefile.in b/Makefile.in index 3399219d60..871fedd36c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -299,6 +299,7 @@ AM_LDFLAGS = $(SWITCH_AM_LDFLAGS) BASE = $(switch_srcdir) OSARCH = `uname -s` LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL) +TOUCH_TARGET = if test -f "$@" ; then touch "$@" ; fi ; libfreeswitch_la_SOURCES = \ src/switch_apr.c \ src/switch_buffer.c \ @@ -1085,8 +1086,6 @@ uninstall-info: uninstall-info-recursive uninstall-libLTLIBRARIES uninstall-library_includeHEADERS -$(libfreeswitch_la_SOURCES): $(CORE_LIBS) $(library_include_HEADERS) - install-data-local: @echo Installing $(NAME) @for x in conf mod db log log/xml_cdr bin scripts htdocs grammar ; do \ @@ -1133,16 +1132,35 @@ nodepends: .nodepends yesdepends: rm .nodepends -$(CORE_LIBS): - cd libs/sqlite && $(MAKE) +libs/apr/libapr-1.la: libs/apr libs/apr/.update cd libs/apr && $(MAKE) - cd libs/apr-util && $(MAKE) - cd libs/pcre && $(MAKE) - cd libs/srtp && $(MAKE) - cd libs/libresample && $(MAKE) - cd libs/libteletone && $(MAKE) + $(TOUCH_TARGET) -core: $(CORE_LIBS) libfreeswitch.la +libs/apr-util/libaprutil-1.la: libs/apr-util libs/apr-util/.update + cd libs/apr-util && $(MAKE) + $(TOUCH_TARGET) + +libs/sqlite/libsqlite3.la: libs/sqlite libs/sqlite/.update + cd libs/sqlite && $(MAKE) + $(TOUCH_TARGET) + +libs/pcre/libpcre.la: libs/pcre libs/pcre/.update + cd libs/pcre && $(MAKE) + $(TOUCH_TARGET) + +libs/srtp/libsrtp.la: libs/srtp libs/srtp/.update + cd libs/srtp && $(MAKE) + $(TOUCH_TARGET) + +libs/libteletone/libteletone.la: libs/libteletone libs/libteletone/.update + cd libs/libteletone && $(MAKE) + $(TOUCH_TARGET) + +libs/libresample/libresample.la: libs/libresample libs/libresample/.update + cd libs/libresample && $(MAKE) + $(TOUCH_TARGET) + +core: libfreeswitch.la install_core: install-libLTLIBRARIES