xref: /titanic_51/usr/src/uts/intel/usb_ac/Makefile (revision 602ca9ea8f9ce0933f0944601cc5d230e91a950d)
1#
2# CDDL HEADER START
3#
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.
7#
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.
12#
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]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# uts/intel/usb_ac/Makefile
26#
27#	This makefile drives the production of the usb_ac driver
28#	kernel module. Intel architecture dependent
29#
30
31#ident	"%Z%%M%	%I%	%E% SMI"
32
33#
34#	Path to the base of the uts directory tree (usually /usr/src/uts).
35#
36UTSBASE	= ../..
37
38#
39#	Define the module and object file sets.
40#
41MODULE		= usb_ac
42OBJECTS		= $(USB_AC_OBJS:%=$(OBJS_DIR)/%)
43LINTS		= $(USB_AC_OBJS:%.o=$(LINTS_DIR)/%.ln)
44ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
45CONF_SRCDIR	= $(UTSBASE)/common/io/usb/clients/audio/usb_ac
46WARLOCK_OUT	= $(USB_AC_OBJS:%.o=%.ll) usb_ac_dacf.ll
47WARLOCK_OK	= $(MODULE).ok
48WLCMD_DIR	= $(UTSBASE)/common/io/warlock
49
50#
51#	Include common rules.
52#
53include $(UTSBASE)/intel/Makefile.intel
54
55#
56#	Define targets
57#
58ALL_TARGET	= $(BINARY) $(SRC_CONFILE)
59LINT_TARGET	= $(MODULE).lint
60INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
61
62#
63#	Override defaults to build a unique, local modstubs.o.
64#
65MODSTUBS_DIR	 = $(OBJS_DIR)
66CLEANFILES	+= $(MODSTUBS_O)
67
68#
69# depends on misc/usba
70#
71LDFLAGS += -dy -Nmisc/usba -Nmisc/audiosup -Nmisc/mixer
72
73#
74# For now, disable these lint checks; maintainers should endeavor
75# to investigate and remove these for maximum lint coverage.
76# Please do not carry these forward to new Makefiles.
77#
78LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
79LINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
80LINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
81LINTTAGS	+= -erroff=E_SUSPICIOUS_COMPARISON
82
83#
84#	Default build targets.
85#
86.KEEP_STATE:
87
88def:		$(DEF_DEPS)
89
90all:		$(ALL_DEPS)
91
92clean:		$(CLEAN_DEPS)
93		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
94
95clobber:	$(CLOBBER_DEPS)
96		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
97
98lint:		$(LINT_DEPS)
99
100modlintlib:	$(MODLINTLIB_DEPS)
101
102clean.lint:	$(CLEAN_LINT_DEPS)
103
104install:	$(INSTALL_DEPS)
105
106#
107#	Include common targets.
108#
109include $(UTSBASE)/intel/Makefile.targ
110
111#
112#	Defines for local commands.
113#
114WARLOCK		= warlock
115WLCC		= wlcc
116TOUCH		= touch
117TEST		= test
118
119#
120#	lock_lint rules
121#
122USBA_FILES	= $(USBA_OBJS:%.o=../usba/%.ll)
123UHCI_FILES	= $(UHCI_OBJS:%.o=../uhci/%.ll)
124OHCI_FILES	= $(OHCI_OBJS:%.o=../ohci/%.ll)
125EHCI_FILES	= $(EHCI_OBJS:%.o=../ehci/%.ll)
126MIXER_FILES	= $(MIXER_OBJS:%.o=../mixer/%.ll)
127AUDIO_SUP_FILES	= $(AUDIO_SUP_OBJS:%.o=../audiosup/%.ll)
128AMSRC2_FILES = $(AMSRC2_OBJS:%.o=$(UTSBASE)/intel/amsrc2/%.ll)
129
130
131#
132#	Warlock targets
133#
134warlock: $(WARLOCK_OK)
135
136$(WARLOCK_OK):	$(WARLOCK_OUT) warlock_ddi.files \
137	warlock_audiosup.files warlock_mixer.files \
138	warlock_standalone warlock_with_usba  warlock_with_sada
139	$(TOUCH) $(WARLOCK_OK)
140
141warlock_with_sada: $(WLCMD_DIR)/usb_ac_with_sada.wlcmd \
142	$(WARLOCK_OUT) \
143	warlock_audiosup.files  warlock_mixer.files warlock_amsrc2.files
144	$(WARLOCK) -c $(WLCMD_DIR)/usb_ac_with_sada.wlcmd $(WARLOCK_OUT) \
145	$(MIXER_FILES) $(AUDIO_SUP_FILES) $(AMSRC2_FILES) \
146	-l ../warlock/ddi_dki_impl.ll
147
148
149warlock_with_usba: $(WLCMD_DIR)/usb_ac_with_usba.wlcmd  $(WARLOCK_OUT) \
150	warlock_ddi.files warlock_usba.files warlock_ohci.files \
151	warlock_ehci.files warlock_uhci.files
152	$(WARLOCK) -c $(WLCMD_DIR)/usb_ac_with_usba.wlcmd \
153	$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
154	$(WARLOCK_OUT)  -l ../warlock/ddi_dki_impl.ll
155
156warlock_standalone: $(WARLOCK_OUT) warlock_ddi.files $(WLCMD_DIR)/usb_ac.wlcmd
157	$(WARLOCK) -c $(WLCMD_DIR)/usb_ac.wlcmd $(WARLOCK_OUT) \
158	-l ../warlock/ddi_dki_impl.ll
159
160%.ll: $(UTSBASE)/common/io/usb/clients/audio/usb_ac/%.c
161	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
162
163warlock_usba.files:
164	@cd ../usba;pwd; $(MAKE) warlock
165
166warlock_ohci.files:
167	@cd ../ohci;pwd; $(MAKE) warlock
168
169warlock_uhci.files:
170	@cd ../uhci;pwd; $(MAKE) warlock
171
172warlock_ehci.files:
173	@cd ../ehci;pwd; $(MAKE) warlock
174
175warlock_ddi.files:
176	@cd ../warlock; pwd; $(MAKE) warlock
177
178warlock_audiosup.files:
179	@cd ../audiosup; pwd; $(MAKE) warlock
180
181warlock_mixer.files:
182	@cd ../mixer; pwd; $(MAKE) warlock
183
184warlock_amsrc2.files:
185	@cd ../amsrc2; pwd; $(MAKE) warlock
186