mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Add library functions that allow to communicate with z/OSMF REST services using libcurl. Following three functions are added: lzds_rest_get_enq() to obtain an ENQ that will mark a dataset as in use to z/OS until it is released again lzds_rest_release_enq() to release an ENQ and mark a dataset as no longer in use to z/OS lzds_rest_ping() to ping a z/OSMF REST server to check if it accessible or to refresh an ENQ and prevent it from a timeout after 10 minutes Signed-off-by: Stefan Haberland <sth@linux.ibm.com> Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
74 lines
1.5 KiB
Makefile
74 lines
1.5 KiB
Makefile
include ../common.mak
|
|
|
|
libs = $(rootdir)/libzds/libzds.a \
|
|
$(rootdir)/libvtoc/libvtoc.a \
|
|
$(rootdir)/libdasd/libdasd.a \
|
|
$(rootdir)/libutil/libutil.a
|
|
|
|
ifeq (${HAVE_FUSE},0)
|
|
|
|
all:
|
|
$(SKIP) HAVE_FUSE=0
|
|
|
|
install:
|
|
$(SKIP) HAVE_FUSE=0
|
|
|
|
|
|
else
|
|
|
|
ifeq (${HAVE_CURL},0)
|
|
|
|
all:
|
|
$(SKIP) HAVE_CURL=0
|
|
|
|
install:
|
|
$(SKIP) HAVE_CURL=0
|
|
|
|
else
|
|
|
|
check_dep:
|
|
$(call check_dep, \
|
|
"zdsfs", \
|
|
"fuse.h", \
|
|
"fuse-devel or libfuse-dev", \
|
|
"HAVE_FUSE=0")
|
|
$(call check_dep, \
|
|
"zdsfs", \
|
|
"curl/curl.h", \
|
|
"curl-devel or libcurl-dev", \
|
|
"HAVE_CURL=0")
|
|
|
|
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)
|
|
CURL_CFLAGS = $(shell pkg-config --silence-errors --cflags libcurl)
|
|
CURL_LDLIBS = $(shell pkg-config --silence-errors --libs libcurl)
|
|
else
|
|
FUSE_CFLAGS = -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse
|
|
FUSE_LDLIBS = -lfuse
|
|
CURL_CFLAGS = -I/usr/include/s390x-linux-gnu/curl
|
|
CURL_LDLIBS = -lcurl
|
|
endif
|
|
ALL_CPPFLAGS += -DSYSFS
|
|
ALL_CFLAGS += -DHAVE_SETXATTR -pthread $(FUSE_CFLAGS) $(CURL_CFLAGS)
|
|
LDLIBS += $(FUSE_LDLIBS) $(CURL_LDLIBS) -lpthread -lrt -lm
|
|
|
|
all: check_dep zdsfs
|
|
|
|
zdsfs: zdsfs.o $(libs)
|
|
|
|
install: all
|
|
$(INSTALL) -d -m 755 $(DESTDIR)$(USRBINDIR) $(DESTDIR)$(MANDIR)/man1
|
|
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 zdsfs $(DESTDIR)$(USRBINDIR)
|
|
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 644 zdsfs.1 \
|
|
$(DESTDIR)$(MANDIR)/man1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
clean:
|
|
rm -f *.o *~ zdsfs core
|
|
|
|
.PHONY: all install clean
|