Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
2347c72129ce9393578966225f915284f0730214Mark Andrews#
2347c72129ce9393578966225f915284f0730214Mark Andrews# CDDL HEADER START
1e34fe9044874422104e84373988d07876f716b6Mark Andrews#
1e34fe9044874422104e84373988d07876f716b6Mark Andrews# The contents of this file are subject to the terms of the
1e34fe9044874422104e84373988d07876f716b6Mark Andrews# Common Development and Distribution License (the "License").
30d6dc14e918f9f72ff090c34d6e328ae8e7d68bCurtis Blackburn# You may not use this file except in compliance with the License.
30d6dc14e918f9f72ff090c34d6e328ae8e7d68bCurtis Blackburn#
5183f9d9daa139cbf000c12709877f62e79dfb14Evan Hunt# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5183f9d9daa139cbf000c12709877f62e79dfb14Evan Hunt# or http://www.opensolaris.org/os/licensing.
0193e63da91a4da27809b9a528eb043fa6b4da26Mark Andrews# See the License for the specific language governing permissions
0193e63da91a4da27809b9a528eb043fa6b4da26Mark Andrews# and limitations under the License.
0193e63da91a4da27809b9a528eb043fa6b4da26Mark Andrews#
17a00ff54c51f6bdfddd7d9ceaef6f2dcf387cc1Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
17a00ff54c51f6bdfddd7d9ceaef6f2dcf387cc1Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17a00ff54c51f6bdfddd7d9ceaef6f2dcf387cc1Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
5f238c3c64dd68100dc1b60f9c1e178522d1b333Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
5f238c3c64dd68100dc1b60f9c1e178522d1b333Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
2cd3c8856c97b770cc4843bfad63922e23a6f661Mark Andrews#
2cd3c8856c97b770cc4843bfad63922e23a6f661Mark Andrews# CDDL HEADER END
f3c8e48b95996c3020d138b87ee8941da29cc124Evan Hunt#
f3c8e48b95996c3020d138b87ee8941da29cc124Evan Hunt
f3c8e48b95996c3020d138b87ee8941da29cc124Evan Hunt#
744589ff64e8d98b30b746cd7a1833f77830e185Mark Andrews# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
744589ff64e8d98b30b746cd7a1833f77830e185Mark Andrews# Use is subject to license terms.
744589ff64e8d98b30b746cd7a1833f77830e185Mark Andrews#
dc775799d9a5a61f485bff5b883a60cc748afaf3Evan Hunt
dc775799d9a5a61f485bff5b883a60cc748afaf3Evan Hunt#
dc775799d9a5a61f485bff5b883a60cc748afaf3Evan Hunt# This makefile drives the production of the sun4u serengeti platform
428dd5c588cfe0dc1519af728e6e75c10aeb4439Curtis Blackburn# module.
0d18225b5e2d17e4bef0077212fd6927ca58dda6Evan Hunt#
0d18225b5e2d17e4bef0077212fd6927ca58dda6Evan Hunt# sun4u implementation architecture dependent
0d18225b5e2d17e4bef0077212fd6927ca58dda6Evan Hunt#
62f016d5d301713c72a59e83d3ab41170a77f674Mark Andrews
62f016d5d301713c72a59e83d3ab41170a77f674Mark Andrews#
62f016d5d301713c72a59e83d3ab41170a77f674Mark Andrews# Path to the base of the uts directory tree (usually /usr/src/uts).
d9f0c713fe1d50f1848ca827c5f31db79d904f04Evan Hunt#
d9f0c713fe1d50f1848ca827c5f31db79d904f04Evan HuntUTSBASE = ../../..
d9f0c713fe1d50f1848ca827c5f31db79d904f04Evan Hunt
5ba1d3dcc5739a1f77ec2875b276b163a42ef1e8Evan Hunt#
5ba1d3dcc5739a1f77ec2875b276b163a42ef1e8Evan Hunt# Define the module and object file sets.
5ba1d3dcc5739a1f77ec2875b276b163a42ef1e8Evan Hunt#
af9f195c9e128fc9cc5912498b8f7f26f07887c3Evan HuntMODULE = platmod
af9f195c9e128fc9cc5912498b8f7f26f07887c3Evan HuntOBJECTS = $(SERENGETI_OBJS:%=$(OBJS_DIR)/%)
af9f195c9e128fc9cc5912498b8f7f26f07887c3Evan HuntLINTS = $(SERENGETI_OBJS:%.o=$(LINTS_DIR)/%.ln)
e47208b6fb724cba7053baee4246b308e35403a2Evan HuntROOTMODULE = $(ROOT_SERENGETI_MISC_DIR)/$(MODULE)
e47208b6fb724cba7053baee4246b308e35403a2Evan Hunt
34f3693b93f3ba16634f0c08368ef7f81182ef93Evan HuntPLAT_DIR = .
34f3693b93f3ba16634f0c08368ef7f81182ef93Evan HuntHERE = ../../serengeti/platmod
e72a81148a8c68de2ea5e8169aaa4a7762f6ed79Evan Hunt
e72a81148a8c68de2ea5e8169aaa4a7762f6ed79Evan Hunt#
1a076410c260ff1d3124ce8b7e22ac111e9cf92aEvan Hunt# Include common rules.
1a076410c260ff1d3124ce8b7e22ac111e9cf92aEvan Hunt#
96a116178567d4eb22e57aba533073de9a2f9d84Evan Huntinclude $(UTSBASE)/sun4u/serengeti/Makefile.serengeti
96a116178567d4eb22e57aba533073de9a2f9d84Evan Hunt
03b5d2689df73fa9a50ff684511fa9d81f317e6cEvan Hunt#
03b5d2689df73fa9a50ff684511fa9d81f317e6cEvan Hunt# Override defaults
03b5d2689df73fa9a50ff684511fa9d81f317e6cEvan Hunt#
03b5d2689df73fa9a50ff684511fa9d81f317e6cEvan HuntCLEANFILES += $(PLATLIB) $(SYM_MOD)
93aba6dcec9855cd9c69c10717f62c350ff766eaMark Andrews
93aba6dcec9855cd9c69c10717f62c350ff766eaMark Andrews#
93aba6dcec9855cd9c69c10717f62c350ff766eaMark Andrews# Define targets
744589ff64e8d98b30b746cd7a1833f77830e185Mark Andrews#
afc047fdb535cdd44e20ffbb62d12b2408f0a07eMark AndrewsALL_TARGET = $(SYM_MOD)
afc047fdb535cdd44e20ffbb62d12b2408f0a07eMark AndrewsLINT_TARGET = $(MODULE).lint
26bb3b7a67b833f0a18072567de036226890ca1aMark AndrewsINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
26bb3b7a67b833f0a18072567de036226890ca1aMark Andrews
26bb3b7a67b833f0a18072567de036226890ca1aMark Andrews#
9a785712f1eaccba2b43d29a76f4c02ef2c391d0Mark Andrews# Overrides
9a785712f1eaccba2b43d29a76f4c02ef2c391d0Mark Andrews#
ec8a802114d3cb12805fecf1dd209fe46706b35bMark AndrewsALL_BUILDS = $(ALL_BUILDSONLY64)
ec8a802114d3cb12805fecf1dd209fe46706b35bMark AndrewsDEF_BUILDS = $(DEF_BUILDSONLY64)
73ad83bcf0664c2774bec67d688a590e992d4629Evan HuntCLEANLINTFILES += $(LINT32_FILES)
73ad83bcf0664c2774bec67d688a590e992d4629Evan Hunt
ff5ac6d4213e3e2f3f6a93db8c5e65cc170a7e2bEvan Hunt#
ff5ac6d4213e3e2f3f6a93db8c5e65cc170a7e2bEvan Hunt# lint pass one enforcement
ff5ac6d4213e3e2f3f6a93db8c5e65cc170a7e2bEvan Hunt#
a6d43d18b1f6164fd144b2fa25ea57f5566b3bf9Evan HuntCFLAGS += $(CCVERBOSE)
a6d43d18b1f6164fd144b2fa25ea57f5566b3bf9Evan HuntCERRWARN += -_gcc=-Wno-unused-variable
a6d43d18b1f6164fd144b2fa25ea57f5566b3bf9Evan HuntCERRWARN += -_gcc=-Wno-uninitialized
a6d43d18b1f6164fd144b2fa25ea57f5566b3bf9Evan Hunt
330f98fe3b12535072708c273eaf59f7bf887065Evan Hunt#
330f98fe3b12535072708c273eaf59f7bf887065Evan Hunt# Default build targets.
d3c8ba219f7c0fd31aabd06ee6b8ef0e92ef9e14Mark Andrews#
330f98fe3b12535072708c273eaf59f7bf887065Evan Hunt.KEEP_STATE:
d3c8ba219f7c0fd31aabd06ee6b8ef0e92ef9e14Mark Andrews
b4914b3d69de3eb57bcf1d6cb3bb8e0b645c1081Mark Andrewsdef: $(DEF_DEPS)
b4914b3d69de3eb57bcf1d6cb3bb8e0b645c1081Mark Andrews
b99bfa184bc9375421b5df915eea7dfac6a68a99Evan Huntall: $(ALL_DEPS)
b99bfa184bc9375421b5df915eea7dfac6a68a99Evan Hunt
b99bfa184bc9375421b5df915eea7dfac6a68a99Evan Huntclean: $(CLEAN_DEPS)
b99bfa184bc9375421b5df915eea7dfac6a68a99Evan Hunt
c4a453fa5c3d8b21d8982137b03e052c0d446c57Evan Huntclobber: $(CLOBBER_DEPS)
c4a453fa5c3d8b21d8982137b03e052c0d446c57Evan Hunt
c4a453fa5c3d8b21d8982137b03e052c0d446c57Evan Huntlint: $(LINT_DEPS)
4adf97c32fcca7d00e5756607fd045f2aab9c3d4Mark Andrews
4adf97c32fcca7d00e5756607fd045f2aab9c3d4Mark Andrewsmodlintlib: $(MODLINTLIB_DEPS)
4adf97c32fcca7d00e5756607fd045f2aab9c3d4Mark Andrews
4adf97c32fcca7d00e5756607fd045f2aab9c3d4Mark Andrewsclean.lint: $(CLEAN_LINT_DEPS)
1cc4695f0da63f0190e3514adccf6a96f3dc1519Mark Andrews
1cc4695f0da63f0190e3514adccf6a96f3dc1519Mark Andrewsinstall: $(INSTALL_DEPS)
1cc4695f0da63f0190e3514adccf6a96f3dc1519Mark Andrews
3a6d62c59f73d024d1b2ba2ac94d7600530166ffMark Andrewscheck:
3a6d62c59f73d024d1b2ba2ac94d7600530166ffMark Andrews
ad668472f1a924e0355faf313e7cdba1970161c8Evan HuntLINT_LIB_DIR =$(SERENGETI_LINT_LIB_DIR)
ad668472f1a924e0355faf313e7cdba1970161c8Evan Hunt
ad668472f1a924e0355faf313e7cdba1970161c8Evan Hunt$(PLATLIB): $(BINARY)
dc1ed2622fa78dc21dda49488c496437083e17c9Evan Hunt $(BUILD.SO) $(BINARY)
dc1ed2622fa78dc21dda49488c496437083e17c9Evan Hunt
dc1ed2622fa78dc21dda49488c496437083e17c9Evan Hunt$(SYM_MOD): $(UNIX_O) $(PLATLIB)
dc1ed2622fa78dc21dda49488c496437083e17c9Evan Hunt @echo "resolving symbols against unix.o"
744589ff64e8d98b30b746cd7a1833f77830e185Mark Andrews @(cd $(UNIX_DIR); pwd; \
dd8bbbfac3f3f14235820a593f1efd8e3ba8d2faMark Andrews PLAT_DIR=$(HERE) SYM_MOD=$(HERE)/$(SYM_MOD) $(MAKE) symcheck)
c15b536ddbea458a7a3975079276bf4a9b1617aaMark Andrews
99425bedc4dcd586f751148bbdcba19578c6f39eMark Andrews#
99425bedc4dcd586f751148bbdcba19578c6f39eMark Andrews# Include common targets.
92754e2e4954e497eb2983c76198889b5a3218aaEvan Hunt#
92754e2e4954e497eb2983c76198889b5a3218aaEvan Huntinclude $(UTSBASE)/sun4u/serengeti/Makefile.targ
8013077aa7ed5d6e1daddc973ddb3c7cc7d28df1Mark Andrews