Makefile revision 4485
294N/A#
294N/A# CDDL HEADER START
294N/A#
294N/A# The contents of this file are subject to the terms of the
294N/A# Common Development and Distribution License (the "License").
294N/A# You may not use this file except in compliance with the License.
294N/A#
294N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
294N/A# or http://www.opensolaris.org/os/licensing.
294N/A# See the License for the specific language governing permissions
294N/A# and limitations under the License.
294N/A#
294N/A# When distributing Covered Code, include this CDDL HEADER in each
294N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
294N/A# If applicable, add the following below this CDDL HEADER, with the
294N/A# fields enclosed by brackets "[]" replaced with your own identifying
294N/A# information: Portions Copyright [yyyy] [name of copyright owner]
294N/A#
294N/A# CDDL HEADER END
294N/A#
294N/A# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
294N/A#
3661N/Ainclude ../../make-rules/shared-macros.mk
294N/A
294N/APATH=$(dir $(CC)):/usr/bin:/usr/gnu/bin
294N/A
294N/ACOMPONENT_NAME= unixODBC
294N/ACOMPONENT_VERSION= 2.3.1
294N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
586N/ACOMPONENT_PROJECT_URL= http://unixodbc.org/
294N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
294N/ACOMPONENT_ARCHIVE_HASH= \
618N/A sha256:1f5be3edecff9e31072ef738ea1d8019594c4f0c2e3ab427e6eef153491db6a2
586N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)$(COMPONENT_ARCHIVE)
844N/A
844N/ACOMPONENT_BUGDB= library/unixodbc
294N/A
1273N/ATPNO= 9099
294N/A
3661N/Ainclude $(WS_MAKE_RULES)/prep.mk
3661N/Ainclude $(WS_MAKE_RULES)/configure.mk
294N/Ainclude $(WS_MAKE_RULES)/ips.mk
294N/A
294N/APATCH_LEVEL = 0
294N/A
294N/A# Enable C99 mode + -Xc for its additional warnings.
294N/Astudio_C99MODE = -Xc $(studio_C99_ENABLE)
294N/A
294N/A# -xinline=%auto -- we like inlining where appropriate
294N/ACFLAGS += -xinline=%auto
294N/A
294N/A# -xbuiltin=%none -- builtins have been known to be buggy
294N/ACFLAGS += -xbuiltin=%none
294N/A
294N/ACFLAGS += $(CPP_LARGEFILES)
294N/ACFLAGS += $(XPG6MODE)
294N/ACFLAGS += $(CPP_POSIX)
294N/ACFLAGS += $(CPP_C99_EXTENDED_MATH)
294N/ACFLAGS += $(studio_PIC)
294N/A
294N/AGSED = /usr/gnu/bin/sed
294N/A
294N/AX11LIB.32 = $(CONFIGURE_PREFIX)/lib
294N/AX11LIB.64 = $(CONFIGURE_PREFIX)/lib/$(MACH64)
294N/A
294N/APKG_CONFIG_PATH_32 = /usr/lib/pkgconfig
294N/APKG_CONFIG_PATH_64 = /usr/lib/$(MACH64)/pkgconfig
294N/A
294N/ALD_OPTIONS += -lsocket -lresolv -lnsl -lgen
294N/A
294N/ACONFIGURE_OPTIONS += --includedir=$(CONFIGURE_PREFIX)/include/odbc
294N/ACONFIGURE_OPTIONS += --localstatedir=/var
294N/ACONFIGURE_OPTIONS += --sysconfdir=/etc/odbc
294N/ACONFIGURE_OPTIONS += --x-includes="$(CONFIGURE_PREFIX)/include"
294N/ACONFIGURE_OPTIONS += --x-libraries="$(X11LIB.$(BITS))"
294N/ACONFIGURE_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: $(NO_TESTS)
REQUIRED_PACKAGES += library/libtool/libltdl
REQUIRED_PACKAGES += library/readline
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/math