prepare to use auto-build rules in other Makefiles
authorKevin P. Fleming <kpfleming@digium.com>
Sat, 11 Feb 2006 16:30:23 +0000 (16:30 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Sat, 11 Feb 2006 16:30:23 +0000 (16:30 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9551 65c4cc65-6c06-0410-ace0-fbb531ad65f3

funcs/Makefile

index ea6949c..72e229a 100644 (file)
 # the GNU General Public License
 #
 
-AVAILABLE_FUNCS=$(patsubst %.c,%.o,$(wildcard func*.c))
+BUILD_MODS:=$(patsubst %.c,%.o,$(wildcard func_*.c))
 
 ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/odbcinst.h),)
-  STANDALONE_FUNCS=$(filter-out func_odbc.o,$(AVAILABLE_FUNCS))
-else
-  STANDALONE_FUNCS=$(AVAILABLE_FUNCS)
+  BUILD_MODS:=$(filter-out func_odbc.o,$(BUILD_MODS))
 endif
 
-FUNCS=$(STANDALONE_FUNCS:.o=.so)
+MODS:=$(BUILD_MODS:.o=.so)
 
 ifeq (${OSARCH},CYGWIN)
 CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
@@ -28,7 +26,7 @@ else
 CFLAGS+=-fPIC
 endif
 
-all: $(FUNCS)
+all: $(MODS)
 
 clean:
        rm -f *.so *.o .depend
@@ -40,7 +38,7 @@ func_odbc.so: func_odbc.o
        $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lodbc
 
 install: all
-       for x in $(FUNCS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
+       for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
 
 uninstall: