Move conditional compilation for CURL from apps/ to funcs/
authorTilghman Lesher <tilghman@meg.abyt.es>
Thu, 23 Feb 2006 23:43:06 +0000 (23:43 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Thu, 23 Feb 2006 23:43:06 +0000 (23:43 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10961 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/Makefile
funcs/Makefile

index 988645d..6b6d9ae 100644 (file)
@@ -32,14 +32,6 @@ ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/osp/osp.h $(CROSS_COM
   MODS:=$(filter-out app_osplookup.so,$(MODS))
 endif
 
-ifneq ($(shell if [[ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]]; then echo "OK" ; fi),)
-  CURLLIBS:=$(shell $(CROSS_COMPILE_BIN)curl-config --libs)
-endif
-
-ifeq (${CURLLIBS},)
-  MODS:=$(filter-out app_curl.so,$(MODS))
-endif
-
 ifneq (${WITH_SMDI},)
   CFLAGS+=-DWITH_SMDI
 endif
@@ -83,9 +75,6 @@ install: all
 
 uninstall:
 
-app_curl.so: app_curl.o
-       $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS)
-
 look:  look.c
        $(CC) -pipe -O6 -g look.c -o look -lncurses
 
index 7dd6524..9c8181c 100644 (file)
@@ -17,6 +17,14 @@ ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h $(CROSS_COMPILE_
   MODS:=$(filter-out func_odbc.so,$(MODS))
 endif
 
+ifneq ($(shell if [[ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]]; then echo "OK" ; fi),)
+  CURLLIBS:=$(shell $(CROSS_COMPILE_BIN)curl-config --libs)
+endif
+
+ifeq (${CURLLIBS},)
+  MODS:=$(filter-out func_curl.so,$(MODS))
+endif
+
 ifeq (${OSARCH},CYGWIN)
   CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
   CYGSOLIB=-L.. -L. -lasterisk.dll
@@ -35,6 +43,9 @@ clean: clean-depend
 %.so : %.o
        $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
 
+func_curl.so: func_curl.o
+       $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS)
+
 func_odbc.so: func_odbc.o
        $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lodbc