xref: /illumos-gate/usr/src/uts/intel/audioemu10k/Makefile (revision 82d0151a507442720a3aea34c8925041894ab173)
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#
27b6b206fcSJohn Levon# Copyright (c) 2018, Joyent, Inc.
28992413f4SGarrett D'Amore
29992413f4SGarrett D'Amore#
30992413f4SGarrett D'Amore#	Path to the base of the uts directory tree (usually /usr/src/uts).
31992413f4SGarrett D'Amore#
32992413f4SGarrett D'AmoreUTSBASE = ../..
33992413f4SGarrett D'Amore
34992413f4SGarrett D'Amore#
35992413f4SGarrett D'Amore#	Define the module and object file sets.
36992413f4SGarrett D'Amore#
37992413f4SGarrett D'AmoreMODULE		= audioemu10k
38992413f4SGarrett D'AmoreOBJECTS		= $(AUDIOEMU10K_OBJS:%=$(OBJS_DIR)/%)
39992413f4SGarrett D'AmoreROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
40992413f4SGarrett D'AmoreDSP_SRCDIR	= $(UTSBASE)/common/io/audio/drv/audioemu10k/dsp
41992413f4SGarrett D'AmoreDSP_HNAMES	= emu10k_gpr.h emu10k1_dsp.h emu10k2_dsp.h
42992413f4SGarrett D'AmoreDSP_HDRS	= $(DSP_HNAMES:%=$(OBJS_DIR)/%)
43992413f4SGarrett D'AmoreDSP_SNAMES	= emu10k.dsp emu10k1.mac emu10k2.mac
44992413f4SGarrett D'AmoreDSP_SRCS	= $(DSP_SNAMES:%=$(DSP_SRCDIR)/%)
45992413f4SGarrett D'AmoreASM10K		= $(OBJS_DIR)/asm10k
46992413f4SGarrett D'Amore
47992413f4SGarrett D'Amore#
48992413f4SGarrett D'Amore#	Include common rules.
49992413f4SGarrett D'Amore#
50992413f4SGarrett D'Amoreinclude $(UTSBASE)/intel/Makefile.intel
51992413f4SGarrett D'Amore
52992413f4SGarrett D'Amore#
53992413f4SGarrett D'Amore#	Define targets
54992413f4SGarrett D'Amore#
55992413f4SGarrett D'AmoreALL_TARGET	= $(BINARY)
56992413f4SGarrett D'AmoreINSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
57992413f4SGarrett D'Amore
58*82d0151aSRichard LoweLDFLAGS		+= -Ndrv/audio -Nmisc/ac97
59992413f4SGarrett D'Amore
60d3b5f563SJohn LevonCERRWARN	+= $(CNOWARN_UNINIT)
617014882cSRichard Lowe
62b6b206fcSJohn Levon# needs work
63b6b206fcSJohn LevonSMOFF += all_func_returns
64b6b206fcSJohn Levon
65992413f4SGarrett D'Amore$(OBJS_DIR)/%.o			:= CPPFLAGS += -I$(OBJS_DIR)
66992413f4SGarrett D'Amore$(OBJS_DIR)/emu10k_gpr.h	:= ASM10KFLAGS = -v -0 -P gpr
67992413f4SGarrett D'Amore$(OBJS_DIR)/emu10k1_dsp.h	:= ASM10KFLAGS = -v -1 -P emu10k1
68992413f4SGarrett D'Amore$(OBJS_DIR)/emu10k2_dsp.h	:= MODEL10K = SBLIVE
69992413f4SGarrett D'Amore$(OBJS_DIR)/emu10k2_dsp.h	:= ASM10KFLAGS = -v -2 -P emu10k2
70992413f4SGarrett D'Amore$(OBJS_DIR)/emu10k2_dsp.h	:= MODEL10K = AUDIGY
71992413f4SGarrett D'Amore
72992413f4SGarrett D'Amore#
73992413f4SGarrett D'Amore#	Default build targets.
74992413f4SGarrett D'Amore#
75992413f4SGarrett D'Amore.KEEP_STATE:
76992413f4SGarrett D'Amore
77992413f4SGarrett D'Amoredef:		$(DEF_DEPS)
78992413f4SGarrett D'Amore
79992413f4SGarrett D'Amoreall:		$(ALL_DEPS)
80992413f4SGarrett D'Amore
81992413f4SGarrett D'Amoreclean:		$(CLEAN_DEPS)
82992413f4SGarrett D'Amore
83992413f4SGarrett D'Amoreclobber:	$(CLOBBER_DEPS)
84992413f4SGarrett D'Amore
85992413f4SGarrett D'Amoreinstall:	$(INSTALL_DEPS)
86992413f4SGarrett D'Amore
87992413f4SGarrett D'Amore$(BINARY):	$(OBJS_DIR)/asm10k $(DSP_HDRS)
88992413f4SGarrett D'Amore
89992413f4SGarrett D'Amore$(ASM10K):	$(DSP_SRCDIR)/asm10k.c
907f11fd00SRichard Lowe	$(NATIVECC) $(NATIVE_CFLAGS) -o $@ $(DSP_SRCDIR)/asm10k.c
91992413f4SGarrett D'Amore
92992413f4SGarrett D'Amore$(DSP_HDRS): $(ASM10K) $(DSP_SRCS)
93992413f4SGarrett D'Amore	$(CPP) -D$(MODEL10K) -I$(DSP_SRCDIR) $(DSP_SRCDIR)/emu10k.dsp | \
94992413f4SGarrett D'Amore	$(OBJS_DIR)/asm10k $(ASM10KFLAGS) -h $@
95992413f4SGarrett D'Amore
96b6805bf7SGordon RossCLOBBERFILES += $(ASM10K) $(DSP_HDRS)
97b6805bf7SGordon Ross
98992413f4SGarrett D'Amore#
99992413f4SGarrett D'Amore#	Include common targets.
100992413f4SGarrett D'Amore#
101992413f4SGarrett D'Amoreinclude $(UTSBASE)/intel/Makefile.targ
102