Makefile revision fb9f9b975cb9214fec5dab37d461199adab9b964
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore#
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# CDDL HEADER START
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore#
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# The contents of this file are subject to the terms of the
52671ce4f644d565b2acd71a8ce4f6d20829a67cAdam Moore# Common Development and Distribution License, Version 1.0 only
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# (the "License"). You may not use this file except in compliance
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# with the License.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore#
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# or http://www.opensolaris.org/os/licensing.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# See the License for the specific language governing permissions
02fc09f797e83e80199c96adc4751c230dccc973Adam Moore# and limitations under the License.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore#
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# When distributing Covered Code, include this CDDL HEADER in each
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
52671ce4f644d565b2acd71a8ce4f6d20829a67cAdam Moore# If applicable, add the following below this CDDL HEADER, with the
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# fields enclosed by brackets "[]" replaced with your own identifying
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# information: Portions Copyright [yyyy] [name of copyright owner]
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore#
c4f19796d319a7ec9a1e76d48adc82c9c5ae2f27Adam Moore# CDDL HEADER END
08e054017132cdd838955bc0af15889f1f2a7b42Adam Moore#
b46f3d670b654847b0ce60afdba1b461c492a5c9Adam Moore#
b46f3d670b654847b0ce60afdba1b461c492a5c9Adam Moore# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
b46f3d670b654847b0ce60afdba1b461c492a5c9Adam Moore# Use is subject to license terms.
08e054017132cdd838955bc0af15889f1f2a7b42Adam Moore#
52671ce4f644d565b2acd71a8ce4f6d20829a67cAdam Moore# ident "%Z%%M% %I% %E% SMI"
52671ce4f644d565b2acd71a8ce4f6d20829a67cAdam Moore#
52671ce4f644d565b2acd71a8ce4f6d20829a67cAdam Moore# include global definitions
52671ce4f644d565b2acd71a8ce4f6d20829a67cAdam Mooreinclude ../Makefile.master
52671ce4f644d565b2acd71a8ce4f6d20829a67cAdam Moore
52671ce4f644d565b2acd71a8ce4f6d20829a67cAdam Moore#
9c42541e375e7bb70c53012b3012d70f1a380254Adam Moore# List of architectures to build as part of the standard build.
9c42541e375e7bb70c53012b3012d70f1a380254Adam Moore#
9c42541e375e7bb70c53012b3012d70f1a380254Adam Moore# Note that sparc must trail the individual platforms so that sparc
9c42541e375e7bb70c53012b3012d70f1a380254Adam Moore# lint targets will have the unix lint libraries to compare against.
9c42541e375e7bb70c53012b3012d70f1a380254Adam Moore#
9c42541e375e7bb70c53012b3012d70f1a380254Adam Mooresparc_ARCHITECTURES = sun4v sun4u sparc
9c42541e375e7bb70c53012b3012d70f1a380254Adam Moore
02fc09f797e83e80199c96adc4751c230dccc973Adam Moorei386_ARCHITECTURES = i86pc
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moorei386_ARCHITECTURES += intel
2690c090ce850e485d15cf691f59e8aaeb3b4bb1Adam Moore
8aa0880cd494c951e0f4aa7d82d8bdac7692c7d0Adam Mooredef := TARGET= def
8aa0880cd494c951e0f4aa7d82d8bdac7692c7d0Adam Mooreall := TARGET= all
8aa0880cd494c951e0f4aa7d82d8bdac7692c7d0Adam Mooreinstall := TARGET= install
abdfe7cf11d34f89f17b26e4779bf6079d22a910Adam Mooreinstall_h := TARGET= install_h
80d2034f65b9348e5fd36291f03b0819181efb89Adam Mooreclean := TARGET= clean
80d2034f65b9348e5fd36291f03b0819181efb89Adam Mooreclobber := TARGET= clobber
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moorelint := TARGET= lint
80d2034f65b9348e5fd36291f03b0819181efb89Adam Mooreclean.lint := TARGET= clean.lint
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moorecheck := TARGET= check
80d2034f65b9348e5fd36291f03b0819181efb89Adam Mooremodlist := TARGET= modlist
80d2034f65b9348e5fd36291f03b0819181efb89Adam Mooremodlist := NO_STATE= -K $$MODSTATE$$$$
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore
2690c090ce850e485d15cf691f59e8aaeb3b4bb1Adam Moore.KEEP_STATE:
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore
2690c090ce850e485d15cf691f59e8aaeb3b4bb1Adam Mooredef all lint: all_h $(PMTMO_FILE) $($(MACH)_ARCHITECTURES)
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore
80d2034f65b9348e5fd36291f03b0819181efb89Adam Mooreinstall: all_h install_dirs $(PMTMO_FILE) $($(MACH)_ARCHITECTURES)
abdfe7cf11d34f89f17b26e4779bf6079d22a910Adam Moore
80d2034f65b9348e5fd36291f03b0819181efb89Adam Mooreclean clobber: $($(MACH)_ARCHITECTURES)
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore @if [ '$(PATCH_BUILD)' != '#' ] ; then \
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore echo $(RM) $(PMTMO_FILE) ; \
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore $(RM) $(PMTMO_FILE) ; \
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore fi
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore
80d2034f65b9348e5fd36291f03b0819181efb89Adam Mooreclean.lint modlist: $($(MACH)_ARCHITECTURES)
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore
80d2034f65b9348e5fd36291f03b0819181efb89Adam Mooreinstall_dirs:
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore @cd ..; pwd; $(MAKE) rootdirs
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore @pwd
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore$($(MACH)_ARCHITECTURES): FRC
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore$(PMTMO_FILE) pmtmo_file: $(PATCH_MAKEUP_TABLE)
abdfe7cf11d34f89f17b26e4779bf6079d22a910Adam Moore @if [ -z "$(PATCH_MAKEUP_TABLE)" ] ; then \
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore echo 'ERROR: $$(PATCH_MAKEUP_TABLE) not set' \
abdfe7cf11d34f89f17b26e4779bf6079d22a910Adam Moore 'in environment' >&2 ; \
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore exit 1 ; \
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore fi
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore RELEASE="$(RELEASE)" MACH="$(MACH)" \
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moore $(CTFCVTPTBL) -o $(PMTMO_FILE) $(PATCH_MAKEUP_TABLE)
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moore
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore#
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# The following is the list of directories which contain Makefiles with
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# targets to install header file. The machine independent headers are
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# installed by invoking the Makefile in the directory containing the
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# header files. Machine and architecture dependent headers are installed
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# by invoking the main makefile for that architecture/machine which,
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# in turn, is responsible for invoking the Makefiles which install headers.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# It is done this way so as not to assume that all of the header files in
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# the architecture/machine dependent subdirectories are in completely
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# isomorphic locations.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore#
80d2034f65b9348e5fd36291f03b0819181efb89Adam MooreCOMMON_HDRDIRS= common/des common/fs common/gssapi common/inet common/net \
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moore common/netinet common/nfs common/rpc common/sys common/vm \
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moore common/c2 common/pcmcia/sys common/rpcsvc common/inet/kssl \
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moore common/inet/nca common/ipp
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moore
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moore# These aren't the only headers in closed. But the other directories
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moore# are simple enough that they can be driven from the src tree.
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moore$(CLOSED_BUILD)COMMON_HDRDIRS += $(CLOSED)/uts/common/sys
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moore
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Mooresparc_HDRDIRS= sun/sys
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moorei386_HDRDIRS= i86pc/vm
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moore
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam MooreHDRDIRS= $(COMMON_HDRDIRS) $($(MACH)_HDRDIRS)
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Mooreinstall_h check: $(HDRDIRS) $($(MACH)_ARCHITECTURES)
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore$(HDRDIRS): FRC
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore @cd $@; pwd; $(MAKE) $(TARGET)
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# ensures that headers made by rpcgen and others are available in uts source
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# for kernel builds to reference without building install_h
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore#
80d2034f65b9348e5fd36291f03b0819181efb89Adam Mooreall_h: FRC
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore @cd common/sys; pwd; $(MAKE) $@
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore @cd common/rpc; pwd; $(MAKE) $@
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore @cd common/rpcsvc; pwd; $(MAKE) $@
abdfe7cf11d34f89f17b26e4779bf6079d22a910Adam Moore @cd common/gssapi; pwd; $(MAKE) $@
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore
80d2034f65b9348e5fd36291f03b0819181efb89Adam MooreONC_FILES= common/io/timod.c \
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore common/os/sig.c \
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore common/os/flock.c \
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore common/os/sysent.c \
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore common/os/swapgeneric.c \
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore common/syscall/fcntl.c
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# edit onc plus source files.
80d2034f65b9348e5fd36291f03b0819181efb89Adam MooreONC_PLUS: $(ONC_FILES:%=%_onc_plus)
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore#
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# Cross-reference customization: build a cross-reference over all of
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# the supported architectures. Although there's no correct way to set
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# the include path (since we don't know what architecture is the one
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# the user will be interested in), it's historically been set to
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# mirror the $(XRDIRS) list, and that works kinda sorta okay.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore#
80d2034f65b9348e5fd36291f03b0819181efb89Adam MooreSHARED_XRDIRS = $(sparc_ARCHITECTURES) $(i386_ARCHITECTURES) sun4 sfmmu \
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore sun common
80d2034f65b9348e5fd36291f03b0819181efb89Adam MooreCLOSED_XRDIRS = $(SHARED_XRDIRS:%=% ../../closed/uts/%)
80d2034f65b9348e5fd36291f03b0819181efb89Adam MooreXRDIRS = $(SHARED_XRDIRS)
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore$(CLOSED_BUILD)XRDIRS = $(CLOSED_XRDIRS:../../closed/uts/sfmmu=)
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore
80d2034f65b9348e5fd36291f03b0819181efb89Adam MooreXRINCDIRS = $(XRDIRS)
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moorecscope.out tags: FRC
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore $(XREF) -x $@
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore
80d2034f65b9348e5fd36291f03b0819181efb89Adam MooreFRC:
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore