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# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# Copyright (c) 2018, Joyent, Inc.
26# Copyright 2019 RackTop Systems.
27
28include ../../Makefile.cmd
29
30TARGETS		= library
31
32INCLUDES += -I../include
33
34CPPFLAGS += $(INCLUDES)
35
36CCFLAGS += -_gcc4=-std=gnu++0x
37CFLAGS += $(CCVERBOSE)
38CERRWARN += $(CNOWARN_UNINIT)
39CERRWARN += -_gcc=-Wno-unused-variable
40CERRWARN += -_gcc=-Wno-parentheses
41
42CCERRWARN += -_gcc=-Wno-reorder
43CCERRWARN += -_gcc=-Wno-ignored-qualifiers
44CCERRWARN += -_gcc=-Wno-return-type
45CCERRWARN += -_gcc=-Wno-switch
46
47# not linted
48SMATCH=off
49
50LINTFLAGS += -m -v -u
51
52AR=     /usr/ccs/bin/ar
53RANLIB= /usr/ccs/bin/ranlib
54RM=     /usr/bin/rm -f
55
56LIBCSRCS        = device_ctl.c \
57		  filehdr.c \
58		  hdr_misc.c \
59		  g711.c \
60		  g721.c \
61		  g723.c \
62		  g72x_tables.c \
63		  zmalloc.c
64
65LIBCCSRCS	= Audio.cc \
66		  AudioBuffer.cc \
67		  AudioCopy.cc \
68		  AudioDebug.cc \
69		  AudioError.cc \
70		  AudioExtent.cc \
71		  AudioFile.cc \
72		  AudioGain.cc \
73		  AudioHdr.cc \
74		  AudioHdrParse.cc \
75		  AudioLib.cc \
76		  AudioList.cc \
77		  AudioPipe.cc \
78		  AudioRawPipe.cc \
79		  AudioStream.cc \
80		  AudioTypeChannel.cc \
81		  AudioTypeG72X.cc \
82		  AudioTypeMux.cc \
83		  AudioTypePcm.cc \
84		  AudioTypeSampleRate.cc \
85		  AudioUnixfile.cc \
86		  Fir.cc \
87		  Resample.cc
88
89COBJS= $(LIBCSRCS:%.c=%.o)
90CCOBJS= $(LIBCCSRCS:%.cc=%.o)
91
92.PARALLEL:      $(COBJS) $(CCOBJS)
93
94libaudio=	libaudio.a
95
96.KEEP_STATE:
97
98install all: $(libaudio)
99
100$(libaudio): $(COBJS) $(CCOBJS)
101	$(RM) -f $@
102	$(AR) cq $@ $(COBJS) $(CCOBJS)
103	test ! -f $(RANLIB) || $(RANLIB) $@
104
105clean:
106	$(RM) $(COBJS) $(CCOBJS)
107
108clobber: clean
109	$(RM) $(libaudio)
110
111lint:
112	$(LINT.c) $(LIBCSRCS) $(LDLIBS)
113
114_msg:
115