move rules file to prepare for generic rules file
authorKevin P. Fleming <kpfleming@digium.com>
Thu, 6 Jul 2006 21:04:28 +0000 (21:04 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Thu, 6 Jul 2006 21:04:28 +0000 (21:04 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37222 65c4cc65-6c06-0410-ace0-fbb531ad65f3

Makefile
Makefile.moddir_rules [moved from Makefile.rules with 100% similarity]
apps/Makefile
cdr/Makefile
channels/Makefile
codecs/Makefile
formats/Makefile
funcs/Makefile
pbx/Makefile
res/Makefile

index c0d1fcb..7181955 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -25,14 +25,14 @@ OPTIONS=
 #SUB_PROC=xscale # or maverick
 
 ifeq ($(CROSS_COMPILE),)
-  OSARCH=$(shell uname -s)
-  PROC?=$(shell uname -m)
+  OSARCH:=$(shell uname -s)
+  PROC?:=$(shell uname -m)
 else
   OSARCH=$(CROSS_ARCH)
   PROC=$(CROSS_PROC)
 endif
 
-PWD=$(shell pwd)
+ASTTOPDIR:=$(shell pwd)
 
 # Remember the MAKELEVEL at the top
 MAKETOPLEVEL?=$(MAKELEVEL)
@@ -886,7 +886,7 @@ menuselect: menuselect/menuselect makeopts.xml
        -@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.h menuselect/linkedlists.h config.status mxml/libmxml.a
-       @CFLAGS="-include $(PWD)/include/asterisk/autoconfig.h -I$(PWD)/include" PARENTSRC="$(PWD)" $(MAKE) -C menuselect menuselect
+       @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
similarity index 100%
rename from Makefile.rules
rename to Makefile.moddir_rules
index 7c86dfa..c772be7 100644 (file)
@@ -20,7 +20,7 @@ MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_ODBC_STORAGE) $(MENUSELEC
 
 all: _all
 
-include ../Makefile.rules
+include $(ASTTOPDIR)/Makefile.moddir_rules
 
 ifeq (SunOS,$(shell uname))
 app_chanspy.so: app_chanspy.o
index e713d94..ef877e8 100644 (file)
@@ -18,4 +18,4 @@ SELECTED_MODS:=$(filter-out $(MENUSELECT_CDR),$(patsubst %.c,%,$(wildcard cdr_*.
 
 all: _all
 
-include ../Makefile.rules
+include $(ASTTOPDIR)/Makefile.moddir_rules
index 866af68..d24b3ea 100644 (file)
@@ -60,17 +60,17 @@ MENUSELECT_OPTS_chan_misdn+=CHAN_MISDN_VERSION=\"0.3.0\"
 
 all: _all
 
-include ../Makefile.rules
+include $(ASTTOPDIR)/Makefile.moddir_rules
 
 clean::
        rm -f busy.h ringtone.h gentone gentone-ulaw
 
-ifneq ($(wildcard h323/Makefile.ast),)
-  include h323/Makefile.ast
+ifneq ($(wildcard $(ASTTOPDIR)/Makefile.ast),)
+  include $(ASTTOPDIR)/Makefile.ast
 endif
 
-ifneq ($(wildcard misdn/Makefile.ast),)
-  include misdn/Makefile.ast
+ifneq ($(wildcard m$(ASTTOPDIR)/Makefile.ast),)
+  include m$(ASTTOPDIR)/Makefile.ast
 endif
 
 gentone gentone-ulaw: %: %.c
@@ -95,7 +95,7 @@ chan_vpb.so: chan_vpb.o
         $(CXX) $(SOLINK) -o $@ $< -lvpb -lpthread -lm -ldl
 
 ifeq ($(OSARCH),Linux)
-chan_h323.so: chan_h323.o h323/libchanh323.a h323/Makefile.ast
+chan_h323.so: chan_h323.o h323/libchanh323.a $(ASTTOPDIR)/Makefile.ast
        $(CC) $(SOLINK) $(H323LDFLAGS) -o $@ $< h323/libchanh323.a $(H323LDLIBS) -lstdc++
 else
 chan_h323.so: chan_h323.o h323/libchanh323.a
index f98637a..37aef43 100644 (file)
@@ -30,7 +30,7 @@ GSM_LIB:=
 codec_gsm.so: gsm/lib/libgsm.a
 endif
 
-include ../Makefile.rules
+include $(ASTTOPDIR)/Makefile.moddir_rules
 
 clean::
        $(MAKE) -C gsm clean
index 06195d0..5823900 100644 (file)
@@ -18,4 +18,4 @@ SELECTED_MODS:=$(filter-out $(MENUSELECT_FORMATS),$(patsubst %.c,%,$(wildcard fo
 
 all: _all
 
-include ../Makefile.rules
+include $(ASTTOPDIR)/Makefile.moddir_rules
index 5a8845c..97b8e38 100644 (file)
@@ -29,4 +29,4 @@ endif
 
 all: _all
 
-include ../Makefile.rules
+include $(ASTTOPDIR)/Makefile.moddir_rules
index 7680943..43aa519 100644 (file)
@@ -20,7 +20,7 @@ MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
 
 all: _all
 
-include ../Makefile.rules
+include $(ASTTOPDIR)/Makefile.moddir_rules
 
 clean::
        rm -f ael/*.o
index 6ce2ae0..22f266a 100644 (file)
@@ -22,7 +22,7 @@ endif
 
 all: _all
 
-include ../Makefile.rules
+include $(ASTTOPDIR)/Makefile.moddir_rules
 
 res_snmp.so: res_snmp.o snmp/agent.o