From 4720bef8e0a6a2e93435f75fe4d1a7870ddda282 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 12 Mar 2007 18:40:18 +0000 Subject: [PATCH] cleanup a bit git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4572 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- build/modmake.rules.in | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/build/modmake.rules.in b/build/modmake.rules.in index ec767c660e..4fdf74ce10 100644 --- a/build/modmake.rules.in +++ b/build/modmake.rules.in @@ -38,7 +38,7 @@ CXXLINK = $(LIBTOOL) --mode=link --tag=CXX $(CXXLD) $(ALL_CXXFLAGS) $(LDFLAGS) - CURDIR=$(shell pwd) CSOURCEFILE=$(CURDIR)/$(MODNAME).c CXXSOURCEFILE=$(CURDIR)/$(MODNAME).cpp -LINK_TYPE=$(shell if test -f $(CSOURCEFILE); then echo "clink"; else echo "cxxlink"; fi;) +#LINK_TYPE=$(shell if test -f $(CSOURCEFILE); then echo "clink"; else echo "cxxlink"; fi;) all: depend $(MODNAME).$(DYNAMIC_LIB_EXTEN) local_all depend: local_depend @@ -47,13 +47,16 @@ install: depend_install local_install mod_install distclean: clean local_distclean extraclean: distclean local_extraclean -$(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).o $(LOCAL_OBJS) depend $(LINK_TYPE) +$(MODNAME).o: depend -clink: $(MODNAME).o $(LOCAL_OBJS) - $(LINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) - -cxxlink: $(MODNAME).o $(LOCAL_OBJS) - $(CXXLINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) +$(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).o $(LOCAL_OBJS) + @if test -f $(CSOURCEFILE); then \ + echo $(LINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS); \ + $(LINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS); \ + else \ + echo $(CXXLINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS); \ + $(CXXLINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS); \ + fi; mod_clean: rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs @@ -86,5 +89,4 @@ local_all local_depend local_clean depend_install local_install local_distclean .PHONY: all depend clean local_all local_depend \ install depend_install local_install mod_install \ clean local_clean mod_clean distclean \ - local_distclean extraclean local_extraclean \ - clink cxxlink + local_distclean extraclean local_extraclean