Makefile revision e71ca95ca6de23d33b54cb55cefdef30bc7c969b
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# CDDL HEADER START
04428429c4e689333e3ef8d19a2debeb20d4d15dMark Andrews#
e999539fb3e45b2617571e0e3ecd651992291701Mark Andrews# The contents of this file are subject to the terms of the
e999539fb3e45b2617571e0e3ecd651992291701Mark Andrews# Common Development and Distribution License (the "License").
2a40fdc2d34adb8a5c72a748449699666032d461Mark Andrews# You may not use this file except in compliance with the License.
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
a3b428812703d22a605a9f882e71ed65f0ffdc65Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# or http://www.opensolaris.org/os/licensing.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# See the License for the specific language governing permissions
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews# and limitations under the License.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# When distributing Covered Code, include this CDDL HEADER in each
d56e188030368b835122d759ebbf8d9613c166f4Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews# If applicable, add the following below this CDDL HEADER, with the
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews#
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews# CDDL HEADER END
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews# Use is subject to license terms.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# This makefile drives the production of the kernel component of
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# the Solaris 10 brand
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# Path to the base of the uts directory tree (usually /usr/src/uts).
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsUTSBASE = ../..
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonS10_BASE = $(UTSBASE)/common/brand/solaris10
a3b428812703d22a605a9f882e71ed65f0ffdc65Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews# Define the module and object file sets.
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsMODULE = s10_brand
c718d15a9a95054ee3c71540c02335426071fc6dMark AndrewsOFFSETS_H = $(OBJS_DIR)/s10_offsets.h
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsOFFSETS_SRC = $(S10_BASE)/s10_offsets.in
c069a20053d41ae299eb9457e50ea44ae9f73ed2Mark AndrewsOBJECTS = $(S10_BRAND_OBJS:%=$(OBJS_DIR)/%)
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark AndrewsLINTS = $(S10_BRAND_OBJS:%.o=$(LINTS_DIR)/%.ln)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsROOTMODULE = $(ROOT_PSM_BRAND_DIR)/$(MODULE)
605bd686e437162b5ab65ac4e7c1be0bba1886ddMark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
3f6174bffe227be44e241a29d186add00c032ff6Mark Andrews# Include common rules.
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsinclude $(UTSBASE)/sun4u/Makefile.sun4u
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# Define targets
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews#
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark AndrewsALL_TARGET = $(OFFSETS_H) $(BINARY)
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsLINT_TARGET = $(MODULE).lint
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonINSTALL_TARGET = $(OFFSETS_H) $(BINARY) $(ROOTMODULE)
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# Update compiler variables.
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonINC_PATH += -I$(S10_BASE) -I$(OBJS_DIR)
26a77b80bb7ee886c6fa704348d5e80a011d8811Mark AndrewsLDFLAGS += -dy -Nexec/elfexec
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
6f046a065e5543f8cd7e2f24991c65d2372f4c8dMark Andrews#
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews# Default build targets.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews.KEEP_STATE:
62ee2c9f460d2e2e45dcf1abc8b4b4a4a43f5618Mark Andrews
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrewsdef: $(DEF_DEPS)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrewsall: $(ALL_DEPS)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrewsclean: $(CLEAN_DEPS)
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrewsclobber: $(CLOBBER_DEPS)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrewslint: $(LINT_DEPS)
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssonmodlintlib: $(MODLINTLIB_DEPS)
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssonclean.lint: $(CLEAN_LINT_DEPS)
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtoninstall: $(INSTALL_DEPS)
45eca3a5d46ed15aee14d81f6cb6c9fb6f365344Mark Andrews
80f9a970ae6681c08529ef209eaabbe078c27ca3Mark Andrews#
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# Create genassym.h
46e873c835bf7d9ec3e1097e0aceb8db5b1ae93aMark Andrews#
46e873c835bf7d9ec3e1097e0aceb8db5b1ae93aMark Andrews$(OFFSETS_H): $(OFFSETS_SRC)
dd9ad704c3800e3ab07ede8595871eac79984871Mark Andrews $(OFFSETS_CREATE) <$(OFFSETS_SRC) >$@
605bd686e437162b5ab65ac4e7c1be0bba1886ddMark Andrews
45eca3a5d46ed15aee14d81f6cb6c9fb6f365344Mark Andrews#
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# Include common targets.
ab81f57ca0c3addfec3df3babdcea9644757cf23Mark Andrews#
605bd686e437162b5ab65ac4e7c1be0bba1886ddMark Andrewsinclude $(UTSBASE)/sun4u/Makefile.targ
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews