usr/src/cmd/openwsman/Makefile.sfw
author Jon Tibble <meths@btinternet.com>
Fri, 10 Feb 2012 16:19:42 +0000
branchoi_151a
changeset 114 b6d40d0a7b17
parent 0 b34509ac961f
permissions -rw-r--r--
Added tag oi_151a_prestable1 for changeset b1282e88c680

#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#

#
# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident	"@(#)Makefile.sfw	1.1	09/03/11 SMI"

VER=$(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh)
VER64=$(VER)-64
TARBALL=$(VER).tar.bz2

include ../Makefile.cmd

CFLAGS += -features=extensions
CFLAGS64 += -features=extensions

CXXFLAGS = -xO3 -Qoption ccfe -features=no%conststrings $(CPPFLAGS) -features=extensions
CXXFLAGS64 = -xO3 -m64 -xarch=generic -Ui386 -U__i386 -compat=5  -Qoption ccfe -features=no%conststrings $(CPPFLAGS) -features=extensions

CCC += -norunpath

CONFIGURE_OPTIONS += --localstatedir=/var --sysconfdir=/etc

all: all32 all64

all32: $(VER)/config.status
	(cd $(VER); env - \
	    "CC=$(CC)" "CXX=$(CCC)" \
	    "CFLAGS=$(CFLAGS)" \
	    "CXXFLAGS=$(CXXFLAGS)" \
	    "PATH=$(SFW_PATH)" \
	    "ROOT=$(ROOT)" \
	    "MAKE=$(GMAKE)" \
	    $(GMAKE) all) 

all64: $(VER64)/config.status
	(cd $(VER64); env - \
	    "CC=$(CC)" "CXX=$(CCC)" \
	    "CFLAGS=$(CFLAGS64)" \
	    "CXXFLAGS=$(CXXFLAGS64)" \
	    "PATH=$(SFW_PATH)" \
	    "MACH64=$(MACH64)" \
	    "ROOT=$(ROOT)" \
	    "MAKE=$(GMAKE)" \
	    $(GMAKE) all)


$(VER)/config.status: $(VER)/configure
	(cd $(VER); env - \
	    "CC=$(CC)" "CXX=$(CCC)" \
	    "CFLAGS=$(CFLAGS)" \
	    "CXXFLAGS=$(CXXFLAGS)" \
	    "PATH=$(SFW_PATH)" \
	    "ROOT=$(ROOT)" \
	    "MAKE=$(GMAKE)" \
	    $(SHELL) ./configure $(CONFIGURE_OPTIONS))

$(VER64)/config.status: $(VER64)/configure
	(cd $(VER64); env - \
	    "CC=$(CC)" "CXX=$(CCC)" \
	    "CFLAGS=$(CFLAGS64)" \
	    "CXXFLAGS=$(CXXFLAGS64)" \
	    "PATH=$(SFW_PATH)" \
	    "MACH64=$(MACH64)" \
	    "ROOT=$(ROOT)" \
	    "MAKE=$(GMAKE)" \
	    $(SHELL) ./configure $(CONFIGURE_OPTIONS))


$(VER)/configure: $(TARBALL) 
	$(GTAR) xjpf $(TARBALL) --no-same-owner;
	(cd $(VER); \
	    $(GPATCH) -p1 < ../openwsman.patch; \
	    autoconf; )

$(VER64)/configure: $(TARBALL) 
	mkdir -p tmp; 
	(cd tmp; $(GTAR) xjpf ../$(TARBALL) --no-same-owner; )
	mv tmp/$(VER) $(VER64); rmdir tmp;
	(cd $(VER64); \
	    $(GPATCH) -p1 < ../openwsman.patch; \
	    autoconf; )

install: all
	BLDDIR=$(VER) $(SHELL) ./install-sfw
	MACH64=$(MACH64) BLDDIR=$(VER64) $(SHELL) ./install-sfw-64

clean:
	-rm -rf $(VER) $(VER64)

include ../Makefile.targ

FRC: