xref: /illumos-gate/usr/src/cmd/audio/utilities/Makefile (revision dd72704bd9e794056c558153663c739e2012d721)
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
36CFLAGS += $(CCVERBOSE)
37CERRWARN += $(CNOWARN_UNINIT)
38CERRWARN += -_gcc=-Wno-unused-variable
39CERRWARN += -_gcc=-Wno-parentheses
40
41CCERRWARN += -_gcc=-Wno-reorder
42CCERRWARN += -_gcc=-Wno-ignored-qualifiers
43CCERRWARN += -_gcc=-Wno-return-type
44CCERRWARN += -_gcc=-Wno-switch
45
46# not linted
47SMATCH=off
48
49LINTFLAGS += -m -v -u
50
51RANLIB= /usr/ccs/bin/ranlib
52
53LIBCSRCS        = device_ctl.c \
54		  filehdr.c \
55		  hdr_misc.c \
56		  g711.c \
57		  g721.c \
58		  g723.c \
59		  g72x_tables.c \
60		  zmalloc.c
61
62LIBCCSRCS	= Audio.cc \
63		  AudioBuffer.cc \
64		  AudioCopy.cc \
65		  AudioDebug.cc \
66		  AudioError.cc \
67		  AudioExtent.cc \
68		  AudioFile.cc \
69		  AudioGain.cc \
70		  AudioHdr.cc \
71		  AudioHdrParse.cc \
72		  AudioLib.cc \
73		  AudioList.cc \
74		  AudioPipe.cc \
75		  AudioRawPipe.cc \
76		  AudioStream.cc \
77		  AudioTypeChannel.cc \
78		  AudioTypeG72X.cc \
79		  AudioTypeMux.cc \
80		  AudioTypePcm.cc \
81		  AudioTypeSampleRate.cc \
82		  AudioUnixfile.cc \
83		  Fir.cc \
84		  Resample.cc
85
86COBJS= $(LIBCSRCS:%.c=%.o)
87CCOBJS= $(LIBCCSRCS:%.cc=%.o)
88
89.PARALLEL:      $(COBJS) $(CCOBJS)
90
91libaudio=	libaudio.a
92
93.KEEP_STATE:
94
95install all: $(libaudio)
96
97$(libaudio): $(COBJS) $(CCOBJS)
98	$(RM) $@
99	$(AR) cq $@ $(COBJS) $(CCOBJS)
100	test ! -f $(RANLIB) || $(RANLIB) $@
101
102clean:
103	$(RM) $(COBJS) $(CCOBJS)
104
105clobber: clean
106	$(RM) $(libaudio)
107
108lint:
109	$(LINT.c) $(LIBCSRCS) $(LDLIBS)
110
111_msg:
112