illumos-gcc: native unleashed host & generate 64bit code by default
[unleashed-userland.git] / components / unixodbc / Makefile
blob0f8aca6d292408d3c105cf0bc4ea535f91dc26e4
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
21 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
23 include ../../make-rules/shared-macros.mk
25 PATH=$(dir $(CC)):/usr/bin:/usr/gnu/bin
27 COMPONENT_NAME= unixODBC
28 COMPONENT_VERSION= 2.3.4
29 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
30 COMPONENT_PROJECT_URL= http://unixodbc.org/
31 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
32 COMPONENT_ARCHIVE_HASH= \
33 sha256:2e1509a96bb18d248bf08ead0d74804957304ff7c6f8b2e5965309c632421e39
34 COMPONENT_ARCHIVE_URL= ftp://ftp.unixodbc.org/pub/unixODBC/$(COMPONENT_ARCHIVE)
35 COMPONENT_BUGDB= library/unixodbc
37 include ../../make-rules/prep.mk
38 include ../../make-rules/configure.mk
39 include ../../make-rules/ips.mk
41 CFLAGS += $(CPP_LARGEFILES)
42 CFLAGS += $(XPG6MODE)
43 CFLAGS += $(CPP_POSIX)
44 CFLAGS += $(CPP_C99_EXTENDED_MATH)
45 CFLAGS += -std=c99
47 GSED = /usr/gnu/bin/sed
49 X11LIB.32 = $(CONFIGURE_PREFIX)/lib
50 X11LIB.64 = $(CONFIGURE_PREFIX)/lib/$(MACH64)
52 PKG_CONFIG_PATH_32 = /usr/lib/pkgconfig
53 PKG_CONFIG_PATH_64 = /usr/lib/$(MACH64)/pkgconfig
55 LD_OPTIONS += -lsocket -lresolv -lnsl -lgen
57 CONFIGURE_OPTIONS += --includedir=$(CONFIGURE_PREFIX)/include/odbc
58 CONFIGURE_OPTIONS += --localstatedir=/var
59 CONFIGURE_OPTIONS += --sysconfdir=/etc/odbc
60 CONFIGURE_OPTIONS += --x-includes="$(CONFIGURE_PREFIX)/include"
61 CONFIGURE_OPTIONS += --x-libraries="$(X11LIB.$(BITS))"
62 CONFIGURE_OPTIONS += --enable-shared
63 CONFIGURE_OPTIONS += --disable-static
64 CONFIGURE_OPTIONS += --disable-libtool-lock
65 CONFIGURE_OPTIONS += --disable-gui
66 CONFIGURE_OPTIONS += --enable-threads
67 CONFIGURE_OPTIONS += --disable-gnuthreads
68 CONFIGURE_OPTIONS += --enable-readline
69 CONFIGURE_OPTIONS += --enable-inicaching
70 CONFIGURE_OPTIONS += --enable-drivers=yes
71 CONFIGURE_OPTIONS += --enable-driver-conf=yes
72 CONFIGURE_OPTIONS += --enable-fdb
73 CONFIGURE_OPTIONS += --enable-odbctrace
74 CONFIGURE_OPTIONS += --enable-iconv
75 CONFIGURE_OPTIONS += --enable-stats
76 CONFIGURE_OPTIONS += --enable-rtldgroup
77 CONFIGURE_OPTIONS += --disable-ltdllib
78 CONFIGURE_OPTIONS += --without-pth
79 CONFIGURE_OPTIONS += --without-pth-test
80 CONFIGURE_OPTIONS += --with-libiconv-prefix=$(CONFIGURE_PREFIX)
81 CONFIGURE_OPTIONS += --disable-ltdl-install
82 CONFIGURE_OPTIONS += --with-pic
84 CONFIGURE_ENV += LD="$(CC) $(CFLAGS) $(LDFLAGS)"
85 CONFIGURE_ENV += INSTALL="$(INSTALL)"
87 PROTOPKGCONFIGDIR32 = $(PROTOUSRLIBDIR)/pkgconfig
88 PROTOPKGCONFIGDIR64 = $(PROTOUSRLIBDIR64)/pkgconfig
90 build: $(BUILD_32_and_64)
92 install: $(INSTALL_32_and_64)
93 $(MKDIR) $(PROTOPKGCONFIGDIR32)
94 $(MKDIR) $(PROTOPKGCONFIGDIR64)
95 $(GSED) -e "s#SED_SIZEOF_LONG#4#g" \
96 $(COMPONENT_DIR)/Solaris/unixODBC.pc > \
97 $(PROTOPKGCONFIGDIR32)/unixODBC.pc
98 $(GSED) -e "s#SED_SIZEOF_LONG#8#g" \
99 $(COMPONENT_DIR)/Solaris/unixODBC.pc > \
100 $(COMPONENT_DIR)/unixODBC.pc.1
101 $(GSED) -e 's#/lib#/lib/$(MACH64)#g' \
102 $(COMPONENT_DIR)/unixODBC.pc.1 > \
103 $(PROTOPKGCONFIGDIR64)/unixODBC.pc
104 $(RM) -f $(COMPONENT_DIR)/unixODBC.pc.1
106 test: $(TEST_32_and_64)
108 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
110 include ../../make-rules/depend.mk