Makefile revision 2080
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# CDDL HEADER START
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# The contents of this file are subject to the terms of the
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Common Development and Distribution License (the "License").
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# You may not use this file except in compliance with the License.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# or http://www.opensolaris.org/os/licensing.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# See the License for the specific language governing permissions
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# and limitations under the License.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# When distributing Covered Code, include this CDDL HEADER in each
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# If applicable, add the following below this CDDL HEADER, with the
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# fields enclosed by brackets "[]" replaced with your own identifying
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# information: Portions Copyright [yyyy] [name of copyright owner]
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# CDDL HEADER END
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinclude ../../make-rules/shared-macros.mk
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_NAME= hplip
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_VERSION= 3.12.4
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_PROJECT_URL= http://hplipopensource.com/hplip-web/
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_ARCHIVE_HASH= \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe sha256:350375c78d79adf635a59a448b27b3fe9ab7ac622637c47125fe5f7d8a537fff
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_ARCHIVE_URL= http://sourceforge.net/projects/hplip/files/hplip/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_BUGDB= utility/hplip
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinclude ../../make-rules/prep.mk
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinclude ../../make-rules/configure.mk
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinclude ../../make-rules/ips.mk
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# We need to be able to return from void functions
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCC += $(studio_FEATURES_EXTENSIONS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCXX += $(studio_FEATURES_EXTENSIONS) $(studio_NORUNPATH) $(studio_CXXLIB_CSTD)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTPPDCACHE = $(PROTO_DIR)/usr/lib/lp/caches/SUNWhpijs.cache
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# configure(1) options to use
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS += --localedir=$(CONFIGURE_LOCALEDIR)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS += --disable-pp-build
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS += --disable-gui-build
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_ENV += LDFLAGS=" -lnsl"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweHPLIP_VARIANT = $(BUILD_DIR)/$(MACH32)-hplip
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweHPIJS_VARIANT = $(BUILD_DIR)/$(MACH32)-hpijs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweVARIANTS = $(HPLIP_VARIANT) $(HPIJS_VARIANT)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# We build two variants: for the CUPS/SANE support
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# and for the HPIJS only support
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# use these options for the CUPS/SANE support
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --with-hpppddir=/usr/share/cups/model/SUNWhplip
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-fax-build
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-udev-acl-rules
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-hpcups-install
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-new-hpcups
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-cups-drv-install
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# use these options for the HPIJS only support
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-foomatic-ppd-install
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --with-hpppddir=/usr/share/ppd/SUNWhpijs/HP
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-cups-drv-install
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-hpcups-install
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-doc-build
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-hpijs-only-build
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-hpijs-install
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinstall: COMPONENT_INSTALL_ENV += halpredir=/etc/hal/fdi/preprobe/10osvendor
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_INSTALL_ARGS += -e
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_PRE_CONFIGURE_ACTION = \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe ($(CLONEY) $(SOURCE_DIR) $(@D))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Generate configuration scripts
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPLIP_VARIANT)/.built: COMPONENT_PREP_ACTION = \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe (cd $(@D) ; autoconf )
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Since it looks like you can't build HPLIP with both HPIJS and CUPS support
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# and seperate the HPIJS and CUPS PPD data, we need to replicate the code and
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# build it twice. Once for the HPIJS support used by LP and once for the rest
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# of the support used for CUPS and SANE.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowebuild: $(VARIANTS:%=%/.built)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinstall: $(VARIANTS:%=%/.installed)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) $(ROOTPPDCACHE)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(MKDIR) $(PROTO_DIR)/usr/lib/lp/caches
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe ($(ENV) VER="$(BUILD_DIR)/$(MACH32)-hpijs" \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe PPDSRC="$(PROTO_DIR)/usr/share/ppd/SUNWhpijs" \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe DONOTINSTALL="/dev/null" \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe CACHE="$(ROOTPPDCACHE)" \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe IPATH="/usr/share/ppd/$(BUILD_DIR)/" \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(KSH93) cache.ksh)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# empty test target
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowetest: $(NO_TESTS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinclude ../../make-rules/depend.mk
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe