[asterisk-commits] trunk r35854 - /trunk/Makefile.rules
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Jun 24 16:26:19 MST 2006
Author: kpfleming
Date: Sat Jun 24 18:26:19 2006
New Revision: 35854
URL: http://svn.digium.com/view/asterisk?rev=35854&view=rev
Log:
commit missing file
Added:
trunk/Makefile.rules (with props)
Added: trunk/Makefile.rules
URL: http://svn.digium.com/view/asterisk/trunk/Makefile.rules?rev=35854&view=auto
==============================================================================
--- trunk/Makefile.rules (added)
+++ trunk/Makefile.rules Sat Jun 24 18:26:19 2006
@@ -1,0 +1,53 @@
+#
+# Asterisk -- A telephony toolkit for Linux.
+#
+# Makefile rules
+#
+# Copyright (C) 2006, Digium, Inc.
+#
+# Kevin P. Fleming <kpfleming at digium.com>
+#
+# This program is free software, distributed under the terms of
+# the GNU General Public License
+#
+
+define module_o_template
+$(1).o: $(1).c
+ $$(CC) -c -o $$@ $$< $$(CFLAGS) $$(MENUSELECT_OPTS_$(1):%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_INCLUDE))
+endef
+
+define module_so_template
+$(1).so: $(1).o
+ $$(CC) $$(SOLINK) -o $$@ $$^ $(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_LIB))
+endef
+
+%.o: %.c
+ $(CC) -c -o $@ $< $(CFLAGS)
+
+$(foreach mod,$(SELECTED_MODS),$(eval $(call module_o_template,$(mod))))
+
+$(foreach mod,$(SELECTED_MODS),$(eval $(call module_so_template,$(mod))))
+
+.PHONY: clean clean-depend depend uninstall _all
+
+_all: $(SELECTED_MODS:%=%.so)
+
+clean-depend::
+ rm -f .depend
+
+clean:: clean-depend
+ rm -f *.so *.o
+
+install:: all
+ for x in $(SELECTED_MODS:%=%.so); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
+
+uninstall::
+
+ifneq ($(wildcard .depend),)
+ include .depend
+endif
+
+depend: .depend
+
+.depend:
+ ../build_tools/mkdep $(CFLAGS) `ls *.c`
Propchange: trunk/Makefile.rules
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/Makefile.rules
------------------------------------------------------------------------------
svn:keywords = Author Id Date Revision
Propchange: trunk/Makefile.rules
------------------------------------------------------------------------------
svn:mime-type = text/plain
More information about the asterisk-commits
mailing list