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