Makefile (9d4d8572a539ef807e21c196f145aa365fd52f0e) Makefile (8bc395a6a2e24bfae934e43c7f968b23f9b9b55f)
1# SPDX-License-Identifier: GPL-2.0
2
1# SPDX-License-Identifier: GPL-2.0
2
3VAR_CFLAGS := $(shell pkg-config --cflags mount 2>/dev/null)
4VAR_LDLIBS := $(shell pkg-config --libs mount 2>/dev/null)
5ifeq ($(VAR_LDLIBS),)
6VAR_LDLIBS := -lmount -I/usr/include/libmount
7endif
8
9CFLAGS += -O2 -g -std=gnu99 -Wall -I../../../../usr/include/ $(VAR_CFLAGS)
10LDLIBS += $(VAR_LDLIBS)
11
12TEST_PROGS := gpio-mockup.sh
13TEST_FILES := gpio-mockup-sysfs.sh
3TEST_PROGS := gpio-mockup.sh
4TEST_FILES := gpio-mockup-sysfs.sh
14TEST_GEN_PROGS_EXTENDED := gpio-mockup-chardev
5TEST_GEN_PROGS_EXTENDED := gpio-mockup-cdev
15
6
16KSFT_KHDR_INSTALL := 1
17include ../lib.mk
7include ../lib.mk
18
19GPIODIR := $(realpath ../../../gpio)
20GPIOOUT := $(OUTPUT)/tools-gpio/
21GPIOOBJ := $(GPIOOUT)/gpio-utils.o
22
23CLEAN += ; $(RM) -rf $(GPIOOUT)
24
25$(TEST_GEN_PROGS_EXTENDED): $(GPIOOBJ)
26
27$(GPIOOUT):
28 mkdir -p $@
29
30$(GPIOOBJ): $(GPIOOUT)
31 $(MAKE) OUTPUT=$(GPIOOUT) -C $(GPIODIR)