Makefile.targ revision 2
2N/A#
2N/A# CDDL HEADER START
2N/A#
2N/A# The contents of this file are subject to the terms of the
2N/A# Common Development and Distribution License (the "License").
2N/A# You may not use this file except in compliance with the License.
2N/A#
2N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A# or http://www.opensolaris.org/os/licensing.
2N/A# See the License for the specific language governing permissions
2N/A# and limitations under the License.
2N/A#
2N/A# When distributing Covered Code, include this CDDL HEADER in each
2N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A# If applicable, add the following below this CDDL HEADER, with the
2N/A# fields enclosed by brackets "[]" replaced with your own identifying
2N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2N/A#
2N/A# CDDL HEADER END
2N/A#
2N/A#
2N/A# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
2N/A#
2N/A
2N/A#
2N/A# We build each flavor in a separate make invocation to improve clarity(!) in
2N/A# Makefile.com. The subordinate makes have $(CURTYPE) set to indicate the
2N/A# flavor they're supposed to build. This causes the correct set of source
2N/A# files and compiler and linker flags to be selected.
2N/A#
2N/A# The SPARC library is built from the closed gate. This Makefile is shared
2N/A# between both environments, so all paths must be absolute.
2N/A#
2N/A
2N/Ainstall: $(TYPES:%=install.%)
2N/A
2N/Aall: $(TYPES:%=all.%)
2N/A
2N/A$(TYPES:%=all.%):
2N/A @CURTYPE=$(@:all.%=%) $(MAKE) $@.targ
2N/A
2N/A$(TYPES:%=install.%):
2N/A @CURTYPE=$(@:install.%=%) $(MAKE) $@.targ
2N/A
2N/A$(TYPES:%=stubinstall.%):
2N/A @CURTYPE=$(@:stubinstall.%=%) $(MAKE) $@.targ
2N/A
2N/Ainstall.library.targ: stubinstall.library.targ all.library $(INSTALL_DEPS_library)
2N/Ainstall.standalone.targ: all.standalone $(INSTALL_DEPS_standalone)
2N/A
2N/Astubinstall: $(TYPES:%=stubinstall.%)
2N/A
2N/Astubinstall.library.targ: $(STUBINSTALL_DEPS_library)
2N/Astubinstall.standalone.targ:
2N/A
2N/Aall.library.targ: stub.library $(LIBS)
2N/Aall.standalone.targ: $(STANDLIBRARY)
2N/A
2N/Astub.library: stub
2N/Astub.standalong:
2N/A
2N/Alint: $(TYPES:%=lint.%)
2N/A
2N/A$(TYPES:%=lint.%):
2N/A @CURTYPE=$(@:lint.%=%) $(MAKE) lintcheck
2N/A
2N/A# Ensure that library does not contain any unnecessary data
2N/A$(STANDLIBRARY) := LDFLAGS += $(ZSTRIPCLASS.rel)
2N/A
2N/A$(STANDLIBRARY): $(OBJS) $(LINKTEST_OBJ)
2N/A $(LD) $(BREDUCE) $(ZDEFS) $(LDFLAGS) -o $@.linktest $(OBJS) \
2N/A $(LINKTEST_OBJ)
2N/A $(RM) $@.linktest
2N/A $(LD) $(LDFLAGS) -o $@ $(OBJS)
2N/A
2N/Aclobber: $(TYPES:%=clobber.%)
2N/A
2N/A$(TYPES:%=clobber.%):
2N/A @CURTYPE=$(@:clobber.%=%) $(MAKE) clobber.targ
2N/A
2N/Aclobber.targ: clean
2N/A $(RM) $(CLOBBERTARGFILES)
2N/A
2N/A# include library targets
2N/Ainclude $(SRC)/lib/Makefile.targ
2N/A
2N/A$(PICS): pics
2N/A$(OBJS): objs
2N/A
2N/Aobjs/%.o pics/%.o: $(ISASRCDIR)/%.c
2N/A $(COMPILE.c) -o $@ $<
2N/A $(POST_PROCESS_O)
2N/A
2N/Aobjs/%.o pics/%.o: $(ISASRCDIR)/%.s
2N/A $(COMPILE.s) -o $@ $<
2N/A $(POST_PROCESS_O)
2N/A
2N/Aobjs/%.o pics/%.o: $(COMDIR)/%.c
2N/A $(COMPILE.c) -o $@ $<
2N/A $(POST_PROCESS_O)
2N/A
2N/A# install rule for lint library target
2N/A$(ROOTLINTDIR)/%: $(COMDIR)/%
2N/A $(INS.file)
2N/A
2N/A# install rule for x86 common source
2N/Aobjs/%.o pics/%.o: $(SRC)/common/dis/i386/%.c
2N/A $(COMPILE.c) -o $@ $<
2N/A $(POST_PROCESS_O)