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/scsa2usb/Makefile
23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
26 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
28 # This makefile drives the production of the scsa2usb driver
29 # kernel module. intel architecture dependent
33 # Path to the base of the uts directory tree (usually /usr/src/uts).
38 # Define the module and object file sets.
41 OBJECTS
= $(SCSA2USB_OBJS
:%=$(OBJS_DIR
)/%)
42 LINTS
= $(SCSA2USB_OBJS
:%.o
=$(LINTS_DIR
)/%.ln
)
43 ROOTMODULE
= $(ROOT_DRV_DIR
)/$(MODULE
)
44 CONF_SRCDIR
= $(UTSBASE
)/common
/io
/usb
/scsa2usb
45 WARLOCK_OUT
= $(SCSA2USB_OBJS
:%.o
=%.ll
)
46 WARLOCK_OK
= $(MODULE
).ok
47 WLCMD_DIR
= $(UTSBASE
)/common
/io
/warlock
50 # Include common rules.
52 include $(UTSBASE
)/intel
/Makefile.intel
57 ALL_TARGET
= $(BINARY
) $(SRC_CONFILE
)
58 LINT_TARGET
= $(MODULE
).lint
59 INSTALL_TARGET
= $(BINARY
) $(ROOTMODULE
) $(ROOT_CONFFILE
)
62 # Override defaults to build a unique, local modstubs.o.
64 MODSTUBS_DIR
= $(OBJS_DIR
)
65 CLEANFILES
+= $(MODSTUBS_O
)
68 # depends on misc/usba misc/scsi
70 LDFLAGS
+= -dy
-Nmisc
/usba
-Nmisc
/scsi
73 # For now, disable these lint checks; maintainers should endeavor
74 # to investigate and remove these for maximum lint coverage.
75 # Please do not carry these forward to new Makefiles.
77 LINTTAGS
+= -erroff
=E_BAD_PTR_CAST_ALIGN
79 CERRWARN
+= -_gcc
=-Wno-unused-label
80 CERRWARN
+= -_gcc
=-Wno-uninitialized
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
111 # Defines for local commands.
121 USBA_FILES
= $(USBA_OBJS
:%.o
=..
/usba
/%.ll
)
122 UHCI_FILES
= $(UHCI_OBJS
:%.o
=..
/uhci
/%.ll
)
123 OHCI_FILES
= $(OHCI_OBJS
:%.o
=..
/ohci
/%.ll
)
124 EHCI_FILES
= $(EHCI_OBJS
:%.o
=..
/ehci
/%.ll
)
125 SD_FILES
= $(SD_OBJS
:%.o
=..
/sd
/%.ll
)
126 ST_FILES
= $(ST_OBJS
:%.o
=..
/st
/%.ll
)
127 SCSI_FILES
= $(SCSI_OBJS
:%.o
= -l ..
/scsi
/%.ll
)
128 CMLB_FILES
= $(CMLB_OBJS
:%.o
=-l ..
/cmlb
/%.ll
)
130 warlock
: $(WARLOCK_OK
) warlock_with_usba
132 $(WARLOCK_OK
): $(WARLOCK_OUT
) $(WLCMD_DIR
)/scsa2usb.wlcmd warlock_ddi.files \
134 $(WARLOCK
) -c
$(WLCMD_DIR
)/scsa2usb.wlcmd
$(WARLOCK_OUT
) \
137 -l ..
/warlock
/ddi_dki_impl.ll
140 %.ll
: $(UTSBASE
)/common
/io
/usb
/scsa2usb
/%.c \
141 $(UTSBASE
)/common
/sys
/usb
/clients
/mass_storage
/usb_bulkonly.h \
142 $(UTSBASE
)/common
/sys
/usb
/clients
/mass_storage
/usb_cbi.h \
143 $(UTSBASE
)/common
/sys
/usb
/scsa2usb
/scsa2usb.h
144 $(WLCC
) $(CPPFLAGS
) -DDEBUG
-o
$@
$<
146 warlock_with_usba
: $(WLCMD_DIR
)/scsa2usb_with_usba.wlcmd \
147 $(WARLOCK_OUT
) usba_files \
148 ohci_files ehci_files uhci_files warlock_ddi.files sd.files st.files \
149 cmlb.files scsi.files
150 $(WARLOCK
) -c
$(WLCMD_DIR
)/scsa2usb_with_usba.wlcmd \
151 $(USBA_FILES
) $(OHCI_FILES
) $(EHCI_FILES
) $(UHCI_FILES
) \
157 -l ..
/warlock
/ddi_dki_impl.ll
160 @cd ..
/usba
;pwd
; $(MAKE
) warlock
163 @cd ..
/uhci
;pwd
; $(MAKE
) warlock
166 @cd ..
/ohci
;pwd
; $(MAKE
) warlock
169 @cd ..
/ehci
;pwd
; $(MAKE
) warlock
172 @cd ..
/warlock
; pwd
; $(MAKE
) warlock
175 @cd ..
/scsi
; pwd
; $(MAKE
) warlock
178 @cd ..
/sd
; pwd
; $(MAKE
) warlock_alone
181 @cd ..
/st
; pwd
; $(MAKE
) warlock_alone
184 @cd ..
/cmlb
; pwd
; $(MAKE
) warlock