[asterisk-addons-commits] kpfleming: branch 1.4 r472 - in /branches/1.4: ./ build_tools/

SVN commits to the Asterisk addons project asterisk-addons-commits at lists.digium.com
Fri Oct 19 09:41:28 CDT 2007


Author: kpfleming
Date: Fri Oct 19 09:41:27 2007
New Revision: 472

URL: http://svn.digium.com/view/asterisk-addons?view=rev&rev=472
Log:
use more of the standard Asterisk build system here...

Added:
    branches/1.4/Makefile.rules
      - copied, changed from r471, trunk/Makefile.rules
Removed:
    branches/1.4/build_tools/mkdep
Modified:
    branches/1.4/Makefile

Modified: branches/1.4/Makefile
URL: http://svn.digium.com/view/asterisk-addons/branches/1.4/Makefile?view=diff&rev=472&r1=471&r2=472
==============================================================================
--- branches/1.4/Makefile (original)
+++ branches/1.4/Makefile Fri Oct 19 09:41:27 2007
@@ -11,12 +11,18 @@
 
 .EXPORT_ALL_VARIABLES:
 
-.PHONY: all install depend samples clean update distclean dist-clean menuselect chan_ooh323.so format_mp3.so
+.PHONY: all install samples clean update distclean menuselect chan_ooh323.so format_mp3.so
 
 # Overwite config files on "make samples"
 OVERWRITE:=y
 
-CFLAGS+=-fPIC
+ASTCFLAGS+=-fPIC
+
+#NOISY_BUILD=yes
+
+ifeq ($(AST_DEVMODE),yes)
+  ASTCFLAGS+=-Werror -Wunused -Wundef $(AST_DECLARATION_AFTER_STATEMENT)
+endif
 
 # If the file .asteriskaddons.makeopts is present in your home directory, you can
 # include all of your favorite menuselect options so that every time you download
@@ -74,10 +80,10 @@
 all: config.status menuselect.makeopts 
 	@$(MAKE) _all
 
-_all: depend $(SELECTED_MODS)
+_all: $(SELECTED_MODS)
 
 config.status: configure
-	@CFLAGS="" ./configure
+	@./configure
 	@echo "****"
 	@echo "**** The configure script was just executed, so 'make' needs to be"
 	@echo "**** restarted."
@@ -102,8 +108,6 @@
 	@echo " +               $(MAKE) samples                    +"
 	@echo " +-----------------------------------------------+"
 
-dist-clean: distclean
-
 distclean: clean
 	@$(MAKE) -C menuselect distclean
 	@if [ -f asterisk-ooh323c/Makefile ] ; then \
@@ -122,17 +126,11 @@
 		$(MAKE) -C asterisk-ooh323c clean ; \
 	fi
 
-%.o: %.c
-	$(CC) -g -c $(CFLAGS) -o $@ $<
-
-%.so : %.o
-	$(CC) $(SOLINK) -o $@ $<
-
-ifneq ($(wildcard .depend),)
-include .depend
+ifneq ($(wildcard .*.d),)
+   include .*.d
 endif
 
-CFLAGS+=$(ASTERISK_INCLUDE)
+ASTCFLAGS+=$(ASTERISK_INCLUDE)
 
 cdr_addon_mysql.so: cdr_addon_mysql.o
 	$(CC) $(SOLINK) -o $@ $< $(MYSQLCLIENT_LIB)
@@ -150,12 +148,7 @@
 	@$(MAKE) -C asterisk-ooh323c
 
 format_mp3.so:
-	@INCLUDE="$(CFLAGS)" $(MAKE) -C format_mp3 all CC="$(CC)"
-
-depend: .depend
-
-.depend:
-	build_tools/mkdep $(CFLAGS) $(filter-out format_mp3.c chan_ooh323.c,$(SELECTED_MODS:%.so=%.c))
+	@INCLUDE="$(ASTCFLAGS)" $(MAKE) -C format_mp3 all CC="$(CC)"
 
 samples: 
 	mkdir -p $(DESTDIR)$(ASTETCDIR)
@@ -192,4 +185,6 @@
 	- at menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
 
 menuselect/menuselect: menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h config.status
-	@CFLAGS="" $(MAKE) -C menuselect
+	@$(MAKE) -C menuselect
+
+include Makefile.rules

Copied: branches/1.4/Makefile.rules (from r471, trunk/Makefile.rules)
URL: http://svn.digium.com/view/asterisk-addons/branches/1.4/Makefile.rules?view=diff&rev=472&p1=trunk/Makefile.rules&r1=471&p2=branches/1.4/Makefile.rules&r2=472
==============================================================================
--- trunk/Makefile.rules (original)
+++ branches/1.4/Makefile.rules Fri Oct 19 09:41:27 2007
@@ -40,43 +40,23 @@
 
 %.o: %.c
 	$(ECHO_PREFIX) echo "   [CC] $< -> $@"
-ifeq ($(AST_DEVMODE),yes)
 	$(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS) -MMD -MT $@ -MF .$(subst /,_,$@).d -MP
-else
-	$(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS)
-endif
 
 %.o: %.i
 	$(ECHO_PREFIX) echo "   [CC] $< -> $@"
-ifeq ($(AST_DEVMODE),yes)
 	$(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS) -MMD -MT $@ -MF .$(subst /,_,$@).d -MP
-else
-	$(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS)
-endif
 
 %.i: %.c
 	$(ECHO_PREFIX) echo "   [CC] $< -> $@"
-ifeq ($(AST_DEVMODE),yes)
 	$(CMD_PREFIX) $(CC) -o $@ -E $< $(PTHREAD_CFLAGS) $(ASTCFLAGS) -MMD -MT $@ -MF .$(subst /,_,$@).d -MP
-else
-	$(CMD_PREFIX) $(CC) -o $@ -E $< $(PTHREAD_CFLAGS) $(ASTCFLAGS)
-endif
 
 %.o: %.s
 	$(ECHO_PREFIX) echo "   [AS] $< -> $@"
-ifeq ($(AST_DEVMODE),yes)
 	$(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS) -MMD -MT $@ -MF .$(subst /,_,$@).d -MP
-else
-	$(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS)
-endif
 
 %.oo: %.cc
 	$(ECHO_PREFIX) echo "   [CXX] $< -> $@"
-ifeq ($(AST_DEVMODE),yes)
 	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations,$(ASTCFLAGS)) -MMD -MT $@ -MF .$(subst /,_,$@).d -MP
-else
-	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations,$(ASTCFLAGS))
-endif
 
 %.c: %.y
 	$(ECHO_PREFIX) echo "   [BISON] $< -> $@"




More information about the asterisk-addons-commits mailing list