xref: /titanic_51/usr/src/uts/intel/audioemu10k/Makefile (revision 7f11fd00fc23e2af7ae21cc8837a2b86380dcfa7)
1992413f4SGarrett D'Amore#
2992413f4SGarrett D'Amore# CDDL HEADER START
3992413f4SGarrett D'Amore#
4992413f4SGarrett D'Amore# The contents of this file are subject to the terms of the
5992413f4SGarrett D'Amore# Common Development and Distribution License (the "License").
6992413f4SGarrett D'Amore# You may not use this file except in compliance with the License.
7992413f4SGarrett D'Amore#
8992413f4SGarrett D'Amore# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9992413f4SGarrett D'Amore# or http://www.opensolaris.org/os/licensing.
10992413f4SGarrett D'Amore# See the License for the specific language governing permissions
11992413f4SGarrett D'Amore# and limitations under the License.
12992413f4SGarrett D'Amore#
13992413f4SGarrett D'Amore# When distributing Covered Code, include this CDDL HEADER in each
14992413f4SGarrett D'Amore# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15992413f4SGarrett D'Amore# If applicable, add the following below this CDDL HEADER, with the
16992413f4SGarrett D'Amore# fields enclosed by brackets "[]" replaced with your own identifying
17992413f4SGarrett D'Amore# information: Portions Copyright [yyyy] [name of copyright owner]
18992413f4SGarrett D'Amore#
19992413f4SGarrett D'Amore# CDDL HEADER END
20992413f4SGarrett D'Amore#
21992413f4SGarrett D'Amore#
22992413f4SGarrett D'Amore# uts/intel/audioemu10k/Makefile
23992413f4SGarrett D'Amore#
24992413f4SGarrett D'Amore# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25992413f4SGarrett D'Amore# Use is subject to license terms.
26992413f4SGarrett D'Amore#
27992413f4SGarrett D'Amore#	This makefile drives the production of the audioemu10k driver.
28992413f4SGarrett D'Amore#
29992413f4SGarrett D'Amore
30992413f4SGarrett D'Amore#
31992413f4SGarrett D'Amore#	Path to the base of the uts directory tree (usually /usr/src/uts).
32992413f4SGarrett D'Amore#
33992413f4SGarrett D'AmoreUTSBASE = ../..
34992413f4SGarrett D'Amore
35992413f4SGarrett D'Amore#
36992413f4SGarrett D'Amore#	Define the module and object file sets.
37992413f4SGarrett D'Amore#
38992413f4SGarrett D'AmoreMODULE		= audioemu10k
39992413f4SGarrett D'AmoreOBJECTS		= $(AUDIOEMU10K_OBJS:%=$(OBJS_DIR)/%)
40992413f4SGarrett D'AmoreLINTS		= $(AUDIOEMU10K_OBJS:%.o=$(LINTS_DIR)/%.ln)
41992413f4SGarrett D'AmoreROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
42992413f4SGarrett D'AmoreDSP_SRCDIR	= $(UTSBASE)/common/io/audio/drv/audioemu10k/dsp
43992413f4SGarrett D'AmoreDSP_HNAMES	= emu10k_gpr.h emu10k1_dsp.h emu10k2_dsp.h
44992413f4SGarrett D'AmoreDSP_HDRS	= $(DSP_HNAMES:%=$(OBJS_DIR)/%)
45992413f4SGarrett D'AmoreDSP_SNAMES	= emu10k.dsp emu10k1.mac emu10k2.mac
46992413f4SGarrett D'AmoreDSP_SRCS	= $(DSP_SNAMES:%=$(DSP_SRCDIR)/%)
47992413f4SGarrett D'AmoreASM10K		= $(OBJS_DIR)/asm10k
48992413f4SGarrett D'Amore
49992413f4SGarrett D'Amore#
50992413f4SGarrett D'Amore#	Include common rules.
51992413f4SGarrett D'Amore#
52992413f4SGarrett D'Amoreinclude $(UTSBASE)/intel/Makefile.intel
53992413f4SGarrett D'Amore
54992413f4SGarrett D'Amore#
55992413f4SGarrett D'Amore#	Define targets
56992413f4SGarrett D'Amore#
57992413f4SGarrett D'AmoreALL_TARGET	= $(BINARY)
58992413f4SGarrett D'AmoreLINT_TARGET	= $(MODULE).lint
59992413f4SGarrett D'AmoreINSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
60992413f4SGarrett D'Amore
61992413f4SGarrett D'AmoreLDFLAGS		+= -dy -Ndrv/audio -Nmisc/ac97
62992413f4SGarrett D'Amore
637014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
647014882cSRichard Lowe
65992413f4SGarrett D'Amore$(OBJS_DIR)/%.o			:= CPPFLAGS += -I$(OBJS_DIR)
66992413f4SGarrett D'Amore$(OBJS_DIR)/%.ln		:= CPPFLAGS += -I$(OBJS_DIR)
67992413f4SGarrett D'Amore$(OBJS_DIR)/emu10k_gpr.h	:= ASM10KFLAGS = -v -0 -P gpr
68992413f4SGarrett D'Amore$(OBJS_DIR)/emu10k1_dsp.h	:= ASM10KFLAGS = -v -1 -P emu10k1
69992413f4SGarrett D'Amore$(OBJS_DIR)/emu10k2_dsp.h	:= MODEL10K = SBLIVE
70992413f4SGarrett D'Amore$(OBJS_DIR)/emu10k2_dsp.h	:= ASM10KFLAGS = -v -2 -P emu10k2
71992413f4SGarrett D'Amore$(OBJS_DIR)/emu10k2_dsp.h	:= MODEL10K = AUDIGY
72992413f4SGarrett D'Amore
73992413f4SGarrett D'Amore#
74992413f4SGarrett D'Amore#	Default build targets.
75992413f4SGarrett D'Amore#
76992413f4SGarrett D'Amore.KEEP_STATE:
77992413f4SGarrett D'Amore
78992413f4SGarrett D'Amoredef:		$(DEF_DEPS)
79992413f4SGarrett D'Amore
80992413f4SGarrett D'Amoreall:		$(ALL_DEPS)
81992413f4SGarrett D'Amore
82992413f4SGarrett D'Amoreclean:		$(CLEAN_DEPS)
83992413f4SGarrett D'Amore
84992413f4SGarrett D'Amoreclobber:	$(CLOBBER_DEPS)
85992413f4SGarrett D'Amore
86992413f4SGarrett D'Amorelint:		$(LINT_DEPS)
87992413f4SGarrett D'Amore
88992413f4SGarrett D'Amoremodlintlib:	$(MODLINTLIB_DEPS)
89992413f4SGarrett D'Amore
90992413f4SGarrett D'Amoreclean.lint:	$(CLEAN_LINT_DEPS)
91992413f4SGarrett D'Amore
92992413f4SGarrett D'Amoreinstall:	$(INSTALL_DEPS)
93992413f4SGarrett D'Amore
94992413f4SGarrett D'Amore$(BINARY):	$(OBJS_DIR)/asm10k $(DSP_HDRS)
95992413f4SGarrett D'Amore
96992413f4SGarrett D'Amore$(ASM10K):	$(DSP_SRCDIR)/asm10k.c
97*7f11fd00SRichard Lowe	$(NATIVECC) $(NATIVE_CFLAGS) -o $@ $(DSP_SRCDIR)/asm10k.c
98992413f4SGarrett D'Amore
99992413f4SGarrett D'Amore$(DSP_HDRS): $(ASM10K) $(DSP_SRCS)
100992413f4SGarrett D'Amore	$(CPP) -D$(MODEL10K) -I$(DSP_SRCDIR) $(DSP_SRCDIR)/emu10k.dsp | \
101992413f4SGarrett D'Amore	$(OBJS_DIR)/asm10k $(ASM10KFLAGS) -h $@
102992413f4SGarrett D'Amore
103b6805bf7SGordon RossCLOBBERFILES += $(ASM10K) $(DSP_HDRS)
104b6805bf7SGordon Ross
105992413f4SGarrett D'Amore#
106992413f4SGarrett D'Amore#	Include common targets.
107992413f4SGarrett D'Amore#
108992413f4SGarrett D'Amoreinclude $(UTSBASE)/intel/Makefile.targ
109