1 # 2 # 3 # CDDL HEADER START 4 # 5 # The contents of this file are subject to the terms of the 6 # Common Development and Distribution License (the "License"). 7 # You may not use this file except in compliance with the License. 8 # 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 # or http://www.opensolaris.org/os/licensing. 11 # See the License for the specific language governing permissions 12 # and limitations under the License. 13 # 14 # When distributing Covered Code, include this CDDL HEADER in each 15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 # If applicable, add the following below this CDDL HEADER, with the 17 # fields enclosed by brackets "[]" replaced with your own identifying 18 # information: Portions Copyright [yyyy] [name of copyright owner] 19 # 20 # CDDL HEADER END 21 # 22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23 # Use is subject to license terms. 24 # 25 #ident "@(#)Makefile.sfw 1.3 09/08/21 SMI" 26 27 include ../Makefile.cmd 28 29 VER=$(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh) 30 TARBALL=$(VER).tar.bz2 31 PATCHES= Patches/utf8.01 32 GPATCH_FLAGS= -p1 33 34 INSTALL=/usr/bin/ginstall 35 36 CFLAGS += $(XPG6MODE) -xstrconst 37 38 all: $(VER)/config.status 39 (cd $(VER); env - \ 40 PATH=$(SFW_PATH) \ 41 CC=$(CC) \ 42 "CFLAGS=$(CFLAGS)" \ 43 MAKE=$(CCSMAKE) \ 44 INSTALL="$(INSTALL) -c" \ 45 $(CCSMAKE)) 46 47 install: all 48 (cd $(VER)/po; env - \ 49 PATH=$(SFW_PATH) \ 50 CC=$(CC) \ 51 "CFLAGS=$(CFLAGS)" \ 52 MAKE=$(CCSMAKE) \ 53 DESTDIR=$(ROOT) \ 54 INSTALL="$(INSTALL) -c" \ 55 $(CCSMAKE) install) 56 $(SH) ./install-sfw $(COMPONENT_NAME:sh) $(COMPONENT_VERSION:sh) 57 58 test: all 59 (cd $(VER)/testsuite; env MAKE=$(GMAKE) $(GMAKE) runtests) 60 (cd $(VER)/testsuite; env MAKE=$(GMAKE) ./runtests) 61 62 # for configure, use default --prefix in Makefile.master 63 64 $(VER)/config.status: $(VER)/configure 65 (cd $(VER); env - \ 66 PATH=$(SFW_PATH) \ 67 CC=$(CC) \ 68 "CFLAGS=$(CFLAGS)" \ 69 INSTALL="$(INSTALL) -c" \ 70 MAKE=$(CCSMAKE) \ 71 ./configure $(CONFIGURE_OPTIONS)) 72 73 $(VER)/configure: $(VER)/.patched 74 75 clean: 76 -rm -rf $(VER) 77 78 include ../Makefile.targ 79