mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 22:03:17 +01:00
The pattern rule `$(OUTPUT)/%: %.c` inadvertently included a circular dependency on the global-timer target due to its inclusion in $(TEST_GEN_PROGS_EXTENDED). This resulted in a circular dependency warning during the build process. To resolve this, the dependency on $(TEST_GEN_PROGS_EXTENDED) has been replaced with an explicit dependency on $(OUTPUT)/libatest.so. This change ensures that libatest.so is built before any other targets that require it, without creating a circular dependency. This fix addresses the following warning: make[4]: Entering directory 'tools/testing/selftests/alsa' make[4]: Circular default_modconfig/kselftest/alsa/global-timer <- default_modconfig/kselftest/alsa/global-timer dependency dropped. make[4]: Nothing to be done for 'all'. make[4]: Leaving directory 'tools/testing/selftests/alsa' Cc: Mark Brown <[email protected]> Cc: Jaroslav Kysela <[email protected]> Cc: Takashi Iwai <[email protected]> Cc: Shuah Khan <[email protected]> Signed-off-by: Li Zhijian <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
32 lines
834 B
Makefile
32 lines
834 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
ifneq ($(shell pkg-config --exists alsa && echo 0 || echo 1),0)
|
|
$(error Package alsa not found, please install alsa development package or \
|
|
add directory containing `alsa.pc` in PKG_CONFIG_PATH)
|
|
endif
|
|
|
|
CFLAGS += $(shell pkg-config --cflags alsa) $(KHDR_INCLUDES)
|
|
LDLIBS += $(shell pkg-config --libs alsa)
|
|
ifeq ($(LDLIBS),)
|
|
LDLIBS += -lasound
|
|
endif
|
|
CFLAGS += -L$(OUTPUT) -Wl,-rpath=./
|
|
|
|
LDLIBS+=-lpthread
|
|
|
|
OVERRIDE_TARGETS = 1
|
|
|
|
TEST_GEN_PROGS := mixer-test pcm-test test-pcmtest-driver utimer-test
|
|
|
|
TEST_GEN_PROGS_EXTENDED := libatest.so global-timer
|
|
|
|
TEST_FILES := conf.d pcm-test.conf
|
|
|
|
include ../lib.mk
|
|
|
|
$(OUTPUT)/libatest.so: conf.c alsa-local.h
|
|
$(CC) $(CFLAGS) -shared -fPIC $< $(LDLIBS) -o $@
|
|
|
|
$(OUTPUT)/%: %.c $(OUTPUT)/libatest.so alsa-local.h
|
|
$(CC) $(CFLAGS) $< $(LDLIBS) -latest -o $@
|