audio/libsrc: move download path to libs/libc/audio/libsrc

Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
This commit is contained in:
shizhenghui 2024-03-25 17:38:34 +08:00 committed by Xiang Xiao
parent cfcedab76b
commit 510d55a783

View file

@ -20,19 +20,21 @@
ifeq ($(CONFIG_AUDIO_SRC),y)
PACKAGE=libsamplerate
VERSION=0.2.2
PACKAGE = libsamplerate
VERSION = 0.2.2
SRCPATH = audio/libsrc
# Download and unpack tarball if no git repo found
ifeq ($(wildcard libsamplerate/.git),)
libsamplerate:
$(call DOWNLOAD,https://codeload.github.com/libsndfile/libsamplerate/zip,master,libsamplerate.zip)
$(Q) unzip -o libsamplerate.zip
$(Q) mv libsamplerate-master libsamplerate
$(SRCPATH)/libsamplerate:
ifeq ($(wildcard $(SRCPATH)/libsamplerate/.git),)
$(call DOWNLOAD,https://codeload.github.com/libsndfile/libsamplerate/zip,master,$(SRCPATH)/libsamplerate.zip)
$(Q) unzip -o $(SRCPATH)/libsamplerate.zip -d $(SRCPATH)
$(Q) mv $(SRCPATH)/libsamplerate-master $(SRCPATH)/libsamplerate
endif
$(TOPDIR)/include/nuttx/audio/samplerate.h : libsamplerate
$(Q) cp -rf libsamplerate/include/samplerate.h $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio$(DELIM)
$(TOPDIR)/include/nuttx/audio/samplerate.h : $(SRCPATH)/libsamplerate
$(Q) cp -rf $(SRCPATH)/libsamplerate/include/samplerate.h $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio$(DELIM)
context:: $(TOPDIR)/include/nuttx/audio/samplerate.h
@ -59,15 +61,15 @@ ifeq ($(CONFIG_SINC_BEST_CONVERTER),y)
CFLAGS += -DENABLE_SINC_BEST_CONVERTER
endif
VPATH += libsamplerate/src
SUBDIRS += libsamplerate/src
DEPPATH += --dep-path libsamplerate/src
VPATH += $(SRCPATH)/libsamplerate/src
SUBDIRS += $(SRCPATH)/libsamplerate/src
DEPPATH += --dep-path $(SRCPATH)/libsamplerate/src
distclean::
$(call DELDIR, $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio$(DELIM)samplerate.h)
ifeq ($(wildcard libsamplerate/.git),)
$(call DELDIR, libsamplerate)
$(call DELFILE, libsamplerate.zip)
ifeq ($(wildcard $(SRCPATH)/libsamplerate/.git),)
$(call DELDIR, $(SRCPATH)/libsamplerate)
$(call DELFILE, $(SRCPATH)/libsamplerate.zip)
endif
endif