summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/alsa/Makefile
blob: a8c0383878d3e60955c3f446ca465f22a1d38bbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# SPDX-License-Identifier: GPL-2.0
#

CFLAGS += $(shell pkg-config --cflags alsa)
LDLIBS += $(shell pkg-config --libs alsa)
ifeq ($(LDLIBS),)
LDLIBS += -lasound
endif
CFLAGS += -L$(OUTPUT) -Wl,-rpath=./

OVERRIDE_TARGETS = 1

TEST_GEN_PROGS := mixer-test pcm-test

TEST_GEN_PROGS_EXTENDED := libatest.so

TEST_FILES := conf.d

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 $@