Home | History | Annotate | Download | only in hal-cups-utils
      1 #
      2 # CDDL HEADER START
      3 #
      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.
      7 #
      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.
     12 #
     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]
     18 #
     19 # CDDL HEADER END
     20 #
     21 
     22 #
     23 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
     24 # Use is subject to license terms.
     25 #
     26 # ident	"@(#)Makefile.sfw	1.2	09/08/23 SMI"
     27 #
     28 
     29 include ../Makefile.cmd
     30 
     31 #
     32 # This value is generated based on the NAME and VERSION values in the METADATA
     33 # file in this directory.  You should not update it directly, instead update
     34 # the METADATA file values that it is derived from.
     35 #
     36 VER =		$(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh)
     37 TARBALL=$(VER).tar.gz
     38 PATCHES:sh=	find Patches -name '[0-9]*.patch' 2>/dev/null | sort -u
     39 MAN5FILES = hal-cups-utils.5
     40 
     41 
     42 ROOTPYTHONMODS = $(ROOTLIB)/python2.4/vendor-packages
     43 
     44 TARGET_ENV +=	PATH="$(SFW_PATH)"
     45 TARGET_ENV +=	CC="$(CC)"
     46 TARGET_ENV += 	CFLAGS="$(CFLAGS)"
     47 TARGET_ENV += 	LDFLAGS="$(LDFLAGS) $(LDLIBS)"
     48 TARGET_ENV += 	PYTHON="$(PYTHON)"
     49 TARGET_ENV += 	INSTALL="$(INSTALL_PROTO)"
     50 TARGET_ENV += 	DESTDIR="$(ROOT)"
     51 
     52 CONFIGURE_OPTIONS += --datarootdir=$(CFGETC)
     53 CONFIGURE_OPTIONS += --libexecdir=$(CFGLIB)/hal
     54 
     55 all:	$(VER)/config.status
     56 	(cd $(VER) ; env - $(TARGET_ENV) $(GMAKE) all )
     57 
     58 install:	all $(ROOTMAN5FILES)
     59 	(cd $(VER) ; env - $(TARGET_ENV) $(GMAKE) install )
     60 	# apply the file attributes from the packaging
     61 	for pkg in $(COMPONENT_PACKAGES:sh) ; do \
     62 		$(SRC)/tools/protofix --pkg $$pkg --perm ; \
     63 	done
     64 
     65 $(VER)/config.status:	$(VER)/.patched
     66 	(cd $(VER) ; env - $(TARGET_ENV) ./configure $(CONFIGURE_OPTIONS) )
     67 
     68 clean:
     69 	-rm -rf $(VER)
     70 
     71 $(ROOTMAN5)/%:	%
     72 	$(INS.file)
     73 
     74 
     75 include ../Makefile.targ
     76