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>
49 lines
1.0 KiB
Makefile
49 lines
1.0 KiB
Makefile
include ../common.mak
|
|
|
|
libs = $(rootdir)/libdasd/libdasd.a \
|
|
$(rootdir)/libzds/libzds.a \
|
|
$(rootdir)/libvtoc/libvtoc.a \
|
|
$(rootdir)/libutil/libutil.a
|
|
|
|
ifneq (${HAVE_CURL},0)
|
|
|
|
check_dep:
|
|
$(call check_dep, \
|
|
"dasdview", \
|
|
"curl/curl.h", \
|
|
"curl-devel or libcurl-dev", \
|
|
"HAVE_CURL=0")
|
|
|
|
BUILDTARGET = check_dep
|
|
|
|
ifneq ($(shell sh -c 'command -v pkg-config'),)
|
|
CURL_CFLAGS = $(shell pkg-config --silence-errors --cflags libcurl)
|
|
CURL_LDLIBS = $(shell pkg-config --silence-errors --libs libcurl)
|
|
else
|
|
CURL_CFLAGS = -I/usr/include/s390x-linux-gnu/curl
|
|
CURL_LDLIBS = -lcurl
|
|
endif # shell
|
|
|
|
endif # HAVE_CURL
|
|
|
|
BUILDTARGET += dasdview
|
|
|
|
ALL_CPPFLAGS += -DSYSFS
|
|
ALL_CFLAGS += $(CURL_CFLAGS)
|
|
LDLIBS += $(CURL_LDLIBS)
|
|
|
|
all: $(BUILDTARGET)
|
|
|
|
dasdview: dasdview.o $(libs)
|
|
|
|
install: all
|
|
$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man8
|
|
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 dasdview $(DESTDIR)$(BINDIR)
|
|
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 644 dasdview.8 \
|
|
$(DESTDIR)$(MANDIR)/man8
|
|
|
|
clean:
|
|
rm -f *.o *~ dasdview core
|
|
|
|
.PHONY: all install clean
|