Makefile revision 4604:5989fb2cb1d5
1251876Speter#
2251876Speter# CDDL HEADER START
3251876Speter#
4251876Speter# The contents of this file are subject to the terms of the
5251876Speter# Common Development and Distribution License (the "License").
6251876Speter# You may not use this file except in compliance with the License.
7251876Speter#
8251876Speter# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9251876Speter# or http://www.opensolaris.org/os/licensing.
10251876Speter# See the License for the specific language governing permissions
11251876Speter# and limitations under the License.
12251876Speter#
13251876Speter# When distributing Covered Code, include this CDDL HEADER in each
14251876Speter# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15251876Speter# If applicable, add the following below this CDDL HEADER, with the
16251876Speter# fields enclosed by brackets "[]" replaced with your own identifying
17251876Speter# information: Portions Copyright [yyyy] [name of copyright owner]
18251876Speter#
19251876Speter# CDDL HEADER END
20251876Speter#
21251876Speter#
22251876Speter# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23251876Speter# Use is subject to license terms.
24251876Speter#
25251876Speter# uts/intel/audioixp/Makefile
26251876Speter#
27251876Speter#
28251876Speter#ident	"%Z%%M%	%I%	%E% SMI"
29251876Speter#
30251876Speter#	This makefile drives the production of high definition audio
31251876Speter#	driver (audioixp) kernel module.
32251876Speter#
33251876Speter#
34251876Speter#	Path to the base of the uts directory tree (usually /usr/src/uts).
35251876Speter#
36251876SpeterUTSBASE = ../..
37251876Speter
38251876Speter#
39251876Speter#	Define the module and object file sets.
40251876Speter#
41251876SpeterMODULE		= audioixp
42251876SpeterOBJECTS		= $(AUDIOIXP_OBJS:%=$(OBJS_DIR)/%)
43251876SpeterLINTS		= $(AUDIOIXP_OBJS:%.o=$(LINTS_DIR)/%.ln)
44251876SpeterROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
45251876SpeterCONF_SRCDIR	= $(UTSBASE)/common/io/audio/sada/drv/audioixp
46251876SpeterWARLOCK_OUT 	= $(AUDIOIXP_OBJS:%.o=%.ll)
47251876SpeterWARLOCK_OK	= $(MODULE).ok
48251876SpeterWLCMD_DIR       = $(UTSBASE)/common/io/warlock
49251876Speter
50251876Speter#
51251876Speter#	Include common rules.
52251876Speter#
53251876Speterinclude $(UTSBASE)/intel/Makefile.intel
54251876Speter
55251876Speter# 
56251876Speter#	Overrides, lint pass one enforcement 
57251876Speter# 
58251876SpeterCFLAGS		+= $(CCVERBOSE)
59251876SpeterDEBUG_FLGS	=
60251876Speter$(NOT_RELEASE_BUILD)DEBUG_DEFS	+= $(DEBUG_FLGS)
61251876Speter
62251876Speter#
63251876Speter#	Depends on misc/audiosup
64251876Speter#
65251876SpeterLDFLAGS		+= -dy -Nmisc/amsrc2 -Nmisc/audiosup -Nmisc/mixer
66251876Speter
67251876Speter#
68251876Speter#	Define targets
69251876Speter#
70251876SpeterALL_TARGET	= $(BINARY) $(SRC_CONFILE)
71251876SpeterLINT_TARGET	= $(MODULE).lint
72251876SpeterINSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
73251876Speter
74251876Speter#
75251876Speter# For now, disable these lint checks; maintainers should endeavor
76251876Speter# to investigate and remove these for maximum lint coverage.
77251876Speter# Please do not carry these forward to new Makefiles.
78251876Speter#
79251876SpeterLINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
80251876Speter
81251876Speter#
82251876Speter#	Default build targets.
83251876Speter#
84251876Speter.KEEP_STATE:
85251876Speter
86251876Speterdef:		$(DEF_DEPS)
87251876Speter
88251876Speterall:		$(ALL_DEPS)
89251876Speter
90251876Speterclean:		$(CLEAN_DEPS)
91251876Speter		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
92251876Speter
93251876Speterclobber:	$(CLOBBER_DEPS)
94251876Speter		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
95251876Speter
96251876Speterlint:		$(LINT_DEPS)
97251876Speter
98251876Spetermodlintlib:	$(MODLINTLIB_DEPS)
99
100clean.lint:	$(CLEAN_LINT_DEPS)
101
102install:	$(INSTALL_DEPS)
103
104#
105#	Include common targets.
106#
107include $(UTSBASE)/intel/Makefile.targ
108
109#
110#	Defines for local commands.
111#
112TEST		= test
113WLCC		= wlcc
114TOUCH		= touch
115WARLOCK 	= warlock
116
117#
118#	Warlock targets
119#
120# NOTE: there will be warnings about q_lock which is the simulated
121# rwlock of the taskq framework
122#
123MIXER_FILES = $(MIXER_OBJS:%.o=$(UTSBASE)/intel/mixer/%.ll)
124AUDIO_SUP_FILES = $(AUDIO_SUP_OBJS:%.o=$(UTSBASE)/intel/audiosup/%.ll)
125AMSRC2_FILES = $(AMSRC2_OBJS:%.o=$(UTSBASE)/intel/amsrc2/%.ll)
126
127warlock:	$(WARLOCK_OK)
128
129$(WARLOCK_OK):	$(WARLOCK_OUT) warlock_ddi.files warlock_standalone \
130	warlock_audiosup.files warlock_mixer.files warlock_amsrc2.files \
131	$(WLCMD_DIR)/audioixp_with_sada.wlcmd
132	$(WARLOCK) -c $(WLCMD_DIR)/audioixp_with_sada.wlcmd $(WARLOCK_OUT) \
133	$(MIXER_FILES) $(AUDIO_SUP_FILES) $(AMSRC2_FILES) \
134	-l ../../intel/warlock/ddi_dki_impl.ll
135	$(TOUCH) $(WARLOCK_OK)
136
137%.ll: $(UTSBASE)/common/io/audio/sada/drv/audioixp/%.c
138	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
139
140warlock_standalone: $(WARLOCK_OUT) warlock_ddi.files $(WLCMD_DIR)/audioixp.wlcmd
141	$(WARLOCK) -c $(WLCMD_DIR)/audioixp.wlcmd $(WARLOCK_OUT) \
142	-l ../../intel/warlock/ddi_dki_impl.ll
143
144warlock_ddi.files:
145	@cd ../../intel/warlock; pwd; $(MAKE) warlock
146
147warlock_audiosup.files:
148	@cd ../../intel/audiosup; pwd; $(MAKE) warlock
149
150warlock_amsrc2.files:
151	@cd ../../intel/amsrc2; pwd; $(MAKE) warlock
152
153warlock_mixer.files:
154	@cd ../../intel/mixer; pwd; $(MAKE) warlock
155