xref: /titanic_50/usr/src/uts/intel/usb_ac/Makefile (revision 8668df41d90e075636bc3817b28ad77cbd470959)
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 2006 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
117SCCS		= sccs
118TEST		= test
119
120#
121#	lock_lint rules
122#
123USBA_FILES	= $(USBA_OBJS:%.o=../usba/%.ll)
124UHCI_FILES	= $(UHCI_OBJS:%.o=../uhci/%.ll)
125OHCI_FILES	= $(OHCI_OBJS:%.o=../ohci/%.ll)
126EHCI_FILES	= $(EHCI_OBJS:%.o=../ehci/%.ll)
127MIXER_FILES	= $(MIXER_OBJS:%.o=../mixer/%.ll)
128AUDIO_SUP_FILES	= $(AUDIO_SUP_OBJS:%.o=../audiosup/%.ll)
129AMSRC2_FILES = $(AMSRC2_OBJS:%.o=$(UTSBASE)/intel/amsrc2/%.ll)
130
131
132#
133#	Warlock targets
134#
135%.wlcmd:
136	cd $(WLCMD_DIR); $(TEST) -f $@  || $(SCCS) get $@
137
138warlock: $(WARLOCK_OK)
139
140$(WARLOCK_OK):	$(WARLOCK_OUT) warlock_ddi.files \
141	warlock_audiosup.files warlock_mixer.files \
142	warlock_standalone warlock_with_usba  warlock_with_sada
143	$(TOUCH) $(WARLOCK_OK)
144
145warlock_with_sada: usb_ac_with_sada.wlcmd \
146	$(WARLOCK_OUT) \
147	warlock_audiosup.files  warlock_mixer.files warlock_amsrc2.files
148	$(WARLOCK) -c $(WLCMD_DIR)/usb_ac_with_sada.wlcmd $(WARLOCK_OUT) \
149	$(MIXER_FILES) $(AUDIO_SUP_FILES) $(AMSRC2_FILES) \
150	-l ../warlock/ddi_dki_impl.ll
151
152
153warlock_with_usba: usb_ac_with_usba.wlcmd  $(WARLOCK_OUT) \
154	warlock_ddi.files warlock_usba.files warlock_ohci.files \
155	warlock_ehci.files warlock_uhci.files
156	$(WARLOCK) -c $(WLCMD_DIR)/usb_ac_with_usba.wlcmd \
157	$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
158	$(WARLOCK_OUT)  -l ../warlock/ddi_dki_impl.ll
159
160warlock_standalone: $(WARLOCK_OUT) warlock_ddi.files usb_ac.wlcmd
161	$(WARLOCK) -c $(WLCMD_DIR)/usb_ac.wlcmd $(WARLOCK_OUT) \
162	-l ../warlock/ddi_dki_impl.ll
163
164%.ll: $(UTSBASE)/common/io/usb/clients/audio/usb_ac/%.c
165	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
166
167warlock_usba.files:
168	@cd ../usba;pwd; $(MAKE) warlock
169
170warlock_ohci.files:
171	@cd ../ohci;pwd; $(MAKE) warlock
172
173warlock_uhci.files:
174	@cd ../uhci;pwd; $(MAKE) warlock
175
176warlock_ehci.files:
177	@cd ../ehci;pwd; $(MAKE) warlock
178
179warlock_ddi.files:
180	@cd ../warlock; pwd; $(MAKE) warlock
181
182warlock_audiosup.files:
183	@cd ../audiosup; pwd; $(MAKE) warlock
184
185warlock_mixer.files:
186	@cd ../mixer; pwd; $(MAKE) warlock
187
188warlock_amsrc2.files:
189	@cd ../amsrc2; pwd; $(MAKE) warlock
190