Files
s390-tools/hsavmcore/Makefile
Alexander Egorenkov 8c9cc6e12a s390-tools: add hsavmcore utility
hsavmcore is designed to make the dump process with kdump more efficient.
With hsavmcore, the HSA memory that contains a part of the production
kernel's memory can be released early in the process. Depending on the size
of the production kernel's memory, writing the dump to persistent storage
can be time consuming and prevent the HSA memory from being reused
by other LPARs.

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Reviewed-by: Philipp Rudo <prudo@linux.ibm.com>
Acked-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2021-06-18 13:20:08 +02:00

92 lines
1.7 KiB
Makefile

#
# Copyright IBM Corp. 2021
#
# s390-tools is free software; you can redistribute it and/or modify
# it under the terms of the MIT license. See LICENSE for details.
#
include ../common.mak
ifeq (${HAVE_FUSE},0)
all:
$(SKIP) HAVE_FUSE=0
install:
$(SKIP) HAVE_FUSE=0
else # HAVE_FUSE
#
# FUSE
#
ifneq ($(shell sh -c 'command -v pkg-config'),)
FUSE_CFLAGS = $(shell pkg-config --silence-errors --cflags fuse)
FUSE_LDLIBS = $(shell pkg-config --silence-errors --libs fuse)
else
FUSE_CFLAGS = -I/usr/include/fuse
FUSE_LDLIBS = -lfuse
endif
#
# systemd
#
ifneq (${HAVE_SYSTEMD},0)
ifneq ($(shell sh -c 'command -v pkg-config'),)
SYSTEMD_CFLAGS = $(shell pkg-config --silence-errors --cflags libsystemd)
SYSTEMD_LDLIBS = $(shell pkg-config --silence-errors --libs libsystemd)
else
SYSTEMD_CFLAGS =
SYSTEMD_LDLIBS = -lsystemd
endif
ALL_CPPFLAGS += -DHAVE_SYSTEMD
endif # HAVE_SYSTEMD
ALL_CPPFLAGS += -D_FILE_OFFSET_BITS=64
ALL_CFLAGS += $(FUSE_CFLAGS) $(SYSTEMD_CFLAGS)
LDLIBS += $(FUSE_LDLIBS) $(SYSTEMD_LDLIBS) -lpthread
OBJECTS = \
main.o \
cmdline_options.o \
config.o \
mount.o \
swap.o \
hsa.o \
hsa_file.o \
hsa_mem.o \
proxy.o \
overlay.o
libs = $(rootdir)/libutil/libutil.a
all: check_dep hsavmcore
check_dep:
$(call check_dep, \
"hsavmcore", \
"fuse.h", \
"fuse-devel or libfuse-dev", \
"HAVE_FUSE=0")
ifneq (${HAVE_SYSTEMD},0)
$(call check_dep, \
"hsavmcore", \
"systemd/sd-daemon.h", \
"systemd-devel or libsystemd-dev", \
"HAVE_SYSTEMD=0")
endif
hsavmcore: $(OBJECTS) $(libs)
$(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
install: all
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 hsavmcore \
$(DESTDIR)$(USRSBINDIR)
endif # HAVE_FUSE
clean:
rm -f hsavmcore $(OBJECTS)
.PHONY: all install clean