2013-05-20 05:12:28 +08:00
|
|
|
############################################################################
|
|
|
|
# audio/Makefile
|
|
|
|
#
|
|
|
|
# Copyright (C) 2013 Ken Pettit. All rights reserved.
|
|
|
|
# Author: Ken Pettit <pettitkd@gmail.com>
|
|
|
|
#
|
|
|
|
# Redistribution and use in source and binary forms, with or without
|
|
|
|
# modification, are permitted provided that the following conditions
|
|
|
|
# are met:
|
|
|
|
#
|
|
|
|
# 1. Redistributions of source code must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer.
|
|
|
|
# 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer in
|
|
|
|
# the documentation and/or other materials provided with the
|
|
|
|
# distribution.
|
|
|
|
# 3. Neither the name NuttX nor the names of its contributors may be
|
|
|
|
# used to endorse or promote products derived from this software
|
|
|
|
# without specific prior written permission.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
|
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
|
|
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
|
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
|
|
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
|
|
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
# POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
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-11-19 00:44:58 +08:00
|
|
|
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
|
|
|
|
$(call CATFILE, Make.dep, $^)
|
|
|
|
$(call DELFILE, $^)
|
2013-05-20 05:12:28 +08:00
|
|
|
|
2020-07-22 15:54:29 +08:00
|
|
|
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
2020-11-19 00:44:58 +08:00
|
|
|
$(Q) $(MAKE) makedepfile
|
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
|