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 2009 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
29 # This makefile drives the production of the
30 # "platform/i86pc/kernel/drv/si3124" kernel module.
32 # intel architecture dependent
36 # Path to the base of the uts directory tree (usually /usr/src/uts).
41 # Define the module and object file sets.
44 OBJECTS
= $(SI3124_OBJS
:%=$(OBJS_DIR
)/%)
45 LINTS
= $(SI3124_OBJS
:%.o
=$(LINTS_DIR
)/%.ln
)
46 ROOTMODULE
= $(ROOT_DRV_DIR
)/$(MODULE
)
47 CONF_SRCDIR
= $(UTSBASE
)/common
/io
/sata
/adapters
/si3124
48 WARLOCK_OUT
= $(SI3124_OBJS
:%.o
=%.ll
)
49 WARLOCK_OK
= $(MODULE
).ok
50 WLCMD_DIR
= $(UTSBASE
)/common
/io
/warlock
53 # Include common rules.
55 include $(UTSBASE
)/intel
/Makefile.intel
60 ALL_TARGET
= $(BINARY
)
61 LINT_TARGET
= $(MODULE
).lint
62 INSTALL_TARGET
= $(BINARY
) $(ROOTMODULE
)
68 DEBUG_DEFS
+= $(DEBUG_FLGS
)
70 CERRWARN
+= -_gcc
=-Wno-uninitialized
73 # lint pass one enforcement
75 CFLAGS
+= $(CCVERBOSE
)
79 # we depend on the sata module
80 LDFLAGS
+= -dy
-N misc
/sata
83 # Default build targets.
92 $(RM
) $(WARLOCK_OUT
) $(WARLOCK_OK
)
94 clobber: $(CLOBBER_DEPS
)
95 $(RM
) $(WARLOCK_OUT
) $(WARLOCK_OK
)
99 modlintlib
: $(MODLINTLIB_DEPS
)
101 clean.lint
: $(CLEAN_LINT_DEPS
)
103 install: $(INSTALL_DEPS
)
106 # Include common targets.
108 include $(UTSBASE
)/intel
/Makefile.targ
112 # Defines for local commands.
119 SI3124_FILES
= $(MODULE
).ll
120 SD_FILES
= $(SD_OBJS
:%.o
=..
/sd
/%.ll
)
121 SATA_FILES
= $(SATA_OBJS
:%.o
=-l ..
/sata
/%.ll
)
122 SCSI_FILES
= $(SCSI_OBJS
:%.o
=-l ..
/scsi
/%.ll
)
123 CMLB_FILES
= $(CMLB_OBJS
:%.o
=-l ..
/cmlb
/%.ll
)
125 warlock
: $(WARLOCK_OK
)
127 $(WARLOCK_OK
): $(WLCMD_DIR
)/si3124.wlcmd
$(WARLOCK_OUT
) warlock_ddi.files \
128 sata.files scsi.files sd.files cmlb.files
129 $(WARLOCK
) -c
$(WLCMD_DIR
)/si3124.wlcmd
$(WARLOCK_OUT
) \
134 -l ..
/warlock
/ddi_dki_impl.ll
137 %.ll
: $(UTSBASE
)/common
/io
/sata
/adapters
/si3124
/%.c
138 $(WLCC
) $(CPPFLAGS
) -D DEBUG
-o
$@
$<
141 @cd ..
/sata
; pwd
; $(MAKE
) warlock
144 @cd ..
/scsi
; pwd
; $(MAKE
) warlock
147 @cd ..
/sd
; pwd
; $(MAKE
) warlock_alone
150 @cd ..
/cmlb
; pwd
; $(MAKE
) warlock
153 @cd ..
/warlock
; pwd
; $(MAKE
) warlock