1# SPDX-License-Identifier: GPL-2.0 2# 3 4CFLAGS += $(shell pkg-config --cflags alsa) $(KHDR_INCLUDES) 5LDLIBS += $(shell pkg-config --libs alsa) 6ifeq ($(LDLIBS),) 7LDLIBS += -lasound 8endif 9CFLAGS += -L$(OUTPUT) -Wl,-rpath=./ 10 11LDLIBS+=-lpthread 12 13OVERRIDE_TARGETS = 1 14 15TEST_GEN_PROGS := mixer-test pcm-test test-pcmtest-driver 16 17TEST_GEN_PROGS_EXTENDED := libatest.so 18 19TEST_FILES := conf.d pcm-test.conf 20 21include ../lib.mk 22 23$(OUTPUT)/libatest.so: conf.c alsa-local.h 24 $(CC) $(CFLAGS) -shared -fPIC $< $(LDLIBS) -o $@ 25 26$(OUTPUT)/%: %.c $(TEST_GEN_PROGS_EXTENDED) alsa-local.h 27 $(CC) $(CFLAGS) $< $(LDLIBS) -latest -o $@ 28