use auto-build for res modules too
authorKevin P. Fleming <kpfleming@digium.com>
Sat, 11 Feb 2006 16:44:15 +0000 (16:44 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Sat, 11 Feb 2006 16:44:15 +0000 (16:44 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9552 65c4cc65-6c06-0410-ace0-fbb531ad65f3

funcs/Makefile
res/Makefile

index 72e229a..1350fd7 100644 (file)
 # the GNU General Public License
 #
 
-BUILD_MODS:=$(patsubst %.c,%.o,$(wildcard func_*.c))
+MODS:=$(patsubst %.c,%.so,$(wildcard func_*.c))
 
 ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/odbcinst.h),)
-  BUILD_MODS:=$(filter-out func_odbc.o,$(BUILD_MODS))
+  MODS:=$(filter-out func_odbc.so,$(MODS))
 endif
 
-MODS:=$(BUILD_MODS:.o=.so)
-
 ifeq (${OSARCH},CYGWIN)
 CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
 CYGSOLIB=-L.. -L. -lasterisk.dll
index 0ade183..bbbabf3 100644 (file)
 # the GNU General Public License
 #
 
-MODS=res_indications.so res_monitor.so res_adsi.so res_agi.so res_features.so res_clioriginate.so
+MODS:=$(patsubst %.c,%.so,$(wildcard res_*.c))
 
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/odbcinst.h),)
-  ifneq (${OSARCH},FreeBSD)
-    MODS+=res_config_odbc.so
-  else
-    MODS+=$(shell if test ${BSDVERSION} -ge 500000 ; then echo "res_config_odbc.so"; fi)
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/odbcinst.h),)
+  MODS:=$(filter-out res_odbc.so,$(MODS))
+  MODS:=$(filter-out res_config_odbc.so,$(MODS))
+else
+  ifeq (${OSARCH},FreeBSD)
+    MODS:=$(filter-out $(shell if test ${BSDVERSION} -lt 500000 ; then echo "res_config_odbc.so"; fi),$(MODS))
   endif
-  MODS+=res_odbc.so
 endif
 
 ifneq ($(NOCRYPTO),yes)
-  MODS+=res_crypto.so
+  MODS:=$(filter-out res_crypto.so,$(MODS))
 endif
 
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libosptk.a),)
-  MODS+=res_osp.so
-  OSPLIB=$(CROSS_COMPILE_TARGET)/usr/lib/libosptk.a
-else
-  ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libosptk.a),)
-    MODS+=res_osp.so
-    OSPLIB=$(CROSS_COMPILE_TARGET)/usr/local/lib/libosptk.a
-  endif
+OSPLIB=$(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libosptk.a)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libosptk.a)
+ifeq (${OSPLIB},)
+  MODS:=$(filter-out res_osp.so,$(MODS))
+endif
+
+ifeq (${WITH_SMDI},)
+  MODS:=$(filter-out res_smdi.so,$(MODS))
 endif
 
 ifeq (${OSARCH},CYGWIN)
-CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
-CYGSOLIB=-L.. -L. -lasterisk.dll
-CYG_RES_CONFIG_ODBC_LIB=-lres_odbc.so
-CYG_RES_FEATURES_LIB=-lres_adsi.so -lres_monitor.so
-else
-MODS+=res_musiconhold.so 
+  CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
+  CYGSOLIB=-L.. -L. -lasterisk.dll
+  CYG_RES_CONFIG_ODBC_LIB=-lres_odbc.so
+  CYG_RES_FEATURES_LIB=-lres_adsi.so -lres_monitor.so
+  MODS:=$(filter-out res_musiconhold.so,$(MODS))
 endif
 
 CRYPTO_LIBS=-lssl -lcrypto
@@ -64,13 +62,6 @@ else
 CFLAGS+=-DOPENSSL_NO_KRB5 -fPIC
 endif
 
-#
-# Asterisk SMDI integration
-#
-ifeq (${WITH_SMDI},1)
-MODS+=res_smdi.so
-endif
-
 all: depend $(MODS)
 
 install: all