Makefile revision 3661
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco#
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco# CDDL HEADER START
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco#
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco# The contents of this file are subject to the terms of the
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco# Common Development and Distribution License (the "License").
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco# You may not use this file except in compliance with the License.
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco#
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco# or http://www.opensolaris.org/os/licensing.
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco# See the License for the specific language governing permissions
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco# and limitations under the License.
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco#
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco# When distributing Covered Code, include this CDDL HEADER in each
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco# If applicable, add the following below this CDDL HEADER, with the
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco# fields enclosed by brackets "[]" replaced with your own identifying
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco# information: Portions Copyright [yyyy] [name of copyright owner]
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco#
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco# CDDL HEADER END
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco#
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco#
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscoinclude ../../make-rules/shared-macros.mk
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoPATH = /usr/gnu/bin:/usr/bin
9b1dea974e126ecb07a1f6d6cf9d2b637c8a47a0Lubos Kosco
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoCOMPONENT_NAME= pinentry
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoCOMPONENT_VERSION= 0.7.6
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoCOMPONENT_PROJECT_URL= http://www.gnupg.org/related_software/pinentry/
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoCOMPONENT_ARCHIVE_HASH= \
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco sha256:14670c18f4a042ffcbd7a937aa3f15de392816c56b472588383d8378f65b42ab
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoCOMPONENT_ARCHIVE_URL= ftp://ftp.gnupg.org/gcrypt/pinentry/$(COMPONENT_ARCHIVE)
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoCOMPONENT_BUGDB= utility/gnupg
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoTPNO= 8850
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscoinclude ../../make-rules/prep.mk
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscoinclude ../../make-rules/configure.mk
ff32508916722fc0e579f39b5bf22936116b8829Lubos Koscoinclude ../../make-rules/ips.mk
981e542f40f5acaf95b69c5854e5ffb080204242Lubos Kosco
ff32508916722fc0e579f39b5bf22936116b8829Lubos KoscoPATCH_LEVEL = 0
ff32508916722fc0e579f39b5bf22936116b8829Lubos Kosco
d2b27f3d647af6fca607f14cb9296cc61c64b5b7Knut Anders Hatlen# Enable C99 mode + -Xc for its additional warnings.
d2b27f3d647af6fca607f14cb9296cc61c64b5b7Knut Anders Hatlenstudio_C99MODE = -Xc $(studio_C99_ENABLE)
d2b27f3d647af6fca607f14cb9296cc61c64b5b7Knut Anders Hatlen
d2b27f3d647af6fca607f14cb9296cc61c64b5b7Knut Anders Hatlen# -xinline=%auto -- we like inlining where appropriate
d2b27f3d647af6fca607f14cb9296cc61c64b5b7Knut Anders HatlenCFLAGS += -xinline=%auto
d2b27f3d647af6fca607f14cb9296cc61c64b5b7Knut Anders Hatlen
d2b27f3d647af6fca607f14cb9296cc61c64b5b7Knut Anders Hatlen# -xbuiltin=%none -- builtins have been known to be buggy
d2b27f3d647af6fca607f14cb9296cc61c64b5b7Knut Anders HatlenCFLAGS += -xbuiltin=%none
ff32508916722fc0e579f39b5bf22936116b8829Lubos Kosco
981e542f40f5acaf95b69c5854e5ffb080204242Lubos Kosco# void function cannot return value, unless it's GNU C
ff32508916722fc0e579f39b5bf22936116b8829Lubos KoscoCFLAGS += -features=extinl,extensions
ff32508916722fc0e579f39b5bf22936116b8829Lubos Kosco
d2b27f3d647af6fca607f14cb9296cc61c64b5b7Knut Anders HatlenCFLAGS += $(CPP_LARGEFILES)
9b1dea974e126ecb07a1f6d6cf9d2b637c8a47a0Lubos KoscoCFLAGS += $(XPG6MODE)
9b1dea974e126ecb07a1f6d6cf9d2b637c8a47a0Lubos KoscoCFLAGS += $(CPP_POSIX)
d2b27f3d647af6fca607f14cb9296cc61c64b5b7Knut Anders HatlenCFLAGS += $(CPP_C99_EXTENDED_MATH)
d2b27f3d647af6fca607f14cb9296cc61c64b5b7Knut Anders HatlenCFLAGS += $(studio_PIC)
d2b27f3d647af6fca607f14cb9296cc61c64b5b7Knut Anders Hatlen
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco# prevent libtool from removing these
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoLDFLAGS += -lsocket -lnsl -lpkcs11
9b1dea974e126ecb07a1f6d6cf9d2b637c8a47a0Lubos KoscoLIBS = -lsocket -lnsl -lpkcs11
9b1dea974e126ecb07a1f6d6cf9d2b637c8a47a0Lubos Kosco
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoCONFIGURE_ENV += CFLAGS="$(CFLAGS)"
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoCONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoCONFIGURE_ENV += INSTALL="$(INSTALL)"
9b1dea974e126ecb07a1f6d6cf9d2b637c8a47a0Lubos KoscoCONFIGURE_ENV += LIBS="$(LIBS)"
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco
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
ASLR_MODE = $(ASLR_ENABLE)
build: $(BUILD_32)
install: $(INSTALL_32)
$(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