1 # SPDX-License-Identifier: GPL-2.0
3 MOUNT_CFLAGS
:= $(shell pkg-config
--cflags mount
2>/dev
/null
)
4 MOUNT_LDLIBS
:= $(shell pkg-config
--libs mount
2>/dev
/null
)
5 ifeq ($(MOUNT_LDLIBS
),)
6 MOUNT_LDLIBS
:= -lmount
-I
/usr
/include/libmount
9 CFLAGS
+= -O2
-g
-std
=gnu99
-Wall
-I..
/..
/..
/..
/usr
/include/ $(MOUNT_CFLAGS
)
10 LDLIBS
+= $(MOUNT_LDLIBS
)
12 TEST_PROGS
:= gpio-mockup.sh
13 TEST_FILES
:= gpio-mockup-sysfs.sh
14 TEST_PROGS_EXTENDED
:= gpio-mockup-chardev
16 GPIODIR
:= $(realpath ..
/..
/..
/gpio
)
17 GPIOOBJ
:= gpio-utils.o
19 all: $(TEST_PROGS_EXTENDED
)
22 $(RM
) $(TEST_PROGS_EXTENDED
)
23 $(MAKE
) -C
$(GPIODIR
) OUTPUT
=$(GPIODIR
)/ clean
26 KSFT_KHDR_INSTALL
:= 1
29 $(TEST_PROGS_EXTENDED
): $(GPIODIR
)/$(GPIOOBJ
)
31 $(GPIODIR
)/$(GPIOOBJ
):
32 $(MAKE
) OUTPUT
=$(GPIODIR
)/ -C
$(GPIODIR
)