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]
22 # uts/intel/ses/Makefile
24 # Copyright 2007 Sun Microsystems, Inc. All rights reserved.
25 # Use is subject to license terms.
26 # Copyright (c) 2011 Bayard G. Bell. All rights reserved.
28 # This makefile drives the production of the ses (SCSI enclosure
29 # services) driver kernel module.
31 # intel implementation 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
= $(SES_OBJS
:%=$(OBJS_DIR
)/%)
44 LINTS
= $(SES_OBJS
:%.o
=$(LINTS_DIR
)/%.ln
)
45 ROOTMODULE
= $(ROOT_DRV_DIR
)/$(MODULE
)
46 CONF_SRCDIR
= $(UTSBASE
)/intel
/io
/scsi
/targets
47 WARLOCK_OUT
= $(SES_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
) $(SRC_CONFILE
)
60 LINT_TARGET
= $(MODULE
).lint
61 INSTALL_TARGET
= $(BINARY
) $(ROOTMODULE
) $(ROOT_CONFFILE
)
62 CLEANFILES
+= $(WARLOCK_TARGETS
)
65 # For now, disable these lint checks; maintainers should endeavor
66 # to investigate and remove these for maximum lint coverage.
67 # Please do not carry these forward to new Makefiles.
69 LINTTAGS
+= -erroff
=E_ASSIGN_NARROW_CONV
70 LINTTAGS
+= -erroff
=E_BAD_PTR_CAST_ALIGN
75 LDFLAGS
+= -dy
-N misc
/scsi
78 # Default build targets.
87 $(RM
) $(WARLOCK_OUT
) $(WARLOCK_OK
)
89 clobber: $(CLOBBER_DEPS
)
90 $(RM
) $(WARLOCK_OUT
) $(WARLOCK_OK
)
94 modlintlib
: $(MODLINTLIB_DEPS
)
96 clean.lint
: $(CLEAN_LINT_DEPS
)
98 install: $(INSTALL_DEPS
)
101 # Include common targets.
103 include $(UTSBASE
)/intel
/Makefile.targ
107 # Defines for local commands.
117 SCSI_FILES
= $(SCSI_OBJS
:%.o
=-l ..
/scsi
/%.ll
)
119 WARLOCK_TARGETS
= $(WARLOCK_OK
)
121 warlock
: $(WARLOCK_TARGETS
)
123 # XXX FIX ME: why only ses.ll?
125 $(WARLOCK_OK
): $(WLCMD_DIR
)/$(MODULE
).wlcmd
$(WARLOCK_OUT
)
126 @cd ..
/warlock
; $(MAKE
) warlock
127 @cd ..
/scsi
; $(MAKE
) warlock
128 $(WARLOCK
) -c
$(WLCMD_DIR
)/$(MODULE
).wlcmd ses.ll \
130 -l ..
/warlock
/ddi_dki_impl.ll \
134 %.ll
: $(UTSBASE
)/common
/io
/scsi
/targets
/%.c
135 $(WLCC
) $(CPPFLAGS
) -o
$@
$<
138 @cd ..
/warlock
; pwd
; $(MAKE
) warlock