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
)
6 VAR_LDLIBS
:= -lmount
-I
/usr
/include/libmount
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
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
)
30 $(GPIOOBJ
): $(GPIOOUT
)
31 $(MAKE
) OUTPUT
=$(GPIOOUT
) -C
$(GPIODIR
)