2013-05-20 05:12:28 +08:00
|
|
|
############################################################################
|
|
|
|
# audio/Makefile
|
|
|
|
#
|
2024-09-09 14:54:34 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
#
|
2021-04-10 14:50:57 +08:00
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership. The
|
|
|
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
# "License"); you may not use this file except in compliance with the
|
|
|
|
# License. You may obtain a copy of the License at
|
2013-05-20 05:12:28 +08:00
|
|
|
#
|
2021-04-10 14:50:57 +08:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2013-05-20 05:12:28 +08:00
|
|
|
#
|
2021-04-10 14:50:57 +08:00
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
2013-05-20 05:12:28 +08:00
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
2020-05-19 03:42:11 +08:00
|
|
|
include $(TOPDIR)/Make.defs
|
2013-05-20 05:12:28 +08:00
|
|
|
|
2013-11-11 01:20:06 +08:00
|
|
|
CSRCS = audio.c
|
2013-05-20 05:12:28 +08:00
|
|
|
|
2018-08-27 23:03:09 +08:00
|
|
|
ifeq ($(CONFIG_AUDIO_COMP),y)
|
|
|
|
CSRCS += audio_comp.c
|
|
|
|
endif
|
|
|
|
|
2013-05-20 05:12:28 +08:00
|
|
|
# Include support for various drivers. Each Make.defs file will add its
|
|
|
|
# files to the source file list, add its DEPPATH info, and will add
|
|
|
|
# the appropriate paths to the VPATH variable
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_AUDIO_FORMAT_PCM),y)
|
2014-07-23 01:54:13 +08:00
|
|
|
CSRCS += pcm_decode.c
|
2013-05-20 05:12:28 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
|
|
|
COBJS = $(CSRCS:.c=$(OBJEXT))
|
|
|
|
|
|
|
|
SRCS = $(ASRCS) $(CSRCS)
|
|
|
|
OBJS = $(AOBJS) $(COBJS)
|
|
|
|
|
|
|
|
BIN = libaudio$(LIBEXT)
|
|
|
|
|
|
|
|
all: $(BIN)
|
2016-05-11 05:44:06 +08:00
|
|
|
.PHONY: depend clean distclean
|
2013-05-20 05:12:28 +08:00
|
|
|
|
|
|
|
$(AOBJS): %$(OBJEXT): %.S
|
|
|
|
$(call ASSEMBLE, $<, $@)
|
|
|
|
|
|
|
|
$(COBJS): %$(OBJEXT): %.c
|
|
|
|
$(call COMPILE, $<, $@)
|
|
|
|
|
|
|
|
$(BIN): $(OBJS)
|
|
|
|
$(call ARCHIVE, $@, $(OBJS))
|
2020-11-28 11:43:30 +08:00
|
|
|
|
2020-07-22 15:54:29 +08:00
|
|
|
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
2024-06-26 16:22:05 +08:00
|
|
|
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
2020-03-23 10:44:03 +08:00
|
|
|
$(Q) touch $@
|
2013-05-20 05:12:28 +08:00
|
|
|
|
2020-03-23 10:44:03 +08:00
|
|
|
depend: .depend
|
2013-05-20 05:12:28 +08:00
|
|
|
|
|
|
|
clean:
|
|
|
|
$(call DELFILE, $(BIN))
|
|
|
|
$(call CLEAN)
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
$(call DELFILE, Make.dep)
|
2020-03-23 10:44:03 +08:00
|
|
|
$(call DELFILE, .depend)
|
2013-05-20 05:12:28 +08:00
|
|
|
|
|
|
|
-include Make.dep
|