2013-05-19 23:12:28 +02:00
|
|
|
############################################################################
|
|
|
|
# audio/Makefile
|
|
|
|
#
|
2024-09-09 08:54:34 +02:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
#
|
2021-04-10 08:50:57 +02: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-19 23:12:28 +02:00
|
|
|
#
|
2021-04-10 08:50:57 +02:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2013-05-19 23:12:28 +02:00
|
|
|
#
|
2021-04-10 08:50:57 +02: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-19 23:12:28 +02:00
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
2020-05-18 21:42:11 +02:00
|
|
|
include $(TOPDIR)/Make.defs
|
2013-05-19 23:12:28 +02:00
|
|
|
|
2013-11-10 18:20:06 +01:00
|
|
|
CSRCS = audio.c
|
2013-05-19 23:12:28 +02:00
|
|
|
|
2018-08-27 17:03:09 +02:00
|
|
|
ifeq ($(CONFIG_AUDIO_COMP),y)
|
|
|
|
CSRCS += audio_comp.c
|
|
|
|
endif
|
|
|
|
|
2013-05-19 23:12:28 +02: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-22 19:54:13 +02:00
|
|
|
CSRCS += pcm_decode.c
|
2013-05-19 23:12:28 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
|
|
|
COBJS = $(CSRCS:.c=$(OBJEXT))
|
|
|
|
|
|
|
|
SRCS = $(ASRCS) $(CSRCS)
|
|
|
|
OBJS = $(AOBJS) $(COBJS)
|
|
|
|
|
|
|
|
BIN = libaudio$(LIBEXT)
|
|
|
|
|
|
|
|
all: $(BIN)
|
2016-05-10 23:44:06 +02:00
|
|
|
.PHONY: depend clean distclean
|
2013-05-19 23:12:28 +02:00
|
|
|
|
|
|
|
$(AOBJS): %$(OBJEXT): %.S
|
|
|
|
$(call ASSEMBLE, $<, $@)
|
|
|
|
|
|
|
|
$(COBJS): %$(OBJEXT): %.c
|
|
|
|
$(call COMPILE, $<, $@)
|
|
|
|
|
|
|
|
$(BIN): $(OBJS)
|
|
|
|
$(call ARCHIVE, $@, $(OBJS))
|
2020-11-28 04:43:30 +01:00
|
|
|
|
2024-09-15 06:41:42 +02:00
|
|
|
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
|
|
|
|
$(call CATFILE, Make.dep, $^)
|
|
|
|
$(call DELFILE, $^)
|
|
|
|
|
2020-07-22 09:54:29 +02:00
|
|
|
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
2024-09-15 06:41:42 +02:00
|
|
|
$(Q) $(MAKE) makedepfile
|
2020-03-23 03:44:03 +01:00
|
|
|
$(Q) touch $@
|
2013-05-19 23:12:28 +02:00
|
|
|
|
2020-03-23 03:44:03 +01:00
|
|
|
depend: .depend
|
2013-05-19 23:12:28 +02:00
|
|
|
|
|
|
|
clean:
|
|
|
|
$(call DELFILE, $(BIN))
|
|
|
|
$(call CLEAN)
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
$(call DELFILE, Make.dep)
|
2020-03-23 03:44:03 +01:00
|
|
|
$(call DELFILE, .depend)
|
2013-05-19 23:12:28 +02:00
|
|
|
|
|
|
|
-include Make.dep
|