Makefile revision 2465
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas Gustafsson#
c13b8351b4dfb18806af4eb3c0fea240d83d1f82Andreas Gustafsson# CDDL HEADER START
c13b8351b4dfb18806af4eb3c0fea240d83d1f82Andreas Gustafsson#
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas Gustafsson# The contents of this file are subject to the terms of the
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas Gustafsson# Common Development and Distribution License (the "License").
c13b8351b4dfb18806af4eb3c0fea240d83d1f82Andreas Gustafsson# You may not use this file except in compliance with the License.
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas Gustafsson#
dd977047669f15fe3ea1a977871d7678cebf5082Andreas Gustafsson# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
dd977047669f15fe3ea1a977871d7678cebf5082Andreas Gustafsson# or http://www.opensolaris.org/os/licensing.
dd977047669f15fe3ea1a977871d7678cebf5082Andreas Gustafsson# See the License for the specific language governing permissions
dd977047669f15fe3ea1a977871d7678cebf5082Andreas Gustafsson# and limitations under the License.
dd977047669f15fe3ea1a977871d7678cebf5082Andreas Gustafsson#
a185ac41ac0627ec711d13bf6fdd8a830b753060Andreas Gustafsson# When distributing Covered Code, include this CDDL HEADER in each
dd977047669f15fe3ea1a977871d7678cebf5082Andreas Gustafsson# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
dd977047669f15fe3ea1a977871d7678cebf5082Andreas Gustafsson# If applicable, add the following below this CDDL HEADER, with the
dd977047669f15fe3ea1a977871d7678cebf5082Andreas Gustafsson# fields enclosed by brackets "[]" replaced with your own identifying
dd977047669f15fe3ea1a977871d7678cebf5082Andreas Gustafsson# information: Portions Copyright [yyyy] [name of copyright owner]
dd977047669f15fe3ea1a977871d7678cebf5082Andreas Gustafsson#
dd977047669f15fe3ea1a977871d7678cebf5082Andreas Gustafsson# CDDL HEADER END
dd977047669f15fe3ea1a977871d7678cebf5082Andreas Gustafsson#
a185ac41ac0627ec711d13bf6fdd8a830b753060Andreas Gustafsson# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas Gustafsson#
e9918d6a9df388b971a4805844165dd3fc3a88caAndreas Gustafssoninclude ../../make-rules/shared-macros.mk
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas Gustafsson
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas GustafssonPATH = /usr/gnu/bin:/usr/bin
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas Gustafsson
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas GustafssonCOMPONENT_NAME= pinentry
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas GustafssonCOMPONENT_VERSION= 0.7.6
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas GustafssonCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
0d50da49baa7d2d39146d46789d88053af5b1b50Michael SawyerCOMPONENT_PROJECT_URL= http://www.gnupg.org/related_software/pinentry/
0d50da49baa7d2d39146d46789d88053af5b1b50Michael SawyerCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas GustafssonCOMPONENT_ARCHIVE_HASH= \
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas Gustafsson sha256:14670c18f4a042ffcbd7a937aa3f15de392816c56b472588383d8378f65b42ab
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas GustafssonCOMPONENT_ARCHIVE_URL= ftp://ftp.gnupg.org/gcrypt/pinentry/$(COMPONENT_ARCHIVE)
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas GustafssonCOMPONENT_BUGDB= utility/gnupg
7beeb415ca3f1b230d35a8d385d99d2901cf9ff9Andreas Gustafsson
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas Gustafssoninclude ../../make-rules/prep.mk
7beeb415ca3f1b230d35a8d385d99d2901cf9ff9Andreas Gustafssoninclude ../../make-rules/configure.mk
7beeb415ca3f1b230d35a8d385d99d2901cf9ff9Andreas Gustafssoninclude ../../make-rules/ips.mk
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas Gustafsson
7beeb415ca3f1b230d35a8d385d99d2901cf9ff9Andreas GustafssonPATCH_LEVEL = 0
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas Gustafsson
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas Gustafsson# Enable C99 mode + -Xc for its additional warnings.
a185ac41ac0627ec711d13bf6fdd8a830b753060Andreas Gustafssonstudio_C99MODE = -Xc $(studio_C99_ENABLE)
a185ac41ac0627ec711d13bf6fdd8a830b753060Andreas Gustafsson
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas Gustafsson# -xinline=%auto -- we like inlining where appropriate
7beeb415ca3f1b230d35a8d385d99d2901cf9ff9Andreas GustafssonCFLAGS += -xinline=%auto
7beeb415ca3f1b230d35a8d385d99d2901cf9ff9Andreas Gustafsson
7beeb415ca3f1b230d35a8d385d99d2901cf9ff9Andreas Gustafsson# -xbuiltin=%none -- builtins have been known to be buggy
dd977047669f15fe3ea1a977871d7678cebf5082Andreas GustafssonCFLAGS += -xbuiltin=%none
# void function cannot return value, unless it's GNU C
CFLAGS += -features=extinl,extensions
CFLAGS += $(CPP_LARGEFILES)
CFLAGS += $(XPG6MODE)
CFLAGS += $(CPP_POSIX)
CFLAGS += $(CPP_C99_EXTENDED_MATH)
CFLAGS += $(studio_PIC)
# prevent libtool from removing these
LDFLAGS += -lsocket -lnsl -lpkcs11
LIBS = -lsocket -lnsl -lpkcs11
CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
CONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
CONFIGURE_ENV += INSTALL="$(INSTALL)"
CONFIGURE_ENV += LIBS="$(LIBS)"
CONFIGURE_OPTIONS += --localstatedir=/var
CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
CONFIGURE_OPTIONS += --enable-pinentry-curses
CONFIGURE_OPTIONS += --enable-pinentry-gtk2
CONFIGURE_OPTIONS += --disable-glibtest
CONFIGURE_OPTIONS += --disable-gtktest
CONFIGURE_OPTIONS += --enable-threading
CONFIGURE_OPTIONS += --disable-pinentry-gtk
CONFIGURE_OPTIONS += --disable-pinentry-qt
CONFIGURE_OPTIONS += --disable-ncurses
CONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
ASLR_MODE = $(ASLR_ENABLE)
build: $(BUILD_64)
install: $(INSTALL_64)
$(MKDIR) $(PROTOUSRLIBDIR)
if test -f $(PROTOUSRBINDIR)/pinentry-curses ; then \
$(MV) $(PROTOUSRBINDIR)/pinentry-curses $(PROTOUSRLIBDIR)/ ; fi
if test -f $(PROTOUSRBINDIR)/pinentry-gtk-2 ; then \
$(MV) $(PROTOUSRBINDIR)/pinentry-gtk-2 $(PROTOUSRLIBDIR)/ ; fi
cd $(PROTOUSRLIBDIR) && ln -sf pinentry-gtk-2 pinentry
test: $(NO_TESTS)
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
include ../../make-rules/depend.mk