xref: /illumos-gate/usr/src/cmd/audio/utilities/Makefile (revision d8849d7dee03b84a3fa281ec65eb9e3d86d3756b)
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
51AR=     /usr/ccs/bin/ar
52RANLIB= /usr/ccs/bin/ranlib
53RM=     /usr/bin/rm -f
54
55LIBCSRCS        = device_ctl.c \
56		  filehdr.c \
57		  hdr_misc.c \
58		  g711.c \
59		  g721.c \
60		  g723.c \
61		  g72x_tables.c \
62		  zmalloc.c
63
64LIBCCSRCS	= Audio.cc \
65		  AudioBuffer.cc \
66		  AudioCopy.cc \
67		  AudioDebug.cc \
68		  AudioError.cc \
69		  AudioExtent.cc \
70		  AudioFile.cc \
71		  AudioGain.cc \
72		  AudioHdr.cc \
73		  AudioHdrParse.cc \
74		  AudioLib.cc \
75		  AudioList.cc \
76		  AudioPipe.cc \
77		  AudioRawPipe.cc \
78		  AudioStream.cc \
79		  AudioTypeChannel.cc \
80		  AudioTypeG72X.cc \
81		  AudioTypeMux.cc \
82		  AudioTypePcm.cc \
83		  AudioTypeSampleRate.cc \
84		  AudioUnixfile.cc \
85		  Fir.cc \
86		  Resample.cc
87
88COBJS= $(LIBCSRCS:%.c=%.o)
89CCOBJS= $(LIBCCSRCS:%.cc=%.o)
90
91.PARALLEL:      $(COBJS) $(CCOBJS)
92
93libaudio=	libaudio.a
94
95.KEEP_STATE:
96
97install all: $(libaudio)
98
99$(libaudio): $(COBJS) $(CCOBJS)
100	$(RM) -f $@
101	$(AR) cq $@ $(COBJS) $(CCOBJS)
102	test ! -f $(RANLIB) || $(RANLIB) $@
103
104clean:
105	$(RM) $(COBJS) $(CCOBJS)
106
107clobber: clean
108	$(RM) $(libaudio)
109
110lint:
111	$(LINT.c) $(LIBCSRCS) $(LDLIBS)
112
113_msg:
114