[asterisk-commits] trunk r37661 - in /trunk: ./ apps/ cdr/
channels/ codecs/ formats/ funcs/ pbx...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Jul 15 12:59:36 MST 2006
Author: kpfleming
Date: Sat Jul 15 14:59:35 2006
New Revision: 37661
URL: http://svn.digium.com/view/asterisk?rev=37661&view=rev
Log:
more Makefile cleanup and consistency stuff
don't reuse LIBS variable from top-level Makefile (oops)
build Asterisk binary after subdirs (preparing for embedded modules)
Modified:
trunk/Makefile
trunk/Makefile.moddir_rules
trunk/apps/Makefile
trunk/cdr/Makefile
trunk/channels/Makefile
trunk/codecs/Makefile
trunk/formats/Makefile
trunk/funcs/Makefile
trunk/pbx/Makefile
trunk/res/Makefile
Modified: trunk/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/Makefile?rev=37661&r1=37660&r2=37661&view=diff
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Sat Jul 15 14:59:35 2006
@@ -238,7 +238,7 @@
ifeq ($(OSARCH),FreeBSD)
BSDVERSION=$(shell make -V OSVERSION -f $(CROSS_COMPILE_TARGET)/usr/share/mk/bsd.port.subdir.mk)
ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
- LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
+ AST_LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
endif # FreeBSD
ifeq ($(OSARCH),NetBSD)
@@ -311,13 +311,13 @@
endif
ifeq ($(OSARCH),Linux)
- LIBS+=-ldl -lpthread $(EDITLINE_LIB) -lm -lresolv #-lnjamd
+ AST_LIBS+=-ldl -lpthread $(EDITLINE_LIB) -lm -lresolv #-lnjamd
else
- LIBS+=$(EDITLINE_LIB) -lm
+ AST_LIBS+=$(EDITLINE_LIB) -lm
endif
ifeq ($(OSARCH),Darwin)
- LIBS+=-lresolv
+ AST_LIBS+=-lresolv
ASTCFLAGS+=-D__Darwin__
AUDIO_LIBS=-framework CoreAudio
ASTLINK=-Wl,-dynamic
@@ -337,19 +337,19 @@
endif
ifeq ($(OSARCH),FreeBSD)
- LIBS+=-lcrypto
+ AST_LIBS+=-lcrypto
endif
ifeq ($(OSARCH),NetBSD)
- LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib $(EDITLINE_LIB)
+ AST_LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib $(EDITLINE_LIB)
endif
ifeq ($(OSARCH),OpenBSD)
- LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIB)
+ AST_LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIB)
endif
ifeq ($(OSARCH),SunOS)
- LIBS+=-lpthread -ldl -lnsl -lsocket -lresolv -L$(CROSS_COMPILE_TARGET)/opt/ssl/lib -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
+ AST_LIBS+=-lpthread -ldl -lnsl -lsocket -lresolv -L$(CROSS_COMPILE_TARGET)/opt/ssl/lib -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
OBJS+=strcompat.o
ASTLINK=
SOLINK=-shared -fpic -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
@@ -377,7 +377,7 @@
@echo " + make install +"
@echo " +-------------------------------------------+"
-all: cleantest config.status menuselect.makeopts depend asterisk $(SUBDIRS)
+all: cleantest config.status menuselect.makeopts depend $(SUBDIRS) asterisk
$(MOD_SUBDIRS):
@CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $@
@@ -413,10 +413,10 @@
endif
editline/config.h:
- cd editline && unset CFLAGS LIBS && CFLAGS="$(OPTIMIZE)" ./configure ; \
+ cd editline && unset CFLAGS AST_LIBS && CFLAGS="$(OPTIMIZE)" ./configure ; \
editline/libedit.a:
- cd editline && unset CFLAGS LIBS && test -f config.h || CFLAGS="$(OPTIMIZE)" ./configure
+ cd editline && unset CFLAGS AST_LIBS && test -f config.h || CFLAGS="$(OPTIMIZE)" ./configure
$(MAKE) -C editline libedit.a
db1-ast/libdb1.a:
@@ -492,8 +492,8 @@
fi
@rm -f include/asterisk/build.h.tmp
@$(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c
- @echo " [LD] $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.1 $(LIBS) -> $@"
- @$(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a $(LIBS)
+ @echo " [LD] $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.1 $(AST_LIBS) -> $@"
+ @$(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a $(AST_LIBS)
muted: muted.o
muted: LIBS+=$(AUDIO_LIBS)
@@ -892,7 +892,7 @@
@CFLAGS="-include $(ASTTOPDIR)/include/asterisk/autoconfig.h -I$(ASTTOPDIR)/include" PARENTSRC="$(ASTTOPDIR)" $(MAKE) -C menuselect menuselect
mxml/libmxml.a:
- @cd mxml && unset CFLAGS LIBS && test -f config.h || ./configure
+ @cd mxml && unset CFLAGS AST_LIBS && test -f config.h || ./configure
$(MAKE) -C mxml libmxml.a
makeopts.xml: $(foreach dir,$(MOD_SUBDIRS),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml sounds/sounds.xml
Modified: trunk/Makefile.moddir_rules
URL: http://svn.digium.com/view/asterisk/trunk/Makefile.moddir_rules?rev=37661&r1=37660&r2=37661&view=diff
==============================================================================
--- trunk/Makefile.moddir_rules (original)
+++ trunk/Makefile.moddir_rules Sat Jul 15 14:59:35 2006
@@ -35,13 +35,13 @@
$(1).so: LDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_LDFLAGS))
endef
-$(foreach mod,$(filter-out $(CC_MODS),$(SELECTED_MODS)),$(eval $(call module_o_c_template,$(mod))))
+$(foreach mod,$(C_MODS),$(eval $(call module_o_c_template,$(mod))))
-$(foreach mod,$(filter-out $(CC_MODS),$(SELECTED_MODS)),$(eval $(call module_so_o_template,$(mod))))
+$(foreach mod,$(C_MODS),$(eval $(call module_so_o_template,$(mod))))
-$(foreach mod,$(filter $(CC_MODS),$(SELECTED_MODS)),$(eval $(call module_oo_cc_template,$(mod))))
+$(foreach mod,$(CC_MODS),$(eval $(call module_oo_cc_template,$(mod))))
-$(foreach mod,$(filter $(CC_MODS),$(SELECTED_MODS)),$(eval $(call module_so_oo_template,$(mod))))
+$(foreach mod,$(CC_MODS),$(eval $(call module_so_oo_template,$(mod))))
.PHONY: clean clean-depend depend uninstall _all
Modified: trunk/apps/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/apps/Makefile?rev=37661&r1=37660&r2=37661&view=diff
==============================================================================
--- trunk/apps/Makefile (original)
+++ trunk/apps/Makefile Sat Jul 15 14:59:35 2006
@@ -14,7 +14,10 @@
include ../menuselect.makedeps
endif
-SELECTED_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.c,%,$(wildcard app_*.c)))
+C_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.c,%,$(wildcard app_*.c)))
+CC_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.cc,%,$(wildcard app_*.cc)))
+
+SELECTED_MODS:=$(C_MODS) $(CC_MODS)
ifneq ($(findstring ODBC_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_ODBC_STORAGE)
@@ -31,6 +34,5 @@
include $(ASTTOPDIR)/Makefile.moddir_rules
ifeq (SunOS,$(shell uname))
-app_chanspy.so: app_chanspy.o
- $(CC) $(SOLINK) -o $@ $< -lrt
+app_chanspy.so: LIBS+=-lrt
endif
Modified: trunk/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/cdr/Makefile?rev=37661&r1=37660&r2=37661&view=diff
==============================================================================
--- trunk/cdr/Makefile (original)
+++ trunk/cdr/Makefile Sat Jul 15 14:59:35 2006
@@ -14,7 +14,10 @@
include ../menuselect.makedeps
endif
-SELECTED_MODS:=$(filter-out $(MENUSELECT_CDR),$(patsubst %.c,%,$(wildcard cdr_*.c)))
+C_MODS:=$(filter-out $(MENUSELECT_CDR),$(patsubst %.c,%,$(wildcard cdr_*.c)))
+CC_MODS:=$(filter-out $(MENUSELECT_CDR),$(patsubst %.cc,%,$(wildcard cdr_*.cc)))
+
+SELECTED_MODS:=$(C_MODS) $(CC_MODS)
all: _all
Modified: trunk/channels/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/channels/Makefile?rev=37661&r1=37660&r2=37661&view=diff
==============================================================================
--- trunk/channels/Makefile (original)
+++ trunk/channels/Makefile Sat Jul 15 14:59:35 2006
@@ -14,9 +14,8 @@
include ../menuselect.makedeps
endif
-SELECTED_MODS:=$(filter-out $(MENUSELECT_CHANNELS),$(patsubst %.c,%,$(wildcard chan_*.c)) $(patsubst %.cc,%,$(wildcard chan_*.cc)))
-
-CC_MODS=chan_vpb
+C_MODS:=$(filter-out $(MENUSELECT_CHANNELS),$(patsubst %.c,%,$(wildcard chan_*.c)))
+CC_MODS:=$(filter-out $(MENUSELECT_CHANNELS),$(patsubst %.cc,%,$(wildcard chan_*.cc)))
ifeq ($(OSARCH),OpenBSD)
PTLIB=-lpt_OpenBSD_x86_r
@@ -41,11 +40,11 @@
endif
ifeq ($(wildcard h323/libchanh323.a),)
- SELECTED_MODS:=$(filter-out chan_h323,$(SELECTED_MODS))
+ CC_MODS:=$(filter-out chan_h323,$(CC_MODS))
endif
ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/mISDNuser/mISDNlib.h),)
- SELECTED_MODS:=$(filter-out chan_misdn,$(SELECTED_MODS))
+ C_MODS:=$(filter-out chan_misdn,$(C_MODS))
endif
ifndef OPENH323DIR
@@ -55,6 +54,8 @@
ifndef PWLIBDIR
PWLIBDIR=$(HOME)/pwlib
endif
+
+SELECTED_MODS:=$(C_MODS) $(CC_MODS)
all: _all
Modified: trunk/codecs/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/codecs/Makefile?rev=37661&r1=37660&r2=37661&view=diff
==============================================================================
--- trunk/codecs/Makefile (original)
+++ trunk/codecs/Makefile Sat Jul 15 14:59:35 2006
@@ -16,7 +16,10 @@
include ../menuselect.makedeps
endif
-SELECTED_MODS:=$(filter-out $(MENUSELECT_CODECS),$(patsubst %.c,%,$(wildcard codec_*.c)))
+C_MODS:=$(filter-out $(MENUSELECT_CODECS),$(patsubst %.c,%,$(wildcard codec_*.c)))
+CC_MODS:=$(filter-out $(MENUSELECT_CODECS),$(patsubst %.cc,%,$(wildcard codec_*.cc)))
+
+SELECTED_MODS:=$(C_MODS) $(CC_MODS)
LIBILBC:=ilbc/libilbc.a
LIBLPC10:=lpc10/liblpc10.a
Modified: trunk/formats/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/formats/Makefile?rev=37661&r1=37660&r2=37661&view=diff
==============================================================================
--- trunk/formats/Makefile (original)
+++ trunk/formats/Makefile Sat Jul 15 14:59:35 2006
@@ -14,7 +14,10 @@
include ../menuselect.makedeps
endif
-SELECTED_MODS:=$(filter-out $(MENUSELECT_FORMATS),$(patsubst %.c,%,$(wildcard format_*.c)))
+C_MODS:=$(filter-out $(MENUSELECT_FORMATS),$(patsubst %.c,%,$(wildcard format_*.c)))
+CC_MODS:=$(filter-out $(MENUSELECT_FORMATS),$(patsubst %.cc,%,$(wildcard format_*.cc)))
+
+SELECTED_MODS:=$(C_MODS) $(CC_MODS)
all: _all
Modified: trunk/funcs/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/funcs/Makefile?rev=37661&r1=37660&r2=37661&view=diff
==============================================================================
--- trunk/funcs/Makefile (original)
+++ trunk/funcs/Makefile Sat Jul 15 14:59:35 2006
@@ -14,7 +14,10 @@
include ../menuselect.makedeps
endif
-SELECTED_MODS:=$(filter-out $(MENUSELECT_FUNCS),$(patsubst %.c,%,$(wildcard func_*.c)))
+C_MODS:=$(filter-out $(MENUSELECT_FUNCS),$(patsubst %.c,%,$(wildcard func_*.c)))
+CC_MODS:=$(filter-out $(MENUSELECT_FUNCS),$(patsubst %.cc,%,$(wildcard func_*.cc)))
+
+SELECTED_MODS:=$(C_MODS) $(CC_MODS)
# TODO This check needs to be handled with autoconf
ifeq ($(OSARCH),SunOS)
Modified: trunk/pbx/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/pbx/Makefile?rev=37661&r1=37660&r2=37661&view=diff
==============================================================================
--- trunk/pbx/Makefile (original)
+++ trunk/pbx/Makefile Sat Jul 15 14:59:35 2006
@@ -14,11 +14,10 @@
include ../menuselect.makedeps
endif
-SELECTED_MODS:=$(filter-out $(MENUSELECT_PBX),$(patsubst %.c,%,$(wildcard pbx_*.c)) $(patsubst %.cc,%,$(wildcard pbx_*.cc)))
+C_MODS:=$(filter-out $(MENUSELECT_PBX),$(patsubst %.c,%,$(wildcard pbx_*.c)))
+CC_MODS:=$(filter-out $(MENUSELECT_PBX),$(patsubst %.cc,%,$(wildcard pbx_*.cc)))
-MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
-
-CC_MODS:=pbx_kdeconsole
+SELECTED_MODS:=$(C_MODS) $(CC_MODS)
all: _all
@@ -33,7 +32,7 @@
$(eval $(call ast_make_o_c,ael/aelbison.o,ael/ael.tab.c ael/ael.tab.h ../include/asterisk/ael_structs.h))
ael/aelbison.o: CFLAGS+=-I.
-pbx_ael.so: pbx_ael.o ael/aelbison.o ael/aelflex.o
+pbx_ael.so: ael/aelbison.o ael/aelflex.o
ael/ael_lex.c:
(cd ael; flex ael.flex; sed -i -e "/begin standard C headers/i#include \"asterisk.h\"" ael_lex.c)
@@ -44,4 +43,4 @@
$(eval $(call ast_make_o_c,dundi-parser.o,dundi-parser.c dundi-parser.h))
dundi-parser.o: CFLAGS+=-I.
-pbx_dundi.so: pbx_dundi.o dundi-parser.o
+pbx_dundi.so: dundi-parser.o
Modified: trunk/res/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/res/Makefile?rev=37661&r1=37660&r2=37661&view=diff
==============================================================================
--- trunk/res/Makefile (original)
+++ trunk/res/Makefile Sat Jul 15 14:59:35 2006
@@ -14,18 +14,16 @@
include ../menuselect.makedeps
endif
-SELECTED_MODS:=$(filter-out $(MENUSELECT_RES),$(patsubst %.c,%,$(wildcard res_*.c)))
+C_MODS:=$(filter-out $(MENUSELECT_RES),$(patsubst %.c,%,$(wildcard res_*.c)))
+CC_MODS:=$(filter-out $(MENUSELECT_RES),$(patsubst %.cc,%,$(wildcard res_*.cc)))
-ifeq ($(OSARCH),FreeBSD)
- SELECTED_MODS:=$(filter-out $(shell if test ${BSDVERSION} -lt 500000 ; then echo "res_config_odbc"; fi),$(SELECTED_MODS))
-endif
+SELECTED_MODS:=$(C_MODS) $(CC_MODS)
all: _all
include $(ASTTOPDIR)/Makefile.moddir_rules
-res_snmp.so: res_snmp.o snmp/agent.o
+res_snmp.so: snmp/agent.o
clean::
rm -f snmp/*.o
-
More information about the asterisk-commits
mailing list