forked from Mirrors/freeswitch
remove gmakeisms from the mod_cdr makefile
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4652 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
ce81898c5d
commit
9070ba0e14
|
@ -52,7 +52,7 @@ TOUCH_TARGET=if test -f "$@" ; then touch "$@" ; fi ;
|
||||||
MAKE_OPTS = `test -n "$(VERBOSE)" || echo -s`
|
MAKE_OPTS = `test -n "$(VERBOSE)" || echo -s`
|
||||||
RECURSE_MODNAME=`pwd | sed -e 's|^.*/||'`
|
RECURSE_MODNAME=`pwd | sed -e 's|^.*/||'`
|
||||||
RECURSE_SOURCEFILE=`if test -f $$modname.cpp; then echo $$modname.cpp; else echo $$modname.c; fi`
|
RECURSE_SOURCEFILE=`if test -f $$modname.cpp; then echo $$modname.cpp; else echo $$modname.c; fi`
|
||||||
RECURSE_OUR_DEPS=`test -z "$(WANT_CURL)" || if test ! -z "$(LIBCURL_DEPS)"; then echo $(CURLLA); fi`
|
RECURSE_OUR_DEPS=`test -z "$(WANT_CURL)" || if test ! -z "$(LIBCURL_DEPS)"; then echo $(CURLLA); fi `
|
||||||
RECURSE_OUR_CFLAGS=`test -z "$(WANT_CURL)" || echo $(LIBCURL_CPPFLAGS) ; $(LOCAL_INSERT_CFLAGS) `
|
RECURSE_OUR_CFLAGS=`test -z "$(WANT_CURL)" || echo $(LIBCURL_CPPFLAGS) ; $(LOCAL_INSERT_CFLAGS) `
|
||||||
RECURSE_OUR_LDFLAGS=`test -z "$(WANT_CURL)" || echo $(LIBCURL) ; $(LOCAL_INSERT_LDFLAGS) `
|
RECURSE_OUR_LDFLAGS=`test -z "$(WANT_CURL)" || echo $(LIBCURL) ; $(LOCAL_INSERT_LDFLAGS) `
|
||||||
RECURSE_MAKE=modname="$(RECURSE_MODNAME)" ; \
|
RECURSE_MAKE=modname="$(RECURSE_MODNAME)" ; \
|
||||||
|
@ -61,7 +61,9 @@ RECURSE_MAKE=modname="$(RECURSE_MODNAME)" ; \
|
||||||
ourdefs="$(RECURSE_OUR_DEPS)" ; \
|
ourdefs="$(RECURSE_OUR_DEPS)" ; \
|
||||||
ourcflags="$(RECURSE_OUR_CFLAGS)" ; \
|
ourcflags="$(RECURSE_OUR_CFLAGS)" ; \
|
||||||
ourldflags="$(RECURSE_OUR_LDFLAGS)" ; \
|
ourldflags="$(RECURSE_OUR_LDFLAGS)" ; \
|
||||||
$(MAKE) $(MAKE_OPTS) MODNAME="$$modname" SOURCEFILE="$$sourcefile" OUR_DEPS="$$ourdefs" OUR_CFLAGS="$$ourcflags" OUR_LDFLAGS="$$ourldflags"
|
insertobjs="`$(LOCAL_INSERT_OBJS)`" ; \
|
||||||
|
$(MAKE) $(MAKE_OPTS) MODNAME="$$modname" SOURCEFILE="$$sourcefile" \
|
||||||
|
OUR_DEPS="$$ourdefs" OUR_CFLAGS="$$ourcflags" OUR_LDFLAGS="$$ourldflags" OUR_OBJS="$$insertobjs"
|
||||||
|
|
||||||
all: Makefile
|
all: Makefile
|
||||||
@$(RECURSE_MAKE) all-modules || exit 1
|
@$(RECURSE_MAKE) all-modules || exit 1
|
||||||
|
@ -104,14 +106,14 @@ LINK_OUTPUT_REDIR=> .libs/$(MODNAME).log || error="yes" ; \
|
||||||
exit 1 ;\
|
exit 1 ;\
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$(MODNAME).$(DYNAMIC_LIB_EXTEN): $(LIBS) $(LOCAL_LIBADD) $(OUR_DEPS) $(LOCAL_OBJS) $(SOURCEFILE) $(MODNAME).o
|
$(MODNAME).$(DYNAMIC_LIB_EXTEN): $(LIBS) $(LOCAL_LIBADD) $(OUR_DEPS) $(LOCAL_OBJS) $(OUR_OBJS) $(SOURCEFILE) $(MODNAME).o
|
||||||
@echo Creating $@...
|
@echo Creating $@...
|
||||||
@test -d .libs || mkdir .libs
|
@test -d .libs || mkdir .libs
|
||||||
@error="";\
|
@error="";\
|
||||||
if test -f $(CSOURCEFILE); then \
|
if test -f $(CSOURCEFILE); then \
|
||||||
$(LINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) $(LOCAL_LIBADD) $(LINK_OUTPUT_REDIR) ;\
|
$(LINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) $(OUR_OBJS) $(LOCAL_LIBADD) $(LINK_OUTPUT_REDIR) ;\
|
||||||
else \
|
else \
|
||||||
$(CXXLINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) $(LOCAL_LIBADD) $(LINK_OUTPUT_REDIR) ;\
|
$(CXXLINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) $(OUR_OBJS) $(LOCAL_LIBADD) $(LINK_OUTPUT_REDIR) ;\
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
mod_clean:
|
mod_clean:
|
||||||
|
|
|
@ -10,10 +10,8 @@ LOCAL_OBJS=cdrcontainer.o basecdr.o baseregistry.o pddcdr.o csvcdr.o xmlcdr.o sq
|
||||||
#LOCAL_CFLAGS += -DSWITCH_QUEUE_ENHANCED
|
#LOCAL_CFLAGS += -DSWITCH_QUEUE_ENHANCED
|
||||||
#LOCAL_LDFLAGS += -lcurl
|
#LOCAL_LDFLAGS += -lcurl
|
||||||
|
|
||||||
ifneq ($(shell which mysql_config),)
|
LOCAL_INSERT_CFLAGS=mysql_config="\`which mysql-config 2>/dev/null \`"; if test -n "$$mysql_config"; then echo "\`mysql_config --include\`" ; fi
|
||||||
LOCAL_CFLAGS += $(shell mysql_config --include)
|
LOCAL_INSERT_LDFLAGS=mysql_config="\`which mysql-config 2>/dev/null \`"; if test -n "$$mysql_config"; then echo "\`mysql_config --libs\`" ; fi
|
||||||
LOCAL_LDFLAGS += $(shell mysql_config --libs)
|
LOCAL_INSERT_OBJS=mysql_config="\`which mysql-config 2>/dev/null \`"; if test -n "$$mysql_config"; then echo "mysqlcdr.o" ; fi
|
||||||
LOCAL_OBJS += mysqlcdr.o
|
|
||||||
endif
|
|
||||||
|
|
||||||
include ../../../../build/modmake.rules
|
include ../../../../build/modmake.rules
|
||||||
|
|
Loading…
Reference in New Issue