aboutsummaryrefslogtreecommitdiffstats
path: root/net/asterisk10/files/patch-apps::Makefile
blob: 9881ae1f3831d4e6aeb7055db7c0163516475727 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
--- apps/Makefile.orig  Sun Apr 30 16:38:22 2006
+++ apps/Makefile   Wed Jun 14 14:03:42 2006
@@ -45,25 +45,27 @@
 #APPS+=app_rpt.so
 
 ifndef WITHOUT_ZAPTEL
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h),)
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/zaptel.h),)
   APPS+=app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so app_page.so
 endif
 endif # WITHOUT_ZAPTEL
 
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/osp/osp.h $(CROSS_COMPILE_TARGET)/usr/include/osp/osp.h),)
+ifdef WITH_FAX
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/spandsp.h),)
+APPS+=app_rxfax.so app_txfax.so
+endif
+endif
+
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/osp/osp.h $(CROSS_COMPILE_TARGET)/usr/include/osp/osp.h),)
 APPS+=app_osplookup.so
 endif
 
 ifeq ($(findstring BSD,${OSARCH}),BSD)
-CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
+CFLAGS+=-I$(CROSS_COMPILE_TARGET)$(LOCALBASE)/include -L$(CROSS_COMPILE_TARGET)$(LOCALBASE)/lib
 endif
 
-CURLLIBS=$(shell $(CROSS_COMPILE_BIN)curl-config --libs)
-ifneq ($(shell if [[ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]]; then echo "OK" ; fi),)
-  ifneq (${CURLLIBS},)
-    APPS+=app_curl.so
-  endif 
-endif
+CURLLIBS=$(shell $(CROSS_COMPILE_BIN)$(LOCALBASE)/bin/curl-config --libs)
+APPS+=app_curl.so
 
 ifeq (${OSARCH},CYGWIN)
 CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
@@ -95,18 +97,26 @@
    $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -ltonezone
 
 install: all
-   for x in $(APPS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
+   for x in $(APPS); do $(BSD_INSTALL_PROGRAM) $$x $(DESTDIR)$(MODULES_DIR) ; done
    rm -f $(DESTDIR)$(MODULES_DIR)/app_datetime.so
    rm -f $(DESTDIR)$(MODULES_DIR)/app_qcall.so
 
 app_curl.so: app_curl.o
    $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS)
 
+ifdef WITH_FAX
+app_rxfax.so : app_rxfax.o
+   $(CC) $(SOLINK) -o $@ $< -L$(LOCALBASE)/lib -lspandsp -ltiff
+
+app_txfax.so : app_txfax.o
+   $(CC) $(SOLINK) -o $@ $< -L$(LOCALBASE)/lib -lspandsp -ltiff
+endif
+
 app_sql_postgres.o: app_sql_postgres.c
-   $(CC) -pipe -I$(CROSS_COMPILE_TARGET)/usr/local/pgsql/include -I$(CROSS_COMPILE_TARGET)/usr/include/postgresql $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
+   $(CC) -I$(LOCALBASE)/include/pgsql $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
 
 app_sql_postgres.so: app_sql_postgres.o
-   $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -L/usr/local/pgsql/lib -lpq
+   $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -L$(LOCALBASE)/lib -lpq
 
 app_sql_odbc.so: app_sql_odbc.o
    $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lodbc