Makefile revision 7c478bd95313f5f23a4c958a745db2134aa03244
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, Version 1.0 only
2a40fdc2d34adb8a5c72a748449699666032d461Mark Andrews# (the "License"). You may not use this file except in compliance
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# with the License.
a3b428812703d22a605a9f882e71ed65f0ffdc65Mark Andrews#
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# or http://www.opensolaris.org/os/licensing.
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews# See the License for the specific language governing permissions
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# and limitations under the License.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
d56e188030368b835122d759ebbf8d9613c166f4Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# CDDL HEADER END
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews#
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Use is subject to license terms.
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews#
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# uts/sparc/ibcm/Makefile
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# This makefile drives the production of the ibcm kernel
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# module. SPARC architecture dependent
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# ident "%Z%%M% %I% %E% SMI"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
a3b428812703d22a605a9f882e71ed65f0ffdc65Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Path to the base of the uts directory tree (usually /usr/src/uts).
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews#
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark AndrewsUTSBASE = ../..
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
f8448666aa53603696bea83de971a05007735d8fMark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Define the module and object file sets.
3098364bcdd7a719fbafa5fc8d2cc9e90e5a5989Automatic Updater#
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark AndrewsMODULE = ibcm
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsOBJECTS = $(IBCM_OBJS:%=$(OBJS_DIR)/%)
3098364bcdd7a719fbafa5fc8d2cc9e90e5a5989Automatic UpdaterLINTS = $(IBCM_OBJS:%.o=$(LINTS_DIR)/%.ln)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsROOTMODULE = $(ROOT_MISC_DIR)/$(MODULE)
3f6174bffe227be44e241a29d186add00c032ff6Mark AndrewsWARLOCK_OBJS = $(IBCM_OBJS:%.o=%.ll)
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark AndrewsWARLOCK_OK = $(MODULE).ok
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# Include common rules.
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrewsinclude $(UTSBASE)/sparc/Makefile.sparc
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# Define targets
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsALL_TARGET = $(BINARY)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonLINT_TARGET = $(MODULE).lint
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
26a77b80bb7ee886c6fa704348d5e80a011d8811Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Overrides.
6f046a065e5543f8cd7e2f24991c65d2372f4c8dMark Andrews#
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark AndrewsALL_BUILDS = $(ALL_BUILDSONLY64)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsDEF_BUILDS = $(DEF_BUILDSONLY64)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
62ee2c9f460d2e2e45dcf1abc8b4b4a4a43f5618Mark Andrews#
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews# lint pass one enforcement
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark AndrewsCFLAGS += $(CCVERBOSE)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews#
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# depends on misc/ibtl and misc/ibmf
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonLDFLAGS += -dy -Nmisc/ibtl -Nmisc/ibmf
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# Default build targets.
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson.KEEP_STATE:
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
96ea71632887c58a9d00f47eb318bf76b35903c3Mark Andrewsdef: $(DEF_DEPS)
dde4bc92964ec60a35212dfed59562580e3265e3Mark Andrews
80f9a970ae6681c08529ef209eaabbe078c27ca3Mark Andrewsall: $(ALL_DEPS)
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
dde4bc92964ec60a35212dfed59562580e3265e3Mark Andrewsclean: $(CLEAN_DEPS); \
46e873c835bf7d9ec3e1097e0aceb8db5b1ae93aMark Andrews $(RM) $(WARLOCK_OBJS) $(WARLOCK_OK)
3098364bcdd7a719fbafa5fc8d2cc9e90e5a5989Automatic Updater
dde4bc92964ec60a35212dfed59562580e3265e3Mark Andrewsclobber: $(CLOBBER_DEPS); \
45eca3a5d46ed15aee14d81f6cb6c9fb6f365344Mark Andrews $(RM) $(WARLOCK_OBJS) $(WARLOCK_OK)
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
ab81f57ca0c3addfec3df3babdcea9644757cf23Mark Andrewslint: $(LINT_DEPS)
605bd686e437162b5ab65ac4e7c1be0bba1886ddMark Andrews
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrewsmodlintlib: $(MODLINTLIB_DEPS) lint32
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews
413988c8166976498250c0ebb2e3a645d0366bd3Mark Andrewsclean.lint: $(CLEAN_LINT_DEPS)
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrewsinstall: $(INSTALL_DEPS)
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews#
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# Include common targets.
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews#
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrewsinclude $(UTSBASE)/sparc/Makefile.targ
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews#
642e0716c8b4ab82ebc8e60f94c9e897ee89f19aMark Andrews# Defines for local commands.
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews#
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark AndrewsWARLOCK = warlock
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark AndrewsWLCC = wlcc
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark AndrewsTOUCH = touch
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark AndrewsSCCS = sccs
45eca3a5d46ed15aee14d81f6cb6c9fb6f365344Mark AndrewsTEST = test
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrewswarlock: $(MODULE).ok
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews
ea935c46e8261ea10621e5b038426539fe8a7cc5Mark Andrews%.wlcmd:
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews $(TEST) -f $@ || $(SCCS) get $@
d56e188030368b835122d759ebbf8d9613c166f4Mark Andrews
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews$(MODULE).ok: $(WARLOCK_OBJS) ibcm.wlcmd
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews $(WARLOCK) -c ./ibcm.wlcmd $(WARLOCK_OBJS)
96ea71632887c58a9d00f47eb318bf76b35903c3Mark Andrews $(TOUCH) $@
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews%.ll: $(UTSBASE)/common/io/ib/mgt/ibcm/%.c \
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews $(UTSBASE)/common/sys/ib/mgt/ibcm/ibcm_impl.h
b7aab05edae933e169d5f83c653935b17c7f0a8bMark Andrews $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewswarlock_ddi.files:
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews @cd ../warlock; pwd; $(MAKE) warlock
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews