[asterisk-commits] rizzo: trunk r44081 - in /trunk: Makefile codecs/lpc10/Makefile main/Makefile

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Sep 30 09:37:22 MST 2006


Author: rizzo
Date: Sat Sep 30 11:37:21 2006
New Revision: 44081

URL: http://svn.digium.com/view/asterisk?rev=44081&view=rev
Log:
merge compile fixes from 44080:

- with AST_DEVMODE, building codecs/lpc10 fails because of lots
  of warnings, and the configure step in editline fails as well.
  Fix this by removing the -Werror in these steps.

- on FreeBSD (but probably on other platforms as well), the final   
  link of asterisk fails because AST_LIBS was not exported to the
  subdirs Makefiles. Add a proper fix in the top-level Makefile
  (a possible alternative way is to add "export AST_LIBS" near
  the beginning of the file).
  With this fix, i believe that some of the platform-specific
  conditionals in main/Makefile are redundant (because they should
  be already dealt with in the top level Makefile) but i don't
  have a platform to check.



Modified:
    trunk/Makefile
    trunk/codecs/lpc10/Makefile
    trunk/main/Makefile

Modified: trunk/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/Makefile?rev=44081&r1=44080&r2=44081&view=diff
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Sat Sep 30 11:37:21 2006
@@ -15,6 +15,7 @@
 #
 # ASTCFLAGS - compiler options
 # ASTLDFLAGS - linker flags (not libraries)
+# AST_LIBS - libraries to build binaries XXX
 # LIBS - additional libraries, at top-level for all links,
 #      on a single object just for that object
 # SOLINK - linker flags used only for creating shared objects (.so files),
@@ -302,7 +303,7 @@
 main: $(filter-out main,$(MOD_SUBDIRS))
 
 $(MOD_SUBDIRS):
-	@ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(MAKE) --no-print-directory -C $@ SUBDIR=$@ all
+	@ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" AST_LIBS="$(AST_LIBS)" $(MAKE) --no-print-directory -C $@ SUBDIR=$@ all
 
 $(OTHER_SUBDIRS):
 	@ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(MAKE) --no-print-directory -C $@ SUBDIR=$@ all

Modified: trunk/codecs/lpc10/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/codecs/lpc10/Makefile?rev=44081&r1=44080&r2=44081&view=diff
==============================================================================
--- trunk/codecs/lpc10/Makefile (original)
+++ trunk/codecs/lpc10/Makefile Sat Sep 30 11:37:21 2006
@@ -23,30 +23,34 @@
 
 CFLAGS+= -fPIC -Wno-comment
 
+# The code here generates lots of warnings, so compiling with -Werror
+# fails miserably. Remove it for the time being.
+ASTCFLAGS:= $(ASTCFLAGS:-Werror=)
+
 #fix for PPC processors and ALPHA, And UltraSparc too
 ifneq ($(OSARCH),Darwin)
-ifneq ($(findstring BSD,${OSARCH}),BSD)
-ifneq ($(PROC),ppc)
-ifneq ($(PROC),x86_64)
-ifneq ($(PROC),alpha)
+ ifneq ($(findstring BSD,${OSARCH}),BSD)
+  ifneq ($(PROC),ppc)
+   ifneq ($(PROC),x86_64)
+    ifneq ($(PROC),alpha)
 #The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
 #This works for even old (2.96) versions of gcc and provides a small boost either way.
 #A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn.t support it.
 #So we go lowest common available by gcc and go a step down, still a step up from
 #the default as we now have a better instruction set to work with. - Belgarath
-ifeq ($(PROC),ultrasparc)
+     ifeq ($(PROC),ultrasparc)
         CFLAGS+= -mtune=$(PROC) -mcpu=v8 -O3 -fomit-frame-pointer
-else
-ifneq ($(OSARCH),SunOS)
-ifneq  ($(OSARCH),arm)
+     else
+      ifneq ($(OSARCH),SunOS)
+       ifneq  ($(OSARCH),arm)
 #        CFLAGS+= -march=$(PROC)
-endif
-endif
-endif
-endif
-endif
-endif
-endif
+       endif
+      endif
+     endif
+    endif
+   endif
+  endif
+ endif
 endif
 
 LIB = $(LIB_TARGET_DIR)/liblpc10.a

Modified: trunk/main/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/main/Makefile?rev=44081&r1=44080&r2=44081&view=diff
==============================================================================
--- trunk/main/Makefile (original)
+++ trunk/main/Makefile Sat Sep 30 11:37:21 2006
@@ -93,7 +93,7 @@
 endif
 
 editline/libedit.a:
-	cd editline && test -f config.h || CFLAGS="$(ASTCFLAGS)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
+	cd editline && test -f config.h ||  CFLAGS="$(ASTCFLAGS:-Werror=)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
 	$(MAKE) -C editline libedit.a
 
 db1-ast/libdb1.a:



More information about the asterisk-commits mailing list