1# SPDX-License-Identifier: GPL-2.0
2CFLAGS += -D_FILE_OFFSET_BITS=64
3CFLAGS += $(KHDR_INCLUDES)
4
5TEST_GEN_PROGS := memfd_test
6TEST_PROGS := run_fuse_test.sh run_hugetlbfs_test.sh
7TEST_GEN_FILES := fuse_test fuse_mnt
8
9VAR_CFLAGS := $(shell pkg-config fuse --cflags 2>/dev/null)
10ifeq ($(VAR_CFLAGS),)
11VAR_CFLAGS := -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse
12endif
13
14VAR_LDLIBS := $(shell pkg-config fuse --libs 2>/dev/null)
15ifeq ($(VAR_LDLIBS),)
16VAR_LDLIBS := -lfuse -pthread
17endif
18
19fuse_mnt.o: CFLAGS += $(VAR_CFLAGS)
20
21include ../lib.mk
22
23$(OUTPUT)/fuse_mnt: LDLIBS += $(VAR_LDLIBS)
24
25$(OUTPUT)/memfd_test: memfd_test.c common.c
26$(OUTPUT)/fuse_test: fuse_test.c common.c
27
28EXTRA_CLEAN = $(OUTPUT)/common.o
29