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
70
71
|
--- cdr/Makefile.orig Thu Sep 21 17:18:19 2006
+++ cdr/Makefile Thu Oct 19 10:52:51 2006
@@ -21,8 +21,8 @@
endif
ifeq ($(findstring BSD,${OSARCH}),BSD)
- CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include
- SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/local/lib
+ CFLAGS+=-I$(CROSS_COMPILE_TARGET)$(LOCALBASE)/include
+ SOLINK+=-L$(CROSS_COMPILE_TARGET)$(LOCALBASE)/lib
endif
#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
@@ -38,21 +38,21 @@
#
# unixODBC stuff...
#
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/odbcinst.h),)
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h)$(wildcard $(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/odbcinst.h),)
MODS+=cdr_odbc.so
endif
#
# FreeTDS stuff...
#
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/tds.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/tds.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/freetds/tds.h),)
- ifeq ($(shell grep -s TDS_VERSION_NO $(CROSS_COMPILE_TARGET)/usr/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/local/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/include/freetds/tdsver.h | grep -c 0.64),1)
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/tds.h)$(wildcard $(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/tds.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/freetds/tds.h),)
+ ifeq ($(shell grep -s TDS_VERSION_NO $(CROSS_COMPILE_TARGET)/usr/include/tdsver.h $(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/include/freetds/tdsver.h | grep -c 0.64),1)
CFLAGS += -DFREETDS_0_64
else
- ifeq ($(shell grep -s TDS_VERSION_NO $(CROSS_COMPILE_TARGET)/usr/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/local/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/include/freetds/tdsver.h | grep -c 0.63),1)
+ ifeq ($(shell grep -s TDS_VERSION_NO $(CROSS_COMPILE_TARGET)/usr/include/tdsver.h $(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/include/freetds/tdsver.h | grep -c 0.63),1)
CFLAGS += -DFREETDS_0_63
else
- ifeq ($(shell grep -s TDS_VERSION_NO $(CROSS_COMPILE_TARGET)/usr/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/local/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/include/freetds/tdsver.h | grep -c 0.62),1)
+ ifeq ($(shell grep -s TDS_VERSION_NO $(CROSS_COMPILE_TARGET)/usr/include/tdsver.h $(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/include/freetds/tdsver.h | grep -c 0.62),1)
CFLAGS += -DFREETDS_0_62
else
CFLAGS += -DFREETDS_PRE_0_62
@@ -65,7 +65,7 @@
#
# PGSQL stuff... Autoconf anyone??
#
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/postgresql)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/pgsql/include)$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/pgsql)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/pgsql)$(wildcard $(CROSS_COMPILE_TARGET)/opt/pgsql/include)$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/libpq-fe.h),)
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/postgresql)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/pgsql/include)$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/pgsql)$(wildcard $(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/pgsql)$(wildcard $(CROSS_COMPILE_TARGET)/opt/pgsql/include)$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/libpq-fe.h),)
MODS+=cdr_pgsql.so
endif
@@ -86,9 +86,9 @@
MLFLAGS+=-L$(CROSS_COMPILE_TARGET)/usr/lib/pgsql
endif
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/pgsql),)
- CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include/pgsql
- MLFLAGS+=-L$(CROSS_COMPILE_TARGET)/usr/local/lib/pgsql
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/pgsql),)
+ CFLAGS+=-I$(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/pgsql
+ MLFLAGS+=-L$(CROSS_COMPILE_TARGET)$(LOCALBASE)/lib/pgsql
endif
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/opt/pgsql/include),)
@@ -114,7 +114,7 @@
all: depend $(MODS)
install: all
- for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
+ for x in $(MODS); do $(BSD_INSTALL_PROGRAM) $$x $(DESTDIR)$(MODULES_DIR) ; done
clean:
rm -f *.so *.o .depend
|