$FreeBSD$ --- cdr/Makefile.orig Tue Nov 29 20:24:39 2005 +++ cdr/Makefile Thu Jan 12 17:56:23 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,18 +38,18 @@ # # 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.63),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.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 @@ -61,7 +61,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 @@ -82,9 +82,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),) @@ -110,7 +110,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