WIP FPC-III support
[linux/fpc-iii.git] / tools / testing / selftests / gpio / Makefile
blob41582fe485ee126f5d01e3dbb170ff56f18f2f6e
1 # SPDX-License-Identifier: GPL-2.0
3 VAR_CFLAGS := $(shell pkg-config --cflags mount 2>/dev/null)
4 VAR_LDLIBS := $(shell pkg-config --libs mount 2>/dev/null)
5 ifeq ($(VAR_LDLIBS),)
6 VAR_LDLIBS := -lmount -I/usr/include/libmount
7 endif
9 CFLAGS += -O2 -g -std=gnu99 -Wall -I../../../../usr/include/ $(VAR_CFLAGS)
10 LDLIBS += $(VAR_LDLIBS)
12 TEST_PROGS := gpio-mockup.sh
13 TEST_FILES := gpio-mockup-sysfs.sh
14 TEST_GEN_PROGS_EXTENDED := gpio-mockup-chardev
16 KSFT_KHDR_INSTALL := 1
17 include ../lib.mk
19 GPIODIR := $(realpath ../../../gpio)
20 GPIOOUT := $(OUTPUT)/tools-gpio/
21 GPIOOBJ := $(GPIOOUT)/gpio-utils.o
23 CLEAN += ; $(RM) -rf $(GPIOOUT)
25 $(TEST_GEN_PROGS_EXTENDED): $(GPIOOBJ)
27 $(GPIOOUT):
28 mkdir -p $@
30 $(GPIOOBJ): $(GPIOOUT)
31 $(MAKE) OUTPUT=$(GPIOOUT) -C $(GPIODIR)