# SPDX-License-Identifier: GPL-2.0

#
# This file is part of Lustre, http://www.lustre.org/
#

MODULES = libcfs

COMPAT := ../../lustre_compat/lib/

libcfs_dir := $(dir $(lastword $(MAKEFILE_LIST)))
include $(libcfs_dir)/../../lustre_compat/lib/Makefile

libcfs-linux-objs := linux-prim.o
libcfs-linux-objs += linux-wait.o

libcfs-compat-objs += $(patsubst %,$(COMPAT)%,$(compat_objs))

EXTRA_DIST = $(libcfs-compat-objs:.o=.c)

libcfs-crypto-objs := crypto.o fname.o hkdf.o hooks.o keyring.o
libcfs-crypto-objs += keysetup.o keysetup_v1.o policy.o

default: all

libcfs-linux-objs := $(addprefix linux/,$(libcfs-linux-objs))
libcfs-crypto-objs := $(addprefix crypto/,$(libcfs-crypto-objs))

libcfs-all-objs := debug.o fail.o module.o tracefile.o

libcfs-objs := $(libcfs-linux-objs) $(libcfs-all-objs) $(libcfs-compat-objs)
libcfs-objs += $(libcfs-crypto-objs)

EXTRA_PRE_CFLAGS := -I/home/green/git/lustre-release/lustre/../libcfs/libcfs

include /home/green/git/lustre-release/Rules
