Makefile revision 324
e8555412f186ad05a064591bcb25c2f7d7395756Mark Andrews#
e8555412f186ad05a064591bcb25c2f7d7395756Mark Andrews#
f5b0ad3c8d4b665037b4eeda2fc24547c698c012Witold Krecicki# CDDL HEADER START
f5b0ad3c8d4b665037b4eeda2fc24547c698c012Witold Krecicki#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# The contents of this file are subject to the terms of the
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Common Development and Distribution License (the "License").
50a3eae6cf9a401ea70f5e81579f14f829f3e457Mark Andrews# You may not use this file except in compliance with the License.
50a3eae6cf9a401ea70f5e81579f14f829f3e457Mark Andrews#
50a3eae6cf9a401ea70f5e81579f14f829f3e457Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# or http://www.opensolaris.org/os/licensing.
8d49a1a0d1658952181cc686fc4dc62006baa1a7Mark Andrews# See the License for the specific language governing permissions
8d49a1a0d1658952181cc686fc4dc62006baa1a7Mark Andrews# and limitations under the License.
8d49a1a0d1658952181cc686fc4dc62006baa1a7Mark Andrews#
97e13cc244a1fc67fd42c421c92ccead5e38a2f5Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
97e13cc244a1fc67fd42c421c92ccead5e38a2f5Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
97e13cc244a1fc67fd42c421c92ccead5e38a2f5Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
9f5443280fcfd625a06f63a1b457ed2335840278Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
9f5443280fcfd625a06f63a1b457ed2335840278Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
c1a72112b2391bd8f149c5f19bdb12fa0d39fef4Mark Andrews#
c1a72112b2391bd8f149c5f19bdb12fa0d39fef4Mark Andrews# CDDL HEADER END
c1a72112b2391bd8f149c5f19bdb12fa0d39fef4Mark Andrews#
c1a72112b2391bd8f149c5f19bdb12fa0d39fef4Mark Andrews# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
4840ef4581a577a29a18d180b6bc2e7355378ed7Mark Andrews#
4840ef4581a577a29a18d180b6bc2e7355378ed7Mark Andrewsinclude ../../make-rules/shared-macros.mk
7d262a3647a517a86d6d83058aedd18b7a6b06dfMark Andrews
990494909886f2cef94d3874f4dc4add03cece81Mark AndrewsCOMPONENT_NAME= hplip
7d262a3647a517a86d6d83058aedd18b7a6b06dfMark AndrewsCOMPONENT_VERSION= 3.10.9
f4c0d8db2b1a14e62660fa92f8aaf614b99d7f2fWitold KrecickiCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
96d49a84fff54fe19b430c56912db0a55cf3ded8Mark AndrewsCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
96d49a84fff54fe19b430c56912db0a55cf3ded8Mark AndrewsCOMPONENT_ARCHIVE_HASH= sha1:5e145eafefbc5122bbe98345f2984fc0a55e5787
f4c0d8db2b1a14e62660fa92f8aaf614b99d7f2fWitold KrecickiCOMPONENT_ARCHIVE_URL= http://sourceforge.net/projects/hplip/files/hplip/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
10966da999f8f7f364418aa446d8ead9c8a761cfMark Andrews
10966da999f8f7f364418aa446d8ead9c8a761cfMark Andrewsinclude ../../make-rules/prep.mk
f4c0d8db2b1a14e62660fa92f8aaf614b99d7f2fWitold Krecickiinclude ../../make-rules/configure.mk
047e477d27b7faa9a063fde549e2b2c141f2291bWitold Krecickiinclude ../../make-rules/ips.mk
f4c0d8db2b1a14e62660fa92f8aaf614b99d7f2fWitold Krecicki
322efcb27d26cb5949ceabf6d3b93d0a2e25746fWitold Krecicki# We need to be able to return from void functions
322efcb27d26cb5949ceabf6d3b93d0a2e25746fWitold KrecickiCC += $(studio_FEATURES_EXTENSIONS)
4681ab1fc2c40e1d70fae38e64630c72c51c300eWitold KrecickiCXX += $(studio_FEATURES_EXTENSIONS) $(studio_NORUNPATH) $(studio_LIBRARY_NONE)
4681ab1fc2c40e1d70fae38e64630c72c51c300eWitold Krecicki
4681ab1fc2c40e1d70fae38e64630c72c51c300eWitold KrecickiROOTPPDCACHE = $(PROTO_DIR)/usr/lib/lp/caches/SUNWhpijs.cache
4681ab1fc2c40e1d70fae38e64630c72c51c300eWitold Krecicki
4681ab1fc2c40e1d70fae38e64630c72c51c300eWitold Krecicki# configure(1) options to use
b56bd9b59f590ade778ac6621fb5bede4001d8aeMark AndrewsCONFIGURE_OPTIONS += --localedir=$(CONFIGURE_LOCALEDIR)
b56bd9b59f590ade778ac6621fb5bede4001d8aeMark AndrewsCONFIGURE_OPTIONS += --disable-pp-build
b56bd9b59f590ade778ac6621fb5bede4001d8aeMark AndrewsCONFIGURE_OPTIONS += --disable-gui-build
96beefd76f597b77d4fcd51f8d766e5e59a2d216Mark Andrews
96beefd76f597b77d4fcd51f8d766e5e59a2d216Mark AndrewsCONFIGURE_ENV += LDFLAGS=" -lnsl"
3f06b888ae80a8724b300ab39a4276537b0241cdWitold Krecicki
3f06b888ae80a8724b300ab39a4276537b0241cdWitold KrecickiHPLIP_VARIANT = $(BUILD_DIR)/$(MACH32)-hplip
3f06b888ae80a8724b300ab39a4276537b0241cdWitold KrecickiHPIJS_VARIANT = $(BUILD_DIR)/$(MACH32)-hpijs
948fe5822b9c8489856bc38b3063e30e9d34fcd3Mark Andrews
948fe5822b9c8489856bc38b3063e30e9d34fcd3Mark AndrewsVARIANTS = $(HPLIP_VARIANT) $(HPIJS_VARIANT)
948fe5822b9c8489856bc38b3063e30e9d34fcd3Mark Andrews
ecff557eebd67a717ab6fd3323af27363ee3273dMark Andrews# We build two variants: for the CUPS/SANE support
ecff557eebd67a717ab6fd3323af27363ee3273dMark Andrews# and for the HPIJS only support
ecff557eebd67a717ab6fd3323af27363ee3273dMark Andrews
fbc50678e18eced2c1324bd968e77d4d7737d0caMark Andrews# use these options for the CUPS/SANE support
fbc50678e18eced2c1324bd968e77d4d7737d0caMark Andrews$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --with-hpppddir=/usr/share/cups/model/SUNWhplip
fbc50678e18eced2c1324bd968e77d4d7737d0caMark Andrews$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-fax-build
fbc50678e18eced2c1324bd968e77d4d7737d0caMark Andrews$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-udev-acl-rules
c2afbab9dc8de73c85b32624a8364bc7532d1fa9Witold Krecicki$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-hpcups-install
c2afbab9dc8de73c85b32624a8364bc7532d1fa9Witold Krecicki$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-new-hpcups
c2afbab9dc8de73c85b32624a8364bc7532d1fa9Witold Krecicki$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-cups-drv-install
51ec0decc11beda6b903fbfa18c35edef09ad5feWitold Krecicki
51ec0decc11beda6b903fbfa18c35edef09ad5feWitold Krecicki# use these options for the HPIJS only support
3d0b7d5cc3428dedf4486e949fbd536eef494b99Evan Hunt$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-foomatic-ppd-install
3d0b7d5cc3428dedf4486e949fbd536eef494b99Evan Hunt$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --with-hpppddir=/usr/share/ppd/SUNWhpijs/HP
3d0b7d5cc3428dedf4486e949fbd536eef494b99Evan Hunt$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-cups-drv-install
3d0b7d5cc3428dedf4486e949fbd536eef494b99Evan Hunt$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-hpcups-install
3d0b7d5cc3428dedf4486e949fbd536eef494b99Evan Hunt$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-doc-build
3d0b7d5cc3428dedf4486e949fbd536eef494b99Evan Hunt$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-hpijs-only-build
9268297baa1429d8851c36972d918dde66544746Mark Andrews$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-hpijs-install
9268297baa1429d8851c36972d918dde66544746Mark Andrews
9268297baa1429d8851c36972d918dde66544746Mark Andrewsinstall: COMPONENT_INSTALL_ENV += halpredir=/etc/hal/fdi/preprobe/10osvendor
9268297baa1429d8851c36972d918dde66544746Mark Andrews
d7ab0204e26098847232548f03833e185db0b99fMark AndrewsCOMPONENT_INSTALL_ARGS += -e
d7ab0204e26098847232548f03833e185db0b99fMark Andrews
d7ab0204e26098847232548f03833e185db0b99fMark AndrewsCOMPONENT_PRE_CONFIGURE_ACTION = \
aabcb1fde0ca255ff30f0a5c10cbd39f798cc5b7Mark Andrews ($(CLONEY) $(SOURCE_DIR) $(@D))
aabcb1fde0ca255ff30f0a5c10cbd39f798cc5b7Mark Andrews
aabcb1fde0ca255ff30f0a5c10cbd39f798cc5b7Mark Andrews# Generate configuration scripts
aabcb1fde0ca255ff30f0a5c10cbd39f798cc5b7Mark Andrews$(HPLIP_VARIANT)/.built: COMPONENT_PREP_ACTION = \
7a00d69909ace5dc11bcff9c1e07c311f92a7f8eWitold Krecicki (cd $(@D) ; autoconf )
7a00d69909ace5dc11bcff9c1e07c311f92a7f8eWitold Krecicki
7a00d69909ace5dc11bcff9c1e07c311f92a7f8eWitold KrecickiBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
7a00d69909ace5dc11bcff9c1e07c311f92a7f8eWitold Krecicki
7a00d69909ace5dc11bcff9c1e07c311f92a7f8eWitold Krecicki#
7a00d69909ace5dc11bcff9c1e07c311f92a7f8eWitold Krecicki# Since it looks like you can't build HPLIP with both HPIJS and CUPS support
7a00d69909ace5dc11bcff9c1e07c311f92a7f8eWitold Krecicki# and seperate the HPIJS and CUPS PPD data, we need to replicate the code and
7a00d69909ace5dc11bcff9c1e07c311f92a7f8eWitold Krecicki# build it twice. Once for the HPIJS support used by LP and once for the rest
ac110848296c18b3a3bfaa89bdee2dd00755b36fMark Andrews# of the support used for CUPS and SANE.
ac110848296c18b3a3bfaa89bdee2dd00755b36fMark Andrews#
ac110848296c18b3a3bfaa89bdee2dd00755b36fMark Andrewsbuild: $(VARIANTS:%=%/.built)
ac110848296c18b3a3bfaa89bdee2dd00755b36fMark Andrews
ede52ba98d02bc1ac4483a77d403ff1d64a003ceMark Andrewsinstall: $(VARIANTS:%=%/.installed)
ede52ba98d02bc1ac4483a77d403ff1d64a003ceMark Andrews $(RM) $(ROOTPPDCACHE)
a0f5a5e3c5c6dd29b18bc06fea0d02ae7fc24ac9Mark Andrews $(MKDIR) $(PROTO_DIR)/usr/lib/lp/caches
a0f5a5e3c5c6dd29b18bc06fea0d02ae7fc24ac9Mark Andrews ($(ENV) VER="$(BUILD_DIR)/$(MACH32)-hpijs" \
0cbe448914be61d0f92b1e9d3adaeba87d25639dEvan Hunt PPDSRC="$(PROTO_DIR)/usr/share/ppd/SUNWhpijs" \
0cbe448914be61d0f92b1e9d3adaeba87d25639dEvan Hunt DONOTINSTALL="/dev/null" \
0cbe448914be61d0f92b1e9d3adaeba87d25639dEvan Hunt CACHE="$(ROOTPPDCACHE)" \
0cbe448914be61d0f92b1e9d3adaeba87d25639dEvan Hunt IPATH="/usr/share/ppd/$(BUILD_DIR)/" \
0cbe448914be61d0f92b1e9d3adaeba87d25639dEvan Hunt $(KSH93) cache.ksh)
9dede25430218a1f683dfef36f04ac7cf5bbd9e8Mark Andrews
10f8dc8456ba073fdb2bfc5168d78de574debeeeMark Andrews# empty test target
9dede25430218a1f683dfef36f04ac7cf5bbd9e8Mark Andrewstest: $(NO_TESTS)
88699327de812fdd5beeb68b06ea45000fca2175Mark Andrews
53a70bef3508acb1517b8eb57f61a81280c11509Mark Andrewsinclude ../../make-rules/depend.mk
d3600bb89d32a7e0d943691d3cad5c569ef6158dMark Andrews