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]
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).
40 # Define the module and object file sets.
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
59 ALL_TARGET
= $(BINARY
)
60 LINT_TARGET
= $(MODULE
).lint
61 INSTALL_TARGET
= $(BINARY
) $(ROOTMODULE
)
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.
99 $(RM
) $(WARLOCK_OUT
) $(WARLOCK_OK
)
101 clobber: $(CLOBBER_DEPS
)
102 $(RM
) $(WARLOCK_OUT
) $(WARLOCK_OK
)
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.
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
) \
141 -l ..
/warlock
/ddi_dki_impl.ll
144 %.ll
: $(UTSBASE
)/common
/io
/sata
/adapters
/ahci
/%.c
145 $(WLCC
) $(CPPFLAGS
) -D DEBUG
-o
$@
$<
148 @cd ..
/sata
; pwd
; $(MAKE
) warlock
151 @cd ..
/scsi
; pwd
; $(MAKE
) warlock
154 @cd ..
/sd
; pwd
; $(MAKE
) warlock_alone
157 @cd ..
/cmlb
; pwd
; $(MAKE
) warlock
160 @cd ..
/warlock
; pwd
; $(MAKE
) warlock