Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
712b976a0633806b7140b17354a9398300f616b9Mark Andrews# CDDL HEADER START
712b976a0633806b7140b17354a9398300f616b9Mark Andrews#
712b976a0633806b7140b17354a9398300f616b9Mark Andrews# The contents of this file are subject to the terms of the
f0835301386ff7026fd0097198d4b42f2f8d0867Mark Andrews# Common Development and Distribution License (the "License").
f0835301386ff7026fd0097198d4b42f2f8d0867Mark Andrews# You may not use this file except in compliance with the License.
f0835301386ff7026fd0097198d4b42f2f8d0867Mark Andrews#
f0835301386ff7026fd0097198d4b42f2f8d0867Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f0835301386ff7026fd0097198d4b42f2f8d0867Mark Andrews# or http://www.opensolaris.org/os/licensing.
cb933b69ff357100768d0b33b88e4ee986b128f2Evan Hunt# See the License for the specific language governing permissions
cb933b69ff357100768d0b33b88e4ee986b128f2Evan Hunt# and limitations under the License.
cb933b69ff357100768d0b33b88e4ee986b128f2Evan Hunt#
f1f39b7e07b2665073d976c4d27e30988552b873Tatuya JINMEI 神明達哉# When distributing Covered Code, include this CDDL HEADER in each
f1f39b7e07b2665073d976c4d27e30988552b873Tatuya JINMEI 神明達哉# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f1f39b7e07b2665073d976c4d27e30988552b873Tatuya JINMEI 神明達哉# If applicable, add the following below this CDDL HEADER, with the
f1f39b7e07b2665073d976c4d27e30988552b873Tatuya JINMEI 神明達哉# fields enclosed by brackets "[]" replaced with your own identifying
f1f39b7e07b2665073d976c4d27e30988552b873Tatuya JINMEI 神明達哉# information: Portions Copyright [yyyy] [name of copyright owner]
f1f39b7e07b2665073d976c4d27e30988552b873Tatuya JINMEI 神明達哉#
86dcc4005887f91d23d970d4574a8f6afa7e28d2Evan Hunt# CDDL HEADER END
86dcc4005887f91d23d970d4574a8f6afa7e28d2Evan Hunt#
86dcc4005887f91d23d970d4574a8f6afa7e28d2Evan Hunt
86dcc4005887f91d23d970d4574a8f6afa7e28d2Evan Hunt#
86dcc4005887f91d23d970d4574a8f6afa7e28d2Evan Hunt# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
86dcc4005887f91d23d970d4574a8f6afa7e28d2Evan Hunt# Use is subject to license terms.
86dcc4005887f91d23d970d4574a8f6afa7e28d2Evan Hunt#
86dcc4005887f91d23d970d4574a8f6afa7e28d2Evan Hunt
86dcc4005887f91d23d970d4574a8f6afa7e28d2Evan Hunt#
86dcc4005887f91d23d970d4574a8f6afa7e28d2Evan Hunt# uts/sparc/ahci/Makefile
86dcc4005887f91d23d970d4574a8f6afa7e28d2Evan Hunt#
bf9b852c3eaf2c9847f926751b57a06f1ae3d72aEvan Hunt# This makefile drives the production of the
bf9b852c3eaf2c9847f926751b57a06f1ae3d72aEvan Hunt# "/kernel/drv/ahci" kernel module.
bf9b852c3eaf2c9847f926751b57a06f1ae3d72aEvan Hunt#
bf9b852c3eaf2c9847f926751b57a06f1ae3d72aEvan Hunt# sparc architecture dependent
bf9b852c3eaf2c9847f926751b57a06f1ae3d72aEvan Hunt#
bf9b852c3eaf2c9847f926751b57a06f1ae3d72aEvan Hunt
bf9b852c3eaf2c9847f926751b57a06f1ae3d72aEvan Hunt#
bf9b852c3eaf2c9847f926751b57a06f1ae3d72aEvan Hunt# Path to the base of the uts directory tree (usually /usr/src/uts).
bf9b852c3eaf2c9847f926751b57a06f1ae3d72aEvan Hunt#
ff5864ef42c3bc55e9be20434d1f7de2f6794894Mark AndrewsUTSBASE = ../..
ff5864ef42c3bc55e9be20434d1f7de2f6794894Mark Andrews
ff5864ef42c3bc55e9be20434d1f7de2f6794894Mark Andrews#
f3792d4bda1273fe82f9d0a13f141923e41d4537Tatuya JINMEI 神明達哉# Define the module and object file sets.
f3792d4bda1273fe82f9d0a13f141923e41d4537Tatuya JINMEI 神明達哉#
45d9b38097eb7b43e7e0d5d20c2d0903c7224ebdMark AndrewsMODULE = ahci
45d9b38097eb7b43e7e0d5d20c2d0903c7224ebdMark AndrewsOBJECTS = $(AHCI_OBJS:%=$(OBJS_DIR)/%)
810656a187f2c358323bbf679f792f19a46a7973Mark AndrewsLINTS = $(AHCI_OBJS:%.o=$(LINTS_DIR)/%.ln)
810656a187f2c358323bbf679f792f19a46a7973Mark AndrewsWARLOCK_OUT = $(AHCI_OBJS:%.o=%.ll)
810656a187f2c358323bbf679f792f19a46a7973Mark AndrewsWARLOCK_OK = $(MODULE).ok
bf13e709db49bb19e0c2e73f0a964fe9d7bea4dfMark AndrewsROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
bf13e709db49bb19e0c2e73f0a964fe9d7bea4dfMark AndrewsCONF_SRCDIR = $(UTSBASE)/common/io/sata/adapters/ahci
bf13e709db49bb19e0c2e73f0a964fe9d7bea4dfMark AndrewsWLCMD_DIR = $(UTSBASE)/common/io/warlock
bf13e709db49bb19e0c2e73f0a964fe9d7bea4dfMark Andrews
bdc1d1b1bfad04bbae3fdf974e49e392951fb911Mark Andrews#
43888c231579e5b021beeadd7265cda302ea1efeMark Andrews# Include common rules.
43888c231579e5b021beeadd7265cda302ea1efeMark Andrews#
b7ba273d32232dfadaea5af384f1e6f36c915249Mark Andrewsinclude $(UTSBASE)/sparc/Makefile.sparc
c52235e52ee12e4d15f808ac06608584257f6479Mark Andrews
4a8dc5f8efcc8bc3033a9383f958d1de22c844f4Mark Andrews#
0627874ff86b2d5c9d6d90ea9fde8111dc97654bMark Andrews# Define targets
4a8dc5f8efcc8bc3033a9383f958d1de22c844f4Mark Andrews#
48dfee71508886d86fe8fb12f91961b5daf3141dMark AndrewsALL_TARGET = $(BINARY)
48dfee71508886d86fe8fb12f91961b5daf3141dMark AndrewsLINT_TARGET = $(MODULE).lint
48dfee71508886d86fe8fb12f91961b5daf3141dMark AndrewsINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
718c4becc5711be71e23202a87f3aaea1aedde79Mark Andrews
718c4becc5711be71e23202a87f3aaea1aedde79Mark Andrews#
718c4becc5711be71e23202a87f3aaea1aedde79Mark Andrews# Overrides.
081b36ff9588e4d67a1a3095f5333a2b223482f7Mark Andrews#
081b36ff9588e4d67a1a3095f5333a2b223482f7Mark AndrewsDEBUG_FLGS =
43c770b9987375e9e0efa19617b22e8e6a748a63Mark AndrewsDEBUG_DEFS += $(DEBUG_FLGS)
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrews
9a56f03c4c63c3729ebfcff9f99b9394c6004a20Mark Andrews#
9a56f03c4c63c3729ebfcff9f99b9394c6004a20Mark Andrews# lint pass one enforcement
9a56f03c4c63c3729ebfcff9f99b9394c6004a20Mark Andrews#
02181a6c7420e8f3c083d0d20e0e65a78ea25d0fMark AndrewsCFLAGS += $(CCVERBOSE)
02181a6c7420e8f3c083d0d20e0e65a78ea25d0fMark Andrews
02181a6c7420e8f3c083d0d20e0e65a78ea25d0fMark AndrewsCERRWARN += -_gcc=-Wno-parentheses
e24ccb512c110d181e01f977196e518b0e72e451Mark AndrewsCERRWARN += -_gcc=-Wno-unused-label
e24ccb512c110d181e01f977196e518b0e72e451Mark AndrewsCERRWARN += -_gcc=-Wno-uninitialized
e24ccb512c110d181e01f977196e518b0e72e451Mark Andrews
63af1a646a006867dbd99dc0aa74559d832a420fMark Andrews#
63af1a646a006867dbd99dc0aa74559d832a420fMark Andrews# Default build targets.
b7bc86a4d3d78fae33577682cea7d1449abb7b33Mark Andrews#
b7bc86a4d3d78fae33577682cea7d1449abb7b33Mark Andrews.KEEP_STATE:
b7bc86a4d3d78fae33577682cea7d1449abb7b33Mark Andrews
675cc80975eb7d15e0d9f1d5f424baafaf189fdeMark Andrewsdef: $(DEF_DEPS)
675cc80975eb7d15e0d9f1d5f424baafaf189fdeMark Andrews
675cc80975eb7d15e0d9f1d5f424baafaf189fdeMark Andrewsall: $(ALL_DEPS)
a20996ab6ff2be473b85470fddd2380a3e180e7bMark Andrews
a20996ab6ff2be473b85470fddd2380a3e180e7bMark Andrewsclean: $(CLEAN_DEPS)
80852eb5a8df5f3d70efb764e00f8f09efc5730cMark Andrews $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
a27bbd21cf07371fc71e7ade75c3d78a5b98b7f9Mark Andrews
a27bbd21cf07371fc71e7ade75c3d78a5b98b7f9Mark Andrewsclobber: $(CLOBBER_DEPS)
29f0da7fb84ea8010175769baecd12ab20903bb4Mark Andrews $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
29f0da7fb84ea8010175769baecd12ab20903bb4Mark Andrews
29f0da7fb84ea8010175769baecd12ab20903bb4Mark Andrewslint: $(LINT_DEPS)
b00de53de2e37154d9046d481734cfb9a8573204Mark Andrews
b00de53de2e37154d9046d481734cfb9a8573204Mark Andrewsmodlintlib: $(MODLINTLIB_DEPS)
b00de53de2e37154d9046d481734cfb9a8573204Mark Andrews
249dcf3932668693a53c2790b97f5170efb233e1Mark Andrewsclean.lint: $(CLEAN_LINT_DEPS)
ead77b9ad4821433ad45ef1de2c072b7c8f94f48Mark Andrews
8e22c73f3ea64337926151b53245f61342fa52faMark Andrewsinstall: $(INSTALL_DEPS)
8e22c73f3ea64337926151b53245f61342fa52faMark Andrews
8e22c73f3ea64337926151b53245f61342fa52faMark Andrews#
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrews# Include common targets.
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrews#
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrewsinclude $(UTSBASE)/sparc/Makefile.targ
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrews
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrews
7d9be933d7f4504cd0355ced1fb7fbd137e455b7Mark Andrews#
7d9be933d7f4504cd0355ced1fb7fbd137e455b7Mark Andrews# Defines for local commands.
7d9be933d7f4504cd0355ced1fb7fbd137e455b7Mark Andrews#
5ae2eac4c16bdbbef032544bd9fc86f47e7bdc2cMark AndrewsWARLOCK = warlock
5ae2eac4c16bdbbef032544bd9fc86f47e7bdc2cMark AndrewsWLCC = wlcc
5b02fc32d693bb811199308a40143df0adf818c1Mark AndrewsTOUCH = touch
5b02fc32d693bb811199308a40143df0adf818c1Mark AndrewsTEST = test
b667946fa548bf8cb93029458ec130be6365419fMark Andrews
b667946fa548bf8cb93029458ec130be6365419fMark AndrewsSD_FILES = $(SD_OBJS:%.o=../sd/%.ll)
b667946fa548bf8cb93029458ec130be6365419fMark AndrewsSATA_FILES = $(SATA_OBJS:%.o=-l ../sata/%.ll)
b667946fa548bf8cb93029458ec130be6365419fMark AndrewsSCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
d8624c1f19777853aa96cb797759743c82480f70Mark AndrewsCMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll)
d8624c1f19777853aa96cb797759743c82480f70Mark Andrews
98744b51112090a3fb7abcf858cb0657c13609ccMark Andrewswarlock: $(WARLOCK_OK)
98744b51112090a3fb7abcf858cb0657c13609ccMark Andrews
98744b51112090a3fb7abcf858cb0657c13609ccMark Andrews$(WARLOCK_OK): $(WLCMD_DIR)/ahci.wlcmd $(WARLOCK_OUT) warlock_ddi.files \
8d31dd9ab62d91b5f23ac687657c966d44074a3fMark Andrews sata.files scsi.files sd.files cmlb.files
8d31dd9ab62d91b5f23ac687657c966d44074a3fMark Andrews $(WARLOCK) -c $(WLCMD_DIR)/ahci.wlcmd $(WARLOCK_OUT) \
8d31dd9ab62d91b5f23ac687657c966d44074a3fMark Andrews $(SD_FILES) \
6d5840017831db1eee3be47236ff5044449a0256Mark Andrews $(SCSI_FILES) \
6d5840017831db1eee3be47236ff5044449a0256Mark Andrews $(CMLB_FILES) \
6d5840017831db1eee3be47236ff5044449a0256Mark Andrews $(SATA_FILES) \
3ec79bbc03fc5378a6cb37b276807cd40b5332aaMark Andrews -l ../warlock/ddi_dki_impl.ll
3ec79bbc03fc5378a6cb37b276807cd40b5332aaMark Andrews $(TOUCH) $@
3ec79bbc03fc5378a6cb37b276807cd40b5332aaMark Andrews
dc64df4479df5e7cb3ed1dead21888b5af98f67eMark Andrews%.ll: $(UTSBASE)/common/io/sata/adapters/ahci/%.c
dc64df4479df5e7cb3ed1dead21888b5af98f67eMark Andrews $(WLCC) $(CPPFLAGS) -D DEBUG -D __sparcv9 -o $@ $<
778a01b1aa76273d4a28c7559a509edc7a00ec95Mark Andrews
778a01b1aa76273d4a28c7559a509edc7a00ec95Mark Andrewssata.files:
778a01b1aa76273d4a28c7559a509edc7a00ec95Mark Andrews @cd ../sata; pwd; $(MAKE) warlock
44f175a90a855326725439b2f1178f0dcca8f67dMark Andrews
44f175a90a855326725439b2f1178f0dcca8f67dMark Andrewsscsi.files:
21991bd14e8b59000dfc2acf2ce614596cf28cbaMark Andrews @cd ../scsi; pwd; $(MAKE) warlock
21991bd14e8b59000dfc2acf2ce614596cf28cbaMark Andrews
21991bd14e8b59000dfc2acf2ce614596cf28cbaMark Andrewssd.files:
b335299322e50f045f10e4636262cd2f8d407a8bMark Andrews @cd ../sd; pwd; $(MAKE) warlock_alone
b335299322e50f045f10e4636262cd2f8d407a8bMark Andrews
b335299322e50f045f10e4636262cd2f8d407a8bMark Andrewscmlb.files:
ff5c52617eecd06161344c99987a866691592e4aMark Andrews @cd ../cmlb; pwd; $(MAKE) warlock
e12030c433a08b9e9678717ec5e8092c9e4da72cMark Andrews
e12030c433a08b9e9678717ec5e8092c9e4da72cMark Andrews
e18c62b1dab6bf82530a94c00e2320e542f40c3fMark Andrewswarlock_ddi.files:
e18c62b1dab6bf82530a94c00e2320e542f40c3fMark Andrews @cd ../warlock; pwd; $(MAKE) warlock
5c40acf2156bbc258fc290f38cf8d5e12d085bedMark Andrews