17c478bdstevel@tonic-gate#
27c478bdstevel@tonic-gate# CDDL HEADER START
37c478bdstevel@tonic-gate#
47c478bdstevel@tonic-gate# The contents of this file are subject to the terms of the
5d8d4fa8gd# Common Development and Distribution License (the "License").
6d8d4fa8gd# You may not use this file except in compliance with the License.
77c478bdstevel@tonic-gate#
87c478bdstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bdstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bdstevel@tonic-gate# See the License for the specific language governing permissions
117c478bdstevel@tonic-gate# and limitations under the License.
127c478bdstevel@tonic-gate#
137c478bdstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bdstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bdstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bdstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bdstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bdstevel@tonic-gate#
197c478bdstevel@tonic-gate# CDDL HEADER END
207c478bdstevel@tonic-gate#
217c478bdstevel@tonic-gate#
22d67944fScott Rotondo# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237c478bdstevel@tonic-gate# Use is subject to license terms.
247c478bdstevel@tonic-gate#
255661bb7John Levon# Copyright (c) 2018, Joyent, Inc.
268e0c824Andrew Stormont# Copyright 2019 RackTop Systems.
277c478bdstevel@tonic-gate
287c478bdstevel@tonic-gateinclude ../../Makefile.cmd
297c478bdstevel@tonic-gate
307c478bdstevel@tonic-gateTARGETS		= library
317c478bdstevel@tonic-gate
327c478bdstevel@tonic-gateINCLUDES += -I../include
337c478bdstevel@tonic-gate
347c478bdstevel@tonic-gateCPPFLAGS += $(INCLUDES)
357c478bdstevel@tonic-gate
36164ffd8Toomas SoomeCCFLAGS += -_gcc4=-std=gnu++0x
377c478bdstevel@tonic-gateCFLAGS += $(CCVERBOSE)
38d3b5f56John LevonCERRWARN += $(CNOWARN_UNINIT)
397014882Richard LoweCERRWARN += -_gcc=-Wno-unused-variable
407014882Richard LoweCERRWARN += -_gcc=-Wno-parentheses
417c478bdstevel@tonic-gate
428e0c824Andrew StormontCCERRWARN += -_gcc=-Wno-reorder
438e0c824Andrew StormontCCERRWARN += -_gcc=-Wno-ignored-qualifiers
448e0c824Andrew StormontCCERRWARN += -_gcc=-Wno-return-type
458e0c824Andrew StormontCCERRWARN += -_gcc=-Wno-switch
468e0c824Andrew Stormont
475661bb7John Levon# not linted
485661bb7John LevonSMATCH=off
495661bb7John Levon
507c478bdstevel@tonic-gateLINTFLAGS += -m -v -u
517c478bdstevel@tonic-gate
52d67944fScott RotondoAR=     /usr/ccs/bin/ar
537c478bdstevel@tonic-gateRANLIB= /usr/ccs/bin/ranlib
547c478bdstevel@tonic-gateRM=     /usr/bin/rm -f
557c478bdstevel@tonic-gate
567c478bdstevel@tonic-gateLIBCSRCS        = device_ctl.c \
577c478bdstevel@tonic-gate		  filehdr.c \
587c478bdstevel@tonic-gate		  hdr_misc.c \
597c478bdstevel@tonic-gate		  g711.c \
607c478bdstevel@tonic-gate		  g721.c \
617c478bdstevel@tonic-gate		  g723.c \
627c478bdstevel@tonic-gate		  g72x_tables.c \
637c478bdstevel@tonic-gate		  zmalloc.c
647c478bdstevel@tonic-gate
657c478bdstevel@tonic-gateLIBCCSRCS	= Audio.cc \
667c478bdstevel@tonic-gate		  AudioBuffer.cc \
677c478bdstevel@tonic-gate		  AudioCopy.cc \
687c478bdstevel@tonic-gate		  AudioDebug.cc \
697c478bdstevel@tonic-gate		  AudioError.cc \
707c478bdstevel@tonic-gate		  AudioExtent.cc \
717c478bdstevel@tonic-gate		  AudioFile.cc \
727c478bdstevel@tonic-gate		  AudioGain.cc \
737c478bdstevel@tonic-gate		  AudioHdr.cc \
747c478bdstevel@tonic-gate		  AudioHdrParse.cc \
757c478bdstevel@tonic-gate		  AudioLib.cc \
767c478bdstevel@tonic-gate		  AudioList.cc \
777c478bdstevel@tonic-gate		  AudioPipe.cc \
787c478bdstevel@tonic-gate		  AudioRawPipe.cc \
797c478bdstevel@tonic-gate		  AudioStream.cc \
807c478bdstevel@tonic-gate		  AudioTypeChannel.cc \
817c478bdstevel@tonic-gate		  AudioTypeG72X.cc \
827c478bdstevel@tonic-gate		  AudioTypeMux.cc \
837c478bdstevel@tonic-gate		  AudioTypePcm.cc \
847c478bdstevel@tonic-gate		  AudioTypeSampleRate.cc \
857c478bdstevel@tonic-gate		  AudioUnixfile.cc \
867c478bdstevel@tonic-gate		  Fir.cc \
877c478bdstevel@tonic-gate		  Resample.cc
887c478bdstevel@tonic-gate
897c478bdstevel@tonic-gateCOBJS= $(LIBCSRCS:%.c=%.o)
907c478bdstevel@tonic-gateCCOBJS= $(LIBCCSRCS:%.cc=%.o)
917c478bdstevel@tonic-gate
927c478bdstevel@tonic-gate.PARALLEL:      $(COBJS) $(CCOBJS)
937c478bdstevel@tonic-gate
947c478bdstevel@tonic-gatelibaudio=	libaudio.a
957c478bdstevel@tonic-gate
967c478bdstevel@tonic-gate.KEEP_STATE:
977c478bdstevel@tonic-gate
987c478bdstevel@tonic-gateinstall all: $(libaudio)
997c478bdstevel@tonic-gate
1007c478bdstevel@tonic-gate$(libaudio): $(COBJS) $(CCOBJS)
1017c478bdstevel@tonic-gate	$(RM) -f $@
102d67944fScott Rotondo	$(AR) cq $@ $(COBJS) $(CCOBJS)
1037c478bdstevel@tonic-gate	test ! -f $(RANLIB) || $(RANLIB) $@
1047c478bdstevel@tonic-gate
1057c478bdstevel@tonic-gateclean:
1067c478bdstevel@tonic-gate	$(RM) $(COBJS) $(CCOBJS)
1077c478bdstevel@tonic-gate
1087c478bdstevel@tonic-gateclobber: clean
109b6805bfGordon Ross	$(RM) $(libaudio)
1107c478bdstevel@tonic-gate
1117c478bdstevel@tonic-gatelint:
1127c478bdstevel@tonic-gate	$(LINT.c) $(LIBCSRCS) $(LDLIBS)
1137c478bdstevel@tonic-gate
1147c478bdstevel@tonic-gate_msg:
115