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# uts/sparc/audiocs/Makefile 24# 25# Copyright 2004 Sun Microsystems, Inc. All rights reserved. 26# Use is subject to license terms. 27# 28#pragma ident "%Z%%M% %I% %E% SMI" 29# 30# This makefile drives the production of the Crystal 4231 31# audio driver (audiocs) kernel module. 32# 33# sparc architecture dependent 34# 35# Path to the base of the uts directory tree (usually /usr/src/uts). 36# 37UTSBASE = ../.. 38 39# 40# Define the module and object file sets. 41# 42MODULE = audiocs 43OBJECTS = $(AUDIOCS_OBJS:%=$(OBJS_DIR)/%) 44LINTS = $(AUDIOCS_OBJS:%.o=$(LINTS_DIR)/%.ln) 45ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 46CONF_SRCDIR = $(UTSBASE)/sun/io/audio/sada/drv/audiocs 47 48WARLOCK_OBJECTS = $(AUDIOCS_OBJS:%.o=%.ll) 49WARLOCK_OK = $(MODULE).ok 50 51# 52# Include common rules. 53# 54include $(UTSBASE)/sparc/Makefile.sparc 55 56# 57# Define targets 58# 59ALL_TARGET = $(BINARY) $(SRC_CONFILE) 60LINT_TARGET = $(MODULE).lint 61INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) 62 63# 64# Overrides 65# 66CFLAGS += $(CCVERBOSE) 67 68# 69# Depends on misc/audiosup and misc/mixer 70# 71LDFLAGS += -dy -Nmisc/amsrc2 -Nmisc/audiosup -Nmisc/mixer 72 73# 74# Default build targets. 75# 76.KEEP_STATE: 77 78def: $(DEF_DEPS) 79 80all: $(ALL_DEPS) 81 82clean: $(CLEAN_DEPS); \ 83 $(RM) $(WARLOCK_OBJECTS) $(WARLOCK_OK) 84 85clobber: $(CLOBBER_DEPS); \ 86 $(RM) $(WARLOCK_OBJECTS) $(WARLOCK_OK) 87 88lint: $(LINT_DEPS) 89 90modlintlib: $(MODLINTLIB_DEPS) 91 92clean.lint: $(CLEAN_LINT_DEPS) 93 94install: $(INSTALL_DEPS) 95 96# 97# Include common targets. 98# 99include $(UTSBASE)/sparc/Makefile.targ 100 101# 102# Defines for local commands. 103# 104SCCS = sccs 105TEST = test 106WLCC = wlcc 107TOUCH = touch 108WARLOCK = warlock 109 110# 111# Warlock targets 112# 113 114%.wlcmd: 115 $(TEST) -f $@ || $(SCCS) get $@ 116 117warlock: $(WARLOCK_OK) 118 119$(WARLOCK_OK): $(WARLOCK_OBJECTS) warlock_ddi.files \ 120 warlock_audiosup.files warlock_mixer.files warlock_amsrc1.files \ 121 warlock_standalone audiocs_with_sada.wlcmd 122 $(WARLOCK) -c audiocs_with_sada.wlcmd $(WARLOCK_OBJECTS) \ 123 ../audiosup/audio_support.ll ../amsrc1/am_src1.ll \ 124 ../mixer/am_main.ll ../mixer/am_ad.ll ../mixer/am_ioctl.ll \ 125 -l ../warlock/ddi_dki_impl.ll 126 $(TOUCH) $(WARLOCK_OK) 127 128%.ll: $(UTSBASE)/sun/io/audio/sada/drv/audiocs/%.c 129 $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $< 130 131warlock_standalone: $(WARLOCK_OBJECTS) warlock_ddi.files audiocs.wlcmd 132 $(WARLOCK) -c audiocs.wlcmd $(WARLOCK_OBJECTS) \ 133 -l ../warlock/ddi_dki_impl.ll 134 135warlock_ddi.files: 136 @cd ../warlock; pwd; $(MAKE) warlock 137 138warlock_audiosup.files: 139 @cd ../audiosup; pwd; $(MAKE) warlock 140 141warlock_amsrc1.files: 142 @cd ../amsrc1; pwd; $(MAKE) warlock 143 144warlock_mixer.files: 145 @cd ../mixer; pwd; $(MAKE) warlock 146