freeswitch/src/mod/Makefile.am

56 lines
2.2 KiB
Makefile
Raw Normal View History

CONF_MODULES=$(shell grep -v "\#" $(switch_builddir)/modules.conf)
FOUND_MODULES=$(shell find . -type d -name mod_\*)
OUR_MODULES=`if test -z $(MODULES) ; then echo $(CONF_MODULES) ; else echo $(MODULES) ; fi ;`
OUR_CLEAN_MODULES=`if test -z $(MODULES) ; then echo $(CONF_MODULES) $(FOUND_MODULES) ; else echo $(MODULES) ; fi ;`
MOD_NAME=`echo $$i | sed -e 's|^.*/||'`
MOD_DIR=`if test -d $(switch_srcdir)/src/mod/$$i ; then echo $(switch_srcdir)/src/mod/$$i ; else echo $$i ; fi;`
move module make to it's own makefile remove need for modmake.sh (its use is now fully adressed within src/mod/Makefile.am) remove need for generic_mod.mk (it uses the generated build/modmake.rules now instead) add support for building out of tree modules as part of the freeswitch build simply by adding the full path to the module dir to your modules.conf remove the need for special tragets to build. make will now do a make through the core AND all the modules. make install will now install the core and all the modules. most or all of the old targets are still there, plus the new target "core" that will do more or less what make used to do. make should now be able to be done without write permissions to the prefix directory (make install of course will still need them) whith the exception of modules that use buildlib.sh to download and install thier dependencies. This will be fixed in a future revision. checkversion.sh no longer will clean the modules on a change. The need for this should be gone with the correct include paths to have the src directory included first. Some steps in this commit to move us closer to being able to build with non gnu make (gmake). Still some more work to do in this regard as well. buildlib.sh no longer exports CFLAGS, just passes them to the confiure. Move a little closer to supporting install directories in the "automake way" where all the dirs will be acutally determined in configure, and follow the standard install targets in Makefile.am no longer build the modules twice on make install Additional fixes still on the way for proper dependency tracking for the module builds, so they don't build every time. any input on how to reach some of the goals stated above of supporting non gnu make, and more properly handling the install directories is appretiated. Drop me an e-mail if you are intersted in helping. Mike git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4577 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-13 02:26:00 +00:00
all:
@if [ ! -f $(switch_builddir)/modules.conf ] ; then cp $(switch_builddir)/modules.conf.in $(switch_builddir)/modules.conf ; fi
@echo making modules
@for i in $(OUR_MODULES) ; do \
move module make to it's own makefile remove need for modmake.sh (its use is now fully adressed within src/mod/Makefile.am) remove need for generic_mod.mk (it uses the generated build/modmake.rules now instead) add support for building out of tree modules as part of the freeswitch build simply by adding the full path to the module dir to your modules.conf remove the need for special tragets to build. make will now do a make through the core AND all the modules. make install will now install the core and all the modules. most or all of the old targets are still there, plus the new target "core" that will do more or less what make used to do. make should now be able to be done without write permissions to the prefix directory (make install of course will still need them) whith the exception of modules that use buildlib.sh to download and install thier dependencies. This will be fixed in a future revision. checkversion.sh no longer will clean the modules on a change. The need for this should be gone with the correct include paths to have the src directory included first. Some steps in this commit to move us closer to being able to build with non gnu make (gmake). Still some more work to do in this regard as well. buildlib.sh no longer exports CFLAGS, just passes them to the confiure. Move a little closer to supporting install directories in the "automake way" where all the dirs will be acutally determined in configure, and follow the standard install targets in Makefile.am no longer build the modules twice on make install Additional fixes still on the way for proper dependency tracking for the module builds, so they don't build every time. any input on how to reach some of the goals stated above of supporting non gnu make, and more properly handling the install directories is appretiated. Drop me an e-mail if you are intersted in helping. Mike git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4577 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-13 02:26:00 +00:00
echo making $$i ; \
moddir=$(MOD_DIR); \
echo $(MOD_NAME); \
move module make to it's own makefile remove need for modmake.sh (its use is now fully adressed within src/mod/Makefile.am) remove need for generic_mod.mk (it uses the generated build/modmake.rules now instead) add support for building out of tree modules as part of the freeswitch build simply by adding the full path to the module dir to your modules.conf remove the need for special tragets to build. make will now do a make through the core AND all the modules. make install will now install the core and all the modules. most or all of the old targets are still there, plus the new target "core" that will do more or less what make used to do. make should now be able to be done without write permissions to the prefix directory (make install of course will still need them) whith the exception of modules that use buildlib.sh to download and install thier dependencies. This will be fixed in a future revision. checkversion.sh no longer will clean the modules on a change. The need for this should be gone with the correct include paths to have the src directory included first. Some steps in this commit to move us closer to being able to build with non gnu make (gmake). Still some more work to do in this regard as well. buildlib.sh no longer exports CFLAGS, just passes them to the confiure. Move a little closer to supporting install directories in the "automake way" where all the dirs will be acutally determined in configure, and follow the standard install targets in Makefile.am no longer build the modules twice on make install Additional fixes still on the way for proper dependency tracking for the module builds, so they don't build every time. any input on how to reach some of the goals stated above of supporting non gnu make, and more properly handling the install directories is appretiated. Drop me an e-mail if you are intersted in helping. Mike git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4577 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-13 02:26:00 +00:00
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 ; \
move module make to it's own makefile remove need for modmake.sh (its use is now fully adressed within src/mod/Makefile.am) remove need for generic_mod.mk (it uses the generated build/modmake.rules now instead) add support for building out of tree modules as part of the freeswitch build simply by adding the full path to the module dir to your modules.conf remove the need for special tragets to build. make will now do a make through the core AND all the modules. make install will now install the core and all the modules. most or all of the old targets are still there, plus the new target "core" that will do more or less what make used to do. make should now be able to be done without write permissions to the prefix directory (make install of course will still need them) whith the exception of modules that use buildlib.sh to download and install thier dependencies. This will be fixed in a future revision. checkversion.sh no longer will clean the modules on a change. The need for this should be gone with the correct include paths to have the src directory included first. Some steps in this commit to move us closer to being able to build with non gnu make (gmake). Still some more work to do in this regard as well. buildlib.sh no longer exports CFLAGS, just passes them to the confiure. Move a little closer to supporting install directories in the "automake way" where all the dirs will be acutally determined in configure, and follow the standard install targets in Makefile.am no longer build the modules twice on make install Additional fixes still on the way for proper dependency tracking for the module builds, so they don't build every time. any input on how to reach some of the goals stated above of supporting non gnu make, and more properly handling the install directories is appretiated. Drop me an e-mail if you are intersted in helping. Mike git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4577 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-13 02:26:00 +00:00
fi; \
done
clean:
@for i in $(OUR_CLEAN_MODULES) ; do \
move module make to it's own makefile remove need for modmake.sh (its use is now fully adressed within src/mod/Makefile.am) remove need for generic_mod.mk (it uses the generated build/modmake.rules now instead) add support for building out of tree modules as part of the freeswitch build simply by adding the full path to the module dir to your modules.conf remove the need for special tragets to build. make will now do a make through the core AND all the modules. make install will now install the core and all the modules. most or all of the old targets are still there, plus the new target "core" that will do more or less what make used to do. make should now be able to be done without write permissions to the prefix directory (make install of course will still need them) whith the exception of modules that use buildlib.sh to download and install thier dependencies. This will be fixed in a future revision. checkversion.sh no longer will clean the modules on a change. The need for this should be gone with the correct include paths to have the src directory included first. Some steps in this commit to move us closer to being able to build with non gnu make (gmake). Still some more work to do in this regard as well. buildlib.sh no longer exports CFLAGS, just passes them to the confiure. Move a little closer to supporting install directories in the "automake way" where all the dirs will be acutally determined in configure, and follow the standard install targets in Makefile.am no longer build the modules twice on make install Additional fixes still on the way for proper dependency tracking for the module builds, so they don't build every time. any input on how to reach some of the goals stated above of supporting non gnu make, and more properly handling the install directories is appretiated. Drop me an e-mail if you are intersted in helping. Mike git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4577 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-13 02:26:00 +00:00
echo making clean $$i ; \
moddir=$(MOD_DIR); \
move module make to it's own makefile remove need for modmake.sh (its use is now fully adressed within src/mod/Makefile.am) remove need for generic_mod.mk (it uses the generated build/modmake.rules now instead) add support for building out of tree modules as part of the freeswitch build simply by adding the full path to the module dir to your modules.conf remove the need for special tragets to build. make will now do a make through the core AND all the modules. make install will now install the core and all the modules. most or all of the old targets are still there, plus the new target "core" that will do more or less what make used to do. make should now be able to be done without write permissions to the prefix directory (make install of course will still need them) whith the exception of modules that use buildlib.sh to download and install thier dependencies. This will be fixed in a future revision. checkversion.sh no longer will clean the modules on a change. The need for this should be gone with the correct include paths to have the src directory included first. Some steps in this commit to move us closer to being able to build with non gnu make (gmake). Still some more work to do in this regard as well. buildlib.sh no longer exports CFLAGS, just passes them to the confiure. Move a little closer to supporting install directories in the "automake way" where all the dirs will be acutally determined in configure, and follow the standard install targets in Makefile.am no longer build the modules twice on make install Additional fixes still on the way for proper dependency tracking for the module builds, so they don't build every time. any input on how to reach some of the goals stated above of supporting non gnu make, and more properly handling the install directories is appretiated. Drop me an e-mail if you are intersted in helping. Mike git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4577 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-13 02:26:00 +00:00
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 ; \
move module make to it's own makefile remove need for modmake.sh (its use is now fully adressed within src/mod/Makefile.am) remove need for generic_mod.mk (it uses the generated build/modmake.rules now instead) add support for building out of tree modules as part of the freeswitch build simply by adding the full path to the module dir to your modules.conf remove the need for special tragets to build. make will now do a make through the core AND all the modules. make install will now install the core and all the modules. most or all of the old targets are still there, plus the new target "core" that will do more or less what make used to do. make should now be able to be done without write permissions to the prefix directory (make install of course will still need them) whith the exception of modules that use buildlib.sh to download and install thier dependencies. This will be fixed in a future revision. checkversion.sh no longer will clean the modules on a change. The need for this should be gone with the correct include paths to have the src directory included first. Some steps in this commit to move us closer to being able to build with non gnu make (gmake). Still some more work to do in this regard as well. buildlib.sh no longer exports CFLAGS, just passes them to the confiure. Move a little closer to supporting install directories in the "automake way" where all the dirs will be acutally determined in configure, and follow the standard install targets in Makefile.am no longer build the modules twice on make install Additional fixes still on the way for proper dependency tracking for the module builds, so they don't build every time. any input on how to reach some of the goals stated above of supporting non gnu make, and more properly handling the install directories is appretiated. Drop me an e-mail if you are intersted in helping. Mike git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4577 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-13 02:26:00 +00:00
fi; \
done
install:
@echo Installing Modules
@for i in $(OUR_MODULES) ; do \
move module make to it's own makefile remove need for modmake.sh (its use is now fully adressed within src/mod/Makefile.am) remove need for generic_mod.mk (it uses the generated build/modmake.rules now instead) add support for building out of tree modules as part of the freeswitch build simply by adding the full path to the module dir to your modules.conf remove the need for special tragets to build. make will now do a make through the core AND all the modules. make install will now install the core and all the modules. most or all of the old targets are still there, plus the new target "core" that will do more or less what make used to do. make should now be able to be done without write permissions to the prefix directory (make install of course will still need them) whith the exception of modules that use buildlib.sh to download and install thier dependencies. This will be fixed in a future revision. checkversion.sh no longer will clean the modules on a change. The need for this should be gone with the correct include paths to have the src directory included first. Some steps in this commit to move us closer to being able to build with non gnu make (gmake). Still some more work to do in this regard as well. buildlib.sh no longer exports CFLAGS, just passes them to the confiure. Move a little closer to supporting install directories in the "automake way" where all the dirs will be acutally determined in configure, and follow the standard install targets in Makefile.am no longer build the modules twice on make install Additional fixes still on the way for proper dependency tracking for the module builds, so they don't build every time. any input on how to reach some of the goals stated above of supporting non gnu make, and more properly handling the install directories is appretiated. Drop me an e-mail if you are intersted in helping. Mike git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4577 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-13 02:26:00 +00:00
echo making install $$i ; \
moddir=$(MOD_DIR); \
move module make to it's own makefile remove need for modmake.sh (its use is now fully adressed within src/mod/Makefile.am) remove need for generic_mod.mk (it uses the generated build/modmake.rules now instead) add support for building out of tree modules as part of the freeswitch build simply by adding the full path to the module dir to your modules.conf remove the need for special tragets to build. make will now do a make through the core AND all the modules. make install will now install the core and all the modules. most or all of the old targets are still there, plus the new target "core" that will do more or less what make used to do. make should now be able to be done without write permissions to the prefix directory (make install of course will still need them) whith the exception of modules that use buildlib.sh to download and install thier dependencies. This will be fixed in a future revision. checkversion.sh no longer will clean the modules on a change. The need for this should be gone with the correct include paths to have the src directory included first. Some steps in this commit to move us closer to being able to build with non gnu make (gmake). Still some more work to do in this regard as well. buildlib.sh no longer exports CFLAGS, just passes them to the confiure. Move a little closer to supporting install directories in the "automake way" where all the dirs will be acutally determined in configure, and follow the standard install targets in Makefile.am no longer build the modules twice on make install Additional fixes still on the way for proper dependency tracking for the module builds, so they don't build every time. any input on how to reach some of the goals stated above of supporting non gnu make, and more properly handling the install directories is appretiated. Drop me an e-mail if you are intersted in helping. Mike git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4577 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-13 02:26:00 +00:00
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 ; \
fi; \
done
@echo done
uninstall:
@echo Uninstalling Modules
@for i in $(OUR_MODULES) ; do \
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 ; \
move module make to it's own makefile remove need for modmake.sh (its use is now fully adressed within src/mod/Makefile.am) remove need for generic_mod.mk (it uses the generated build/modmake.rules now instead) add support for building out of tree modules as part of the freeswitch build simply by adding the full path to the module dir to your modules.conf remove the need for special tragets to build. make will now do a make through the core AND all the modules. make install will now install the core and all the modules. most or all of the old targets are still there, plus the new target "core" that will do more or less what make used to do. make should now be able to be done without write permissions to the prefix directory (make install of course will still need them) whith the exception of modules that use buildlib.sh to download and install thier dependencies. This will be fixed in a future revision. checkversion.sh no longer will clean the modules on a change. The need for this should be gone with the correct include paths to have the src directory included first. Some steps in this commit to move us closer to being able to build with non gnu make (gmake). Still some more work to do in this regard as well. buildlib.sh no longer exports CFLAGS, just passes them to the confiure. Move a little closer to supporting install directories in the "automake way" where all the dirs will be acutally determined in configure, and follow the standard install targets in Makefile.am no longer build the modules twice on make install Additional fixes still on the way for proper dependency tracking for the module builds, so they don't build every time. any input on how to reach some of the goals stated above of supporting non gnu make, and more properly handling the install directories is appretiated. Drop me an e-mail if you are intersted in helping. Mike git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4577 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-13 02:26:00 +00:00
fi; \
done
@echo done