8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / uts / intel / ahci / Makefile
blobf5a003fab5fed8d1ddc1e73c74e5e576290a99f4
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
23 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
28 # This makefile drives the production of the
29 # "/kernel/drv/ahci" kernel module.
31 # intel architecture dependent
35 # Path to the base of the uts directory tree (usually /usr/src/uts).
37 UTSBASE = ../..
40 # Define the module and object file sets.
42 MODULE = ahci
43 OBJECTS = $(AHCI_OBJS:%=$(OBJS_DIR)/%)
44 LINTS = $(AHCI_OBJS:%.o=$(LINTS_DIR)/%.ln)
45 ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
46 CONF_SRCDIR = $(UTSBASE)/common/io/sata/adapters/ahci
47 WARLOCK_OUT = $(AHCI_OBJS:%.o=%.ll)
48 WARLOCK_OK = $(MODULE).ok
49 WLCMD_DIR = $(UTSBASE)/common/io/warlock
52 # Include common rules.
54 include $(UTSBASE)/intel/Makefile.intel
57 # Define targets
59 ALL_TARGET = $(BINARY)
60 LINT_TARGET = $(MODULE).lint
61 INSTALL_TARGET = $(BINARY) $(ROOTMODULE)
64 # Overrides.
66 DEBUG_FLGS =
67 DEBUG_DEFS += $(DEBUG_FLGS)
70 # lint pass one enforcement
72 CFLAGS += $(CCVERBOSE)
74 CERRWARN += -_gcc=-Wno-parentheses
75 CERRWARN += -_gcc=-Wno-unused-label
76 CERRWARN += -_gcc=-Wno-uninitialized
80 # we depend on the sata module
81 LDFLAGS += -dy -N misc/sata
84 # For now, disable these lint checks; maintainers should endeavor
85 # to investigate and remove these for maximum lint coverage.
86 # Please do not carry these forward to new Makefiles.
90 # Default build targets.
92 .KEEP_STATE:
94 def: $(DEF_DEPS)
96 all: $(ALL_DEPS)
98 clean: $(CLEAN_DEPS)
99 $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
101 clobber: $(CLOBBER_DEPS)
102 $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
104 lint: $(LINT_DEPS)
106 modlintlib: $(MODLINTLIB_DEPS)
108 clean.lint: $(CLEAN_LINT_DEPS)
110 install: $(INSTALL_DEPS)
113 # Include common targets.
115 include $(UTSBASE)/intel/Makefile.targ
119 # Defines for local commands.
121 WARLOCK = warlock
122 WLCC = wlcc
123 TOUCH = touch
124 TEST = test
126 AHCI_FILES = $(MODULE).ll
127 SD_FILES = $(SD_OBJS:%.o=../sd/%.ll)
128 SATA_FILES = $(SATA_OBJS:%.o=-l ../sata/%.ll)
129 SCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
130 CMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll)
132 warlock: $(WARLOCK_OK)
134 $(WARLOCK_OK): $(WLCMD_DIR)/ahci.wlcmd $(WARLOCK_OUT) warlock_ddi.files \
135 sata.files scsi.files sd.files cmlb.files
136 $(WARLOCK) -c $(WLCMD_DIR)/ahci.wlcmd $(WARLOCK_OUT) \
137 $(SD_FILES) \
138 $(SCSI_FILES) \
139 $(CMLB_FILES) \
140 $(SATA_FILES) \
141 -l ../warlock/ddi_dki_impl.ll
142 $(TOUCH) $@
144 %.ll: $(UTSBASE)/common/io/sata/adapters/ahci/%.c
145 $(WLCC) $(CPPFLAGS) -D DEBUG -o $@ $<
147 sata.files:
148 @cd ../sata; pwd; $(MAKE) warlock
150 scsi.files:
151 @cd ../scsi; pwd; $(MAKE) warlock
153 sd.files:
154 @cd ../sd; pwd; $(MAKE) warlock_alone
156 cmlb.files:
157 @cd ../cmlb; pwd; $(MAKE) warlock
159 warlock_ddi.files:
160 @cd ../warlock; pwd; $(MAKE) warlock