Makefile revision 253
4070N/A#
4070N/A# CDDL HEADER START
4070N/A#
4070N/A# The contents of this file are subject to the terms of the
4070N/A# Common Development and Distribution License (the "License").
4070N/A# You may not use this file except in compliance with the License.
4070N/A#
4070N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4070N/A# or http://www.opensolaris.org/os/licensing.
4070N/A# See the License for the specific language governing permissions
4070N/A# and limitations under the License.
4070N/A#
4070N/A# When distributing Covered Code, include this CDDL HEADER in each
4070N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4070N/A# If applicable, add the following below this CDDL HEADER, with the
4070N/A# fields enclosed by brackets "[]" replaced with your own identifying
4070N/A# information: Portions Copyright [yyyy] [name of copyright owner]
4070N/A#
4070N/A# CDDL HEADER END
4070N/A#
4070N/A# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
4070N/A#
4070N/Ainclude ../../make-rules/shared-macros.mk
4070N/A
4070N/APATH=$(dir $(CC)):/usr/bin:/usr/gnu/bin
4070N/A
4070N/ACOMPONENT_NAME= unixODBC
4070N/ACOMPONENT_VERSION= 2.3.0
4070N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
4070N/ACOMPONENT_PROJECT_URL= http://unixodbc.org/
4070N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
4070N/ACOMPONENT_ARCHIVE_HASH= sha1:b2839b5210906e3ee286a4b621f177db9c7be7a8
4070N/ACOMPONENT_ARCHIVE_URL= http://www.unixodbc.org/$(COMPONENT_ARCHIVE)
4070N/A
4070N/Ainclude ../../make-rules/prep.mk
4070N/Ainclude ../../make-rules/configure.mk
4070N/Ainclude ../../make-rules/ips.mk
4070N/A
4070N/APATCH_LEVEL = 0
4070N/A
4070N/A# Enable C99 mode + -Xc for its additional warnings.
4070N/Astudio_C99MODE = -Xc $(studio_C99_ENABLE)
4070N/A
4070N/A# -xinline=%auto -- we like inlining where appropriate
4070N/ACFLAGS += -xinline=%auto
4070N/A
4070N/A# -xbuiltin=%none -- builtins have been known to be buggy
4070N/ACFLAGS += -xbuiltin=%none
4070N/A
4070N/ACFLAGS += $(CPP_LARGEFILES)
4070N/ACFLAGS += $(XPG6MODE)
4070N/ACFLAGS += $(CPP_POSIX)
4070N/ACFLAGS += $(CPP_C99_EXTENDED_MATH)
4070N/ACFLAGS += $(studio_PIC)
4070N/A
4070N/AGSED = /usr/gnu/bin/sed
4070N/A
4070N/AX11LIB.32 = $(CONFIGURE_PREFIX)/lib
4070N/AX11LIB.64 = $(CONFIGURE_PREFIX)/lib/$(MACH64)
PKG_CONFIG_PATH_32 = /usr/lib/pkgconfig
PKG_CONFIG_PATH_64 = /usr/lib/$(MACH64)/pkgconfig
LD_OPTIONS += -lsocket -lresolv -lnsl -lgen
CONFIGURE_OPTIONS += --includedir=$(CONFIGURE_PREFIX)/include/odbc
CONFIGURE_OPTIONS += --localstatedir=/var
CONFIGURE_OPTIONS += --sysconfdir=/etc/odbc
CONFIGURE_OPTIONS += --x-includes="$(CONFIGURE_PREFIX)/include"
CONFIGURE_OPTIONS += --x-libraries="$(X11LIB.$(BITS))"
CONFIGURE_OPTIONS += --enable-shared
CONFIGURE_OPTIONS += --disable-static
CONFIGURE_OPTIONS += --disable-libtool-lock
CONFIGURE_OPTIONS += --disable-gui
CONFIGURE_OPTIONS += --enable-threads
CONFIGURE_OPTIONS += --disable-gnuthreads
CONFIGURE_OPTIONS += --enable-readline
CONFIGURE_OPTIONS += --enable-inicaching
CONFIGURE_OPTIONS += --enable-drivers=yes
CONFIGURE_OPTIONS += --enable-driver-conf=yes
CONFIGURE_OPTIONS += --enable-fdb
CONFIGURE_OPTIONS += --enable-odbctrace
CONFIGURE_OPTIONS += --enable-iconv
CONFIGURE_OPTIONS += --enable-stats
CONFIGURE_OPTIONS += --enable-rtldgroup
CONFIGURE_OPTIONS += --disable-ltdllib
CONFIGURE_OPTIONS += --without-pth
CONFIGURE_OPTIONS += --without-pth-test
CONFIGURE_OPTIONS += --with-libiconv-prefix=$(CONFIGURE_PREFIX)
CONFIGURE_OPTIONS += --disable-ltdl-install
CONFIGURE_OPTIONS += --with-pic
CONFIGURE_ENV += CC="$(CC)"
CONFIGURE_ENV += LD="$(CC) $(CFLAGS) $(LDFLAGS)"
CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
CONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
CONFIGURE_ENV += INSTALL="$(INSTALL)"
CONFIGURE_ENV += PKG_CONFIG_PATH="$(PKG_CONFIG_PATH_$(BITS))"
PROTOPKGCONFIGDIR32 = $(PROTOUSRLIBDIR)/pkgconfig
PROTOPKGCONFIGDIR64 = $(PROTOUSRLIBDIR64)/pkgconfig
build: $(BUILD_32_and_64)
install: $(INSTALL_32_and_64)
$(MKDIR) $(PROTOPKGCONFIGDIR32)
$(MKDIR) $(PROTOPKGCONFIGDIR64)
$(GSED) -e "s#SED_SIZEOF_LONG#4#g" \
$(COMPONENT_DIR)/Solaris/unixODBC.pc > \
$(PROTOPKGCONFIGDIR32)/unixODBC.pc
$(GSED) -e "s#SED_SIZEOF_LONG#8#g" \
$(COMPONENT_DIR)/Solaris/unixODBC.pc > \
$(COMPONENT_DIR)/unixODBC.pc.1
$(GSED) -e 's#/lib#/lib/$(MACH64)#g' \
$(COMPONENT_DIR)/unixODBC.pc.1 > \
$(PROTOPKGCONFIGDIR64)/unixODBC.pc
$(RM) -f $(COMPONENT_DIR)/unixODBC.pc.1
test: $(TEST_32_and_64)
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
include ../../make-rules/depend.mk