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