WIP FPC-III support
[linux/fpc-iii.git] / tools / testing / selftests / memfd / Makefile
blob4da8b565fa326e54720eb6b8041b997ef98f3b91
1 # SPDX-License-Identifier: GPL-2.0
2 CFLAGS += -D_FILE_OFFSET_BITS=64
3 CFLAGS += -I../../../../include/uapi/
4 CFLAGS += -I../../../../include/
5 CFLAGS += -I../../../../usr/include/
7 TEST_GEN_PROGS := memfd_test
8 TEST_PROGS := run_fuse_test.sh run_hugetlbfs_test.sh
9 TEST_GEN_FILES := fuse_test fuse_mnt
11 VAR_CFLAGS := $(shell pkg-config fuse --cflags 2>/dev/null)
12 ifeq ($(VAR_CFLAGS),)
13 VAR_CFLAGS := -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse
14 endif
16 VAR_LDLIBS := $(shell pkg-config fuse --libs 2>/dev/null)
17 ifeq ($(VAR_LDLIBS),)
18 VAR_LDLIBS := -lfuse -pthread
19 endif
21 fuse_mnt.o: CFLAGS += $(VAR_CFLAGS)
23 include ../lib.mk
25 $(OUTPUT)/fuse_mnt: LDLIBS += $(VAR_LDLIBS)
27 $(OUTPUT)/memfd_test: memfd_test.c common.c
28 $(OUTPUT)/fuse_test: fuse_test.c common.c
30 EXTRA_CLEAN = $(OUTPUT)/common.o