usr/src/cmd/ofusr/libmlx4/Makefile.sfw
author Cyril Plisko <cyril.plisko@grigale.com>
Mon, 21 Mar 2011 01:49:39 -0800
changeset 72 82bde2a81435
parent 50 6100357dc4bc
permissions -rw-r--r--
Import sfw build 162 Bugs Fixed ---------- 7021535 remove bison runtime bits from SUNWgccruntime 7023530 remove even more things from sfw 7023710 net-ssleay 1.35 in SFW does not build with OpenSSL 1.0.0 7024341 emacs doesn't build on 160

#
#
# 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 (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
#
# ident	"@(#)Makefile.sfw	1.2	11/03/08 SMI"

VER=$(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh)

include ../../Makefile.cmd


CPPFLAGS +=	"-Wformat=2"
CONFIGURE_ENV +=	PATH=$(SFW_PATH)
CONFIGURE_ENV +=	MAKE=$(GMAKE)
CONFIGURE_ENV +=	CPPFLAGS="$(CPPFLAGS)"
CONFIGURE_ENV +=	INSTALL=/usr/ucb/install

CONFIGURE_OPTIONS +=	--disable-libcheck
CONFIGURE_OPTIONS +=	--disable-static

$(VER)/build-32/config.status:=	CONFIGURE_ENV +=	CFLAGS="-m32 -D_REENTRANT"
$(VER)/build-32/config.status:=	CONFIGURE_ENV +=	LD_LIBRARY_PATH="$(ROOTLIB)"
$(VER)/build-32/config.status:=	CONFIGURE_ENV +=	LDFLAGS="-L$(ROOTLIB)"

$(VER)/build-64/config.status:=	CONFIGURE_ENV +=	CFLAGS="-m64 -D_REENTRANT"
$(VER)/build-64/config.status:=	CONFIGURE_ENV +=	LD_LIBRARY_PATH="$(ROOTLIB64)"
$(VER)/build-64/config.status:=	CONFIGURE_ENV +=	LDFLAGS="-L$(ROOTLIB64)"
$(VER)/build-64/config.status:=	CONFIGURE_OPTIONS +=	--bindir=$(CFGBIN64)
$(VER)/build-64/config.status:=	CONFIGURE_OPTIONS +=	--libdir=$(CFGLIB64)

CPPFLAGS +=	-I$(ROOT)/usr/include

COMMON_ENV +=	MAKE=$(GMAKE)
COMMON_ENV +=	mkdir_p="/usr/gnu/bin/mkdir -p"

BUILD_ENV +=		CPPFLAGS="$(CPPFLAGS)"

INSTALL_ENV +=		INSTALL=$(INSTALL_PROTO)
INSTALL_ENV +=		MANSCRIPT=$(COMPONENT_TOP)/../manscript

INSTALL_TARGETS +=	DESTDIR=$(ROOT)
INSTALL_TARGETS +=	install

all:		$(VER)/build-32/.built $(VER)/build-64/.built

install:	$(VER)/build-32/.installed $(VER)/build-64/.installed
	$(RM) $(ROOTLIB)/$(COMPONENT_NAME:sh).la \
		$(ROOTLIB64)/$(COMPONENT_NAME:sh).la

$(VER)/build-%/.installed:	$(VER)/build-%/.built
	(cd $(@D) ; $(ENV) $(COMMON_ENV) $(INSTALL_ENV) gmake $(INSTALL_TARGETS))
	$(TOUCH) $@

$(VER)/build-%/.built:	$(VER)/build-%/config.status
	(cd $(@D) ; $(ENV) $(COMMON_ENV) $(BUILD_ENV) gmake $(BUILD_TARGETS))
	$(TOUCH) $@

$(VER)/build-%/config.status:	$(VER)/configure
	-$(RM) -r $(@D) ; $(MKDIR) $(@D)
	(cd $(@D) ; $(ENV) $(CONFIGURE_ENV) \
		$(CONFIG_SHELL) ../configure $(CONFIGURE_OPTIONS))
	$(TOUCH) $@

prep:	$(VER)/configure

$(VER)/configure:	$(VER).tar.gz
	$(GTAR) zxpf $(VER).tar.gz
	$(GPATCH) -p1 -d $(@D) <base.patch
	$(TOUCH) $@

clean:
	-$(RM) -r $(VER)

include ../../Makefile.targ