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# uts/intel/audioemu10k/Makefile 23# 24# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 25# Use is subject to license terms. 26# 27# Copyright (c) 2018, Joyent, Inc. 28 29# 30# Path to the base of the uts directory tree (usually /usr/src/uts). 31# 32UTSBASE = ../.. 33 34# 35# Define the module and object file sets. 36# 37MODULE = audioemu10k 38OBJECTS = $(AUDIOEMU10K_OBJS:%=$(OBJS_DIR)/%) 39ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 40DSP_SRCDIR = $(UTSBASE)/common/io/audio/drv/audioemu10k/dsp 41DSP_HNAMES = emu10k_gpr.h emu10k1_dsp.h emu10k2_dsp.h 42DSP_HDRS = $(DSP_HNAMES:%=$(OBJS_DIR)/%) 43DSP_SNAMES = emu10k.dsp emu10k1.mac emu10k2.mac 44DSP_SRCS = $(DSP_SNAMES:%=$(DSP_SRCDIR)/%) 45ASM10K = $(OBJS_DIR)/asm10k 46 47# 48# Include common rules. 49# 50include $(UTSBASE)/intel/Makefile.intel 51 52# 53# Define targets 54# 55ALL_TARGET = $(BINARY) 56INSTALL_TARGET = $(BINARY) $(ROOTMODULE) 57 58LDFLAGS += -Ndrv/audio -Nmisc/ac97 59 60CERRWARN += $(CNOWARN_UNINIT) 61 62# needs work 63SMOFF += all_func_returns 64 65$(OBJS_DIR)/%.o := CPPFLAGS += -I$(OBJS_DIR) 66$(OBJS_DIR)/emu10k_gpr.h := ASM10KFLAGS = -v -0 -P gpr 67$(OBJS_DIR)/emu10k1_dsp.h := ASM10KFLAGS = -v -1 -P emu10k1 68$(OBJS_DIR)/emu10k2_dsp.h := MODEL10K = SBLIVE 69$(OBJS_DIR)/emu10k2_dsp.h := ASM10KFLAGS = -v -2 -P emu10k2 70$(OBJS_DIR)/emu10k2_dsp.h := MODEL10K = AUDIGY 71 72# 73# Default build targets. 74# 75.KEEP_STATE: 76 77def: $(DEF_DEPS) 78 79all: $(ALL_DEPS) 80 81clean: $(CLEAN_DEPS) 82 83clobber: $(CLOBBER_DEPS) 84 85install: $(INSTALL_DEPS) 86 87$(BINARY): $(OBJS_DIR)/asm10k $(DSP_HDRS) 88 89$(ASM10K): $(DSP_SRCDIR)/asm10k.c 90 $(NATIVECC) $(NATIVE_CFLAGS) -o $@ $(DSP_SRCDIR)/asm10k.c 91 92$(DSP_HDRS): $(ASM10K) $(DSP_SRCS) 93 $(CPP) -D$(MODEL10K) -I$(DSP_SRCDIR) $(DSP_SRCDIR)/emu10k.dsp | \ 94 $(OBJS_DIR)/asm10k $(ASM10KFLAGS) -h $@ 95 96CLOBBERFILES += $(ASM10K) $(DSP_HDRS) 97 98# 99# Include common targets. 100# 101include $(UTSBASE)/intel/Makefile.targ 102