Makefile revision 80ab886d233f514d54c2a6bdeb9fdfd951bd6881
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# CDDL HEADER START
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# The contents of this file are subject to the terms of the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Common Development and Distribution License (the "License").
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# You may not use this file except in compliance with the License.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# or http://www.opensolaris.org/os/licensing.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# See the License for the specific language governing permissions
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# and limitations under the License.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# When distributing Covered Code, include this CDDL HEADER in each
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# If applicable, add the following below this CDDL HEADER, with the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# fields enclosed by brackets "[]" replaced with your own identifying
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# CDDL HEADER END
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Use is subject to license terms.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# ident "%Z%%M% %I% %E% SMI"
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Note: Hidden command and dependency checking plays havoc with perl module
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# makefiles, so we make sure to always unset the KEEP_STATE and
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# SUNPRO_DEPENDENCIES environment variables before calling any subsidiary makes.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync.KEEP_STATE:
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncinclude ../../Makefile.cmd
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# To turn KEEP_STATE off the following two environment variables must be unset.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncKEEP_STATE_OFF = unset KEEP_STATE SUNPRO_DEPENDENCIES
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Configuration files needed from the architecture-specific subdirectories.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncMACH_CONFIG_FILES = config.sh
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Where the configuration files need to be copied to.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncDISTRIB_CONFIG_FILES = $(MACH_CONFIG_FILES:%=distrib/%)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Generated Makefiles, derived from config.sh.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncGEN_MAKEFILES = Makefile.perlcfg distrib/ext/Makefile
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncall := TARGET = all
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncinstall := TARGET = install
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncclobber := TARGET = clobber
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncclean := TARGET = clean
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsynctest := TARGET = test
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Compiler replacement rules
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncSED_CC = -e "s!'cc'!'$(CC) -_gcc=-w'!"
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncSED_CC_E = -e "s!'cc -E'!'$(REAL_CC) -E'!"
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# distrib holds the perl source, contrib holds the SMI modules.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncall clean test: configure FRC
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync @ cd distrib; pwd; $(KEEP_STATE_OFF); $(MAKE) $(TARGET)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync @ cd contrib; pwd; $(KEEP_STATE_OFF); $(MAKE) $(TARGET)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# distrib/Makefile copies both distrib and contrib to the proto area.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncinstall: all
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync @ cd distrib; pwd; $(KEEP_STATE_OFF); $(MAKE) install_files
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncconfigure: $(DISTRIB_CONFIG_FILES) $(GEN_MAKEFILES)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Modify config.sh to refer to the compiler used for the build.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncdistrib/config.sh: $(MACH)/config.sh
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync $(SED) $(SED_CC) $(SED_CC_E) $(MACH)/config.sh > $@
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncMakefile.perlcfg: extract_config $(MACH)/config.sh
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync ./extract_config $(MACH)/config.sh > Makefile.perlcfg
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncdistrib/ext/Makefile: extract_makeext $(MACH)/config.sh
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync ./extract_makeext $(MACH)/config.sh > distrib/ext/Makefile
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync.PARALLEL: extract_config extract_makeext distrib/config.sh Makefile.perlcfg \
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync distrib/ext/Makefile
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Subsidiary makefiles include the generated Makefiles,
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# so make sure they exist first and then delete them afterwards.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncclobber: $(GEN_MAKEFILES) FRC
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync @ cd distrib; pwd; $(KEEP_STATE_OFF); $(MAKE) $(TARGET)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync @ cd contrib; pwd; $(KEEP_STATE_OFF); $(MAKE) $(TARGET)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync - $(RM) $(DISTRIB_CONFIG_FILES) $(GEN_MAKEFILES) \
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync extract_config extract_makeext
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncFRC:
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync