switch mod_sofia to use a Makefile.am instead of Makefile for better dependency tracking.. you may need to re-bootstrap after this update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5120 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
4dab016887
commit
33d3c1c2d2
|
@ -332,6 +332,7 @@ AC_CONFIG_FILES([Makefile
|
|||
src/Makefile
|
||||
src/mod/Makefile
|
||||
src/mod/event_handlers/mod_cdr/Makefile
|
||||
src/mod/endpoints/mod_sofia/Makefile
|
||||
src/include/switch_am_config.h
|
||||
build/getlib.sh
|
||||
build/modmake.rules])
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
#define FREESWITCH_OID_PREFIX ".1.3.6.1.4.1." FREESWITCH_PEN
|
||||
#define FREESWITCH_ITAD "543"
|
||||
#define __EXTENSIONS__ 1
|
||||
#define _XOPEN_SOURCE 600
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
BASE=../../../..
|
||||
|
||||
SOFIA_DIR=$(BASE)/libs/sofia-sip
|
||||
SOFIAUA_DIR=$(SOFIA_DIR)/libsofia-sip-ua
|
||||
|
||||
LOCAL_CFLAGS = -I. -I$(SOFIAUA_DIR)/bnf -I$(SOFIAUA_DIR)/features
|
||||
LOCAL_CFLAGS += -I$(SOFIAUA_DIR)/http -I$(SOFIAUA_DIR)/ipt
|
||||
LOCAL_CFLAGS += -I$(SOFIAUA_DIR)/iptsec -I$(SOFIAUA_DIR)/msg
|
||||
LOCAL_CFLAGS += -I$(SOFIAUA_DIR)/nea -I$(SOFIAUA_DIR)/nta
|
||||
LOCAL_CFLAGS += -I$(SOFIAUA_DIR)/nth -I$(SOFIAUA_DIR)/nua
|
||||
LOCAL_CFLAGS += -I$(SOFIAUA_DIR)/sdp -I$(SOFIAUA_DIR)/sip
|
||||
LOCAL_CFLAGS += -I$(SOFIAUA_DIR)/soa -I$(SOFIAUA_DIR)/sresolv
|
||||
LOCAL_CFLAGS += -I$(SOFIAUA_DIR)/stun -I$(SOFIAUA_DIR)/su
|
||||
LOCAL_CFLAGS += -I$(SOFIAUA_DIR)/tport -I$(SOFIAUA_DIR)/url
|
||||
LOCAL_CFLAGS += `if test -f $(BASE)/.libs/libfreeswitch_la-switch_odbc.o ; then echo -DSWITCH_HAVE_ODBC; fi ;`
|
||||
|
||||
LOCAL_OBJS=sofia.o sofia_glue.o sofia_presence.o sofia_reg.o
|
||||
LOCAL_SOURCES=sofia.c sofia_glue.c sofia_presense.c sofia_reg.c mod_sofia.c mod_sofia.h
|
||||
|
||||
SOFIALA=$(SOFIAUA_DIR)/libsofia-sip-ua.la
|
||||
|
||||
LOCAL_LIBADD=$(SOFIALA)
|
||||
|
||||
LOCAL_INSERT_LDFLAGS=if test $$osarch = "Darwin" ; then echo "-framework CoreFoundation -framework SystemConfiguration" ; fi ;
|
||||
|
||||
include $(BASE)/build/modmake.rules
|
||||
|
||||
$(SOFIALA): $(SOFIA_DIR) $(SOFIA_DIR)/.update
|
||||
cd $(SOFIA_DIR) && $(MAKE)
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
local_depend: $(SOFIALA)
|
||||
|
||||
../../../../libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h: $(SOFIALA)
|
||||
|
||||
$(LOCAL_OBJS) $(LOCAL_SOURCES): ../../../../libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h
|
|
@ -0,0 +1,62 @@
|
|||
AM_CFLAGS = $(SWITCH_AM_CFLAGS)
|
||||
AM_CPPFLAGS = $(SWITCH_AM_CXXFLAGS)
|
||||
AM_LDFLAGS = $(SWITCH_AM_LDFLAGS)
|
||||
#we should set all these vars from configure, no reason to have these in each Makefile.am
|
||||
LIBTOOL = echo "`link=\`echo $@|grep .la;echo $@|grep .so;echo $@|grep .dll\`;if test -n "$$link"; then echo Creating $@;fi`";`if test -z "$(VERBOSE)" ; \
|
||||
then echo $(SHELL) $(switch_builddir)/quiet_libtool ;else echo $(SHELL) $(switch_builddir)/libtool; fi`
|
||||
AM_MAKEFLAGS=`test -n "$(VERBOSE)" || echo -s`
|
||||
# Dirty trick to override the link output
|
||||
LIBS+=> $(MODNAME).log || error="yes";if test -n "$(VERBOSE)" -o "$$error" = "yes";then cat $(MODNAME).log;fi;if test "$$error" = "yes";then exit 1;fi
|
||||
|
||||
moddir=$(prefix)/mod
|
||||
|
||||
MODNAME=mod_sofia
|
||||
|
||||
BASE=../../../..
|
||||
|
||||
SOFIA_DIR=$(BASE)/libs/sofia-sip
|
||||
SOFIAUA_DIR=$(SOFIA_DIR)/libsofia-sip-ua
|
||||
SOFIALA=$(SOFIAUA_DIR)/libsofia-sip-ua.la
|
||||
|
||||
mod_LTLIBRARIES = mod_sofia.la
|
||||
mod_sofia_la_SOURCES = mod_sofia.c sofia.c sofia_glue.c sofia_presence.c sofia_reg.c mod_sofia.h
|
||||
mod_sofia_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_sofia_la_CFLAGS += -I. -I$(SOFIAUA_DIR)/bnf -I$(SOFIAUA_DIR)/features
|
||||
mod_sofia_la_CFLAGS += -I$(SOFIAUA_DIR)/http -I$(SOFIAUA_DIR)/ipt
|
||||
mod_sofia_la_CFLAGS += -I$(SOFIAUA_DIR)/iptsec -I$(SOFIAUA_DIR)/msg
|
||||
mod_sofia_la_CFLAGS += -I$(SOFIAUA_DIR)/nea -I$(SOFIAUA_DIR)/nta
|
||||
mod_sofia_la_CFLAGS += -I$(SOFIAUA_DIR)/nth -I$(SOFIAUA_DIR)/nua
|
||||
mod_sofia_la_CFLAGS += -I$(SOFIAUA_DIR)/sdp -I$(SOFIAUA_DIR)/sip
|
||||
mod_sofia_la_CFLAGS += -I$(SOFIAUA_DIR)/soa -I$(SOFIAUA_DIR)/sresolv
|
||||
mod_sofia_la_CFLAGS += -I$(SOFIAUA_DIR)/stun -I$(SOFIAUA_DIR)/su
|
||||
mod_sofia_la_CFLAGS += -I$(SOFIAUA_DIR)/tport -I$(SOFIAUA_DIR)/url
|
||||
mod_sofia_la_LIBADD = $(SOFIALA) $(switch_builddir)/libfreeswitch.la
|
||||
mod_sofia_la_LDFLAGS = -module -avoid-version -no-undefined
|
||||
|
||||
if ADD_ODBC
|
||||
mod_sofia_la_CFLAGS += -DSWITCH_HAVE_ODBC
|
||||
endif
|
||||
|
||||
if ISMAC
|
||||
mod_sofia_la_LDFLAGS += -framework CoreFoundation -framework SystemConfiguration
|
||||
endif
|
||||
|
||||
BUILT_SOURCES = $(SOFIALA)
|
||||
|
||||
$(mod_sofia_la_SOURCES) : $(BUILT_SOURCES)
|
||||
|
||||
$(SOFIALA): $(SOFIA_DIR) $(SOFIA_DIR)/.update
|
||||
cd $(SOFIA_DIR) && $(MAKE)
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
../../../../libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h: $(SOFIALA)
|
||||
|
||||
install-data-am: $(DESTDIR)$(PREFIX)/$(moddir)/$(MODNAME).$(DYNAMIC_LIB_EXTEN)
|
||||
|
||||
$(DESTDIR)$(PREFIX)/$(moddir)/$(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).la
|
||||
@echo installing $(MODNAME).$(DYNAMIC_LIB_EXTEN)
|
||||
@if [ -f .libs/$(MODNAME).$(DYNAMIC_LIB_EXTEN) ] ; then \
|
||||
$(LIBTOOL) --mode=install $(INSTALL) .libs/$(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/$(moddir) >/dev/null ; \
|
||||
else \
|
||||
$(LIBTOOL) --mode=install $(INSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/$(moddir) >/dev/null ; \
|
||||
fi
|
Loading…
Reference in New Issue