mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-08 14:13:53 +00:00
2a94a0898b
Currently, if alsa development package is not installed on the user's system then the make command would print a `pagefull` of errors. In particular one error message is repeated 3 times. This error is returned by `pkg-config` and since it is not being handeled appropriately, repeated calls to `pkg-config` prints the same message again. This patch adds check for alsa package installation. If alsa is not installed, a short and consize error is returned. Also, it does not affect the compilation of other tests. Signed-off-by: Abdul Rahim <abdul.rahim@myyahoo.com> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Link: https://patch.msgid.link/20240922225824.18918-1-abdul.rahim@myyahoo.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
32 lines
839 B
Makefile
32 lines
839 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 $(TEST_GEN_PROGS_EXTENDED) alsa-local.h
|
|
$(CC) $(CFLAGS) $< $(LDLIBS) -latest -o $@
|