xref: /titanic_52/usr/src/uts/sparc/audiots/Makefile (revision bdfc6d18da790deeec2e0eb09c625902defe2498)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# uts/sparc/audiots/Makefile
27#
28#pragma ident	"%Z%%M%	%I%	%E% SMI"
29#
30#	This makefile drives the production of the T2 audio driver
31#	(audiots) kernel module.
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		= audiots
42OBJECTS		= $(AUDIOTS_OBJS:%=$(OBJS_DIR)/%)
43LINTS		= $(AUDIOTS_OBJS:%.o=$(LINTS_DIR)/%.ln)
44ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
45CONF_SRCDIR	= $(UTSBASE)/common/io/audio/sada/drv/audiots
46
47WARLOCK_OBJECTS = $(AUDIOTS_OBJS:%.o=%.ll)
48WARLOCK_OK	= $(MODULE).ok
49
50#
51#	Include common rules.
52#
53include $(UTSBASE)/sparc/Makefile.sparc
54
55#
56#	Overrides, lint pass one enforcement
57#
58CFLAGS		+= $(CCVERBOSE)
59
60#
61#	Depends on misc/audiosup
62#
63LDFLAGS		+= -dy -Nmisc/amsrc2 -Nmisc/mixer -Nmisc/audiosup
64
65#
66#	Define targets
67#
68ALL_TARGET	= $(BINARY) $(SRC_CONFILE)
69LINT_TARGET	= $(MODULE).lint
70INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE_64)
71
72#
73#       Overrides
74#
75ALL_BUILDS	= $(ALL_BUILDSONLY64)
76DEF_BUILDS	= $(DEF_BUILDSONLY64)
77CLEANLINTFILES	+= $(LINT32_FILES)
78
79#
80#	Default build targets.
81#
82.KEEP_STATE:
83
84def:		$(DEF_DEPS)
85
86all:		$(ALL_DEPS)
87
88clean:		$(CLEAN_DEPS); \
89		$(RM) $(WARLOCK_OBJECTS) $(WARLOCK_OK)
90
91clobber:	$(CLOBBER_DEPS); \
92		$(RM) $(WARLOCK_OBJECTS) $(WARLOCK_OK)
93
94lint:		$(LINT_DEPS)
95
96modlintlib:	$(MODLINTLIB_DEPS) lint32
97
98clean.lint:	$(CLEAN_LINT_DEPS)
99
100install:	$(INSTALL_DEPS)
101
102#
103#	Include common targets.
104#
105include $(UTSBASE)/sparc/Makefile.targ
106
107#
108#	Defines for local commands.
109#
110SCCS		= sccs
111TEST		= test
112WLCC		= wlcc
113TOUCH		= touch
114WARLOCK 	= warlock
115
116#
117#	Mapfile target
118#
119mapfile:
120	$(TEST) -f $@ || $(SCCS) get $@
121
122#
123#	Warlock targets
124#
125# NOTE: there will be warnings about q_lock which is the simulated
126# rwlock of the taskq framework
127#
128
129%.wlcmd:
130	$(TEST) -f $@ || $(SCCS) get $@
131
132warlock:	$(WARLOCK_OK)
133
134$(WARLOCK_OK):	$(WARLOCK_OBJECTS) warlock_ddi.files \
135	warlock_audiosup.files warlock_mixer.files warlock_amsrc2.files
136	$(WARLOCK) -c audiots_with_sada.wlcmd $(WARLOCK_OBJECTS) \
137	../audiosup/audio_support.ll ../amsrc2/am_src2.ll \
138	../mixer/am_main.ll ../mixer/am_ad.ll ../mixer/am_ioctl.ll \
139	-l ../warlock/ddi_dki_impl.ll
140	$(TOUCH) $(WARLOCK_OK)
141
142%.ll: $(UTSBASE)/common/io/audio/sada/drv/audiots/%.c
143	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
144
145warlock_standalone: $(WARLOCK_OBJECTS) warlock_ddi.files audiots.wlcmd
146	$(WARLOCK) -c audiots.wlcmd $(WARLOCK_OBJECTS) \
147	-l ../warlock/ddi_dki_impl.ll
148
149warlock_ddi.files:
150	@cd ../warlock; pwd; $(MAKE) warlock
151
152warlock_audiosup.files:
153	@cd ../audiosup; pwd; $(MAKE) warlock
154
155warlock_amsrc2.files:
156	@cd ../amsrc2; pwd; $(MAKE) warlock
157
158warlock_mixer.files:
159	@cd ../mixer; pwd; $(MAKE) warlock
160