xref: /illumos-gate/usr/src/cmd/audio/utilities/Makefile (revision 5661bb7641e85c46713da7a3002b29ecd2c3daf0)
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#
25*5661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc.
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gateTARGETS		= library
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gateINCLUDES += -I../include
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gateCPPFLAGS += $(INCLUDES)
347c478bd9Sstevel@tonic-gate
357c478bd9Sstevel@tonic-gateCFLAGS += $(CCVERBOSE)
367014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized
377014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable
387014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses
397c478bd9Sstevel@tonic-gate
40*5661bb76SJohn Levon# not linted
41*5661bb76SJohn LevonSMATCH=off
42*5661bb76SJohn Levon
437c478bd9Sstevel@tonic-gateLINTFLAGS += -m -v -u
447c478bd9Sstevel@tonic-gate
45d67944fbSScott RotondoAR=     /usr/ccs/bin/ar
467c478bd9Sstevel@tonic-gateRANLIB= /usr/ccs/bin/ranlib
477c478bd9Sstevel@tonic-gateRM=     /usr/bin/rm -f
487c478bd9Sstevel@tonic-gate
497c478bd9Sstevel@tonic-gateLIBCSRCS        = device_ctl.c \
507c478bd9Sstevel@tonic-gate		  filehdr.c \
517c478bd9Sstevel@tonic-gate		  hdr_misc.c \
527c478bd9Sstevel@tonic-gate		  g711.c \
537c478bd9Sstevel@tonic-gate		  g721.c \
547c478bd9Sstevel@tonic-gate		  g723.c \
557c478bd9Sstevel@tonic-gate		  g72x_tables.c \
567c478bd9Sstevel@tonic-gate		  zmalloc.c
577c478bd9Sstevel@tonic-gate
587c478bd9Sstevel@tonic-gateLIBCCSRCS	= Audio.cc \
597c478bd9Sstevel@tonic-gate		  AudioBuffer.cc \
607c478bd9Sstevel@tonic-gate		  AudioCopy.cc \
617c478bd9Sstevel@tonic-gate		  AudioDebug.cc \
627c478bd9Sstevel@tonic-gate		  AudioError.cc \
637c478bd9Sstevel@tonic-gate		  AudioExtent.cc \
647c478bd9Sstevel@tonic-gate		  AudioFile.cc \
657c478bd9Sstevel@tonic-gate		  AudioGain.cc \
667c478bd9Sstevel@tonic-gate		  AudioHdr.cc \
677c478bd9Sstevel@tonic-gate		  AudioHdrParse.cc \
687c478bd9Sstevel@tonic-gate		  AudioLib.cc \
697c478bd9Sstevel@tonic-gate		  AudioList.cc \
707c478bd9Sstevel@tonic-gate		  AudioPipe.cc \
717c478bd9Sstevel@tonic-gate		  AudioRawPipe.cc \
727c478bd9Sstevel@tonic-gate		  AudioStream.cc \
737c478bd9Sstevel@tonic-gate		  AudioTypeChannel.cc \
747c478bd9Sstevel@tonic-gate		  AudioTypeG72X.cc \
757c478bd9Sstevel@tonic-gate		  AudioTypeMux.cc \
767c478bd9Sstevel@tonic-gate		  AudioTypePcm.cc \
777c478bd9Sstevel@tonic-gate		  AudioTypeSampleRate.cc \
787c478bd9Sstevel@tonic-gate		  AudioUnixfile.cc \
797c478bd9Sstevel@tonic-gate		  Fir.cc \
807c478bd9Sstevel@tonic-gate		  Resample.cc
817c478bd9Sstevel@tonic-gate
827c478bd9Sstevel@tonic-gateCOBJS= $(LIBCSRCS:%.c=%.o)
837c478bd9Sstevel@tonic-gateCCOBJS= $(LIBCCSRCS:%.cc=%.o)
847c478bd9Sstevel@tonic-gate
857c478bd9Sstevel@tonic-gate.PARALLEL:      $(COBJS) $(CCOBJS)
867c478bd9Sstevel@tonic-gate
877c478bd9Sstevel@tonic-gatelibaudio=	libaudio.a
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gate.KEEP_STATE:
907c478bd9Sstevel@tonic-gate
917c478bd9Sstevel@tonic-gateinstall all: $(libaudio)
927c478bd9Sstevel@tonic-gate
937c478bd9Sstevel@tonic-gate$(libaudio): $(COBJS) $(CCOBJS)
947c478bd9Sstevel@tonic-gate	$(RM) -f $@
95d67944fbSScott Rotondo	$(AR) cq $@ $(COBJS) $(CCOBJS)
967c478bd9Sstevel@tonic-gate	test ! -f $(RANLIB) || $(RANLIB) $@
977c478bd9Sstevel@tonic-gate
987c478bd9Sstevel@tonic-gateclean:
997c478bd9Sstevel@tonic-gate	$(RM) $(COBJS) $(CCOBJS)
1007c478bd9Sstevel@tonic-gate
1017c478bd9Sstevel@tonic-gateclobber: clean
102b6805bf7SGordon Ross	$(RM) $(libaudio)
1037c478bd9Sstevel@tonic-gate
1047c478bd9Sstevel@tonic-gatelint:
1057c478bd9Sstevel@tonic-gate	$(LINT.c) $(LIBCSRCS) $(LDLIBS)
1067c478bd9Sstevel@tonic-gate
1077c478bd9Sstevel@tonic-gate_msg:
108