mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-30 05:53:58 +00:00
The pcmtest driver tests use the kselftest harness which requires that
_GNU_SOURCE is defined but nothing causes it to be defined. Since the
KHDR_INCLUDES Makefile variable has had the required define added let's
use that, this should provide some futureproofing.
Fixes: daef47b89e ("selftests: Compile kselftest headers with -D_GNU_SOURCE")
Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
28 lines
611 B
Makefile
28 lines
611 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
|
|
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
|
|
|
|
TEST_GEN_PROGS_EXTENDED := libatest.so
|
|
|
|
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 $@
|