diff --git a/Makefile b/Makefile index 31c4065..95dce2d 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ include common.mak # LIBS: Libraries that can have a dependency to base libraries # TOOLS: Tools that can have a dependency to base libraries or libraries # -BASELIB_DIRS = libutil libseckey +BASELIB_DIRS = libargz libutil libseckey LIB_DIRS = libvtoc libzds libdasd libvmdump libccw libvmcp libekmfweb \ libkmipclient libcpumf TOOL_DIRS = zipl zdump fdasd dasdfmt dasdview tunedasd \ diff --git a/common.mak b/common.mak index 0a5fd69..c6f429c 100644 --- a/common.mak +++ b/common.mak @@ -329,6 +329,10 @@ endif # check the library directory via "make -C" when the tools Makefile is # processed. +$(rootdir)/libargz/libargz.a: $(rootdir)/libargz + $(MAKE) -C $(rootdir)/libargz/ libargz.a +.PHONY: $(rootdir)/libargz + $(rootdir)/libutil/libutil.a: $(rootdir)/libutil $(MAKE) -C $(rootdir)/libutil/ libutil.a .PHONY: $(rootdir)/libutil diff --git a/zconf/chp/Makefile b/zconf/chp/Makefile index 2e3065f..486d469 100644 --- a/zconf/chp/Makefile +++ b/zconf/chp/Makefile @@ -2,7 +2,7 @@ include ../../common.mak all: chchp lschp -libs = $(rootdir)/libutil/libutil.a +libs = $(rootdir)/libutil/libutil.a $(rootdir)/libargz/libargz.a chchp: chchp.o $(libs) lschp: lschp.o $(libs) diff --git a/zconf/css/Makefile b/zconf/css/Makefile index 2a36820..749cc6e 100644 --- a/zconf/css/Makefile +++ b/zconf/css/Makefile @@ -2,7 +2,8 @@ include ../../common.mak libs = $(rootdir)/libccw/libccw.a \ - $(rootdir)/libutil/libutil.a + $(rootdir)/libutil/libutil.a \ + $(rootdir)/libargz/libargz.a objects = lscss.o misc.o diff --git a/zconf/qeth/Makefile b/zconf/qeth/Makefile index 43716a3..f69d4f0 100644 --- a/zconf/qeth/Makefile +++ b/zconf/qeth/Makefile @@ -2,7 +2,7 @@ include ../../common.mak all: lsqeth -libs = $(rootdir)/libvmcp/libvmcp.a $(rootdir)/libutil/libutil.a +libs = $(rootdir)/libvmcp/libvmcp.a $(rootdir)/libutil/libutil.a $(rootdir)/libargz/libargz.a lsqeth: lsqeth.o misc.o $(libs) diff --git a/zconf/scm/Makefile b/zconf/scm/Makefile index 12faf44..1d9ec36 100644 --- a/zconf/scm/Makefile +++ b/zconf/scm/Makefile @@ -2,7 +2,7 @@ include ../../common.mak all: lsscm -libs = $(rootdir)/libutil/libutil.a +libs = $(rootdir)/libutil/libutil.a $(rootdir)/libargz/libargz.a lsscm: lsscm.o $(libs) diff --git a/zconf/zcrypt/Makefile b/zconf/zcrypt/Makefile index d075f34..a1744a4 100644 --- a/zconf/zcrypt/Makefile +++ b/zconf/zcrypt/Makefile @@ -2,7 +2,7 @@ all: chzcrypt lszcrypt zcryptctl zcryptstats -libs = $(rootdir)/libutil/libutil.a +libs = $(rootdir)/libutil/libutil.a $(rootdir)/libargz/libargz.a chzcrypt: chzcrypt.o misc.o $(libs) lszcrypt: lszcrypt.o misc.o $(libs) diff --git a/zkey/Makefile b/zkey/Makefile index a44b14b..48c02fb 100644 --- a/zkey/Makefile +++ b/zkey/Makefile @@ -32,7 +32,7 @@ INSTALL_TARGETS += zkey-cryptsetup-skip-cryptsetup2 endif -libs = $(rootdir)/libutil/libutil.a +libs = $(rootdir)/libutil/libutil.a $(rootdir)/libargz/libargz.a CFLAGS += -DKMS_PLUGIN_LOCATION=\"$(ZKEYKMSPLUGINDIR)\" @@ -90,11 +90,11 @@ ep11.h misc.h utils.h kms.o: kms.c kms.h kms-plugin.h utils.h pkey.h -zkey: LDLIBS = -ldl -lcrypto +zkey: LDLIBS = -ldl -lcrypto $(LIBEXECINFO_LIBS) zkey: zkey.o pkey.o cca.o ep11.o properties.o keystore.o utils.o kms.o $(libs) $(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@ -zkey-cryptsetup: LDLIBS = -ldl -lcryptsetup -ljson-c -lcrypto +zkey-cryptsetup: LDLIBS = -ldl -lcryptsetup -ljson-c -lcrypto $(LIBEXECINFO_LIBS) zkey-cryptsetup: zkey-cryptsetup.o pkey.o cca.o ep11.o utils.o $(libs) $(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@ --- a/zkey/ekmfweb/Makefile +++ b/zkey/ekmfweb/Makefile @@ -5,7 +5,7 @@ VERM = $(shell echo $(VERSION) | cut -d all: zkey-ekmfweb.so -libs = $(rootdir)/libutil/libutil.a +libs = $(rootdir)/libutil/libutil.a $(rootdir)/libargz/libargz.a zkey-ekmfweb.o: zkey-ekmfweb.c zkey-ekmfweb.h ../kms-plugin.h \ ../cca.h ../utils.h ../pkey.h ../properties.h \ @@ -27,7 +27,8 @@ utils.o: ../utils.c ../utils.h ../pkey.h $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -fPIC -c $< -o $@ zkey-ekmfweb.so: ALL_CFLAGS += -fPIC -zkey-ekmfweb.so: LDLIBS = -L$(rootdir)/libekmfweb -lekmfweb -ldl -lcrypto +zkey-ekmfweb.so: LDLIBS = -L$(rootdir)/libekmfweb -lekmfweb -ldl -lcrypto \ + $(LIBEXECINFO_LIBS) zkey-ekmfweb.so: ALL_LDFLAGS += -shared -Wl,--version-script=zkey-ekmfweb.map \ -Wl,-z,defs,-Bsymbolic -Wl,-soname,zkey-ekmfweb.so.$(VERM) zkey-ekmfweb.so: zkey-ekmfweb.o properties.o pkey.o cca.o ep11.o utils.o $(libs) diff --git a/zkey/keystore.c b/zkey/keystore.c index 9dcac07..2f87798 100644 --- a/zkey/keystore.c +++ b/zkey/keystore.c @@ -23,6 +23,7 @@ #include #include #include +#include #include "lib/util_base.h" #include "lib/util_libc.h" diff --git a/libutil/Makefile b/libutil/Makefile index 508df5b..647bbbe 100644 --- a/libutil/Makefile +++ b/libutil/Makefile @@ -1,6 +1,6 @@ include ../common.mak -lib := libutil.a +lib := libutil.a $(rootdir)/libargz/libargz.a sources := $(filter-out %_example.c,$(wildcard *.c)) objects := $(patsubst %.c,%.o,$(sources)) diff --git a/zkey/kmip/Makefile b/zkey/kmip/Makefile index 14a532e..597c851 100644 --- a/zkey/kmip/Makefile +++ b/zkey/kmip/Makefile @@ -5,7 +5,7 @@ VERM = $(shell echo $(VERSION) | cut -d '.' -f 1) all: zkey-kmip.so -libs = $(rootdir)/libutil/libutil.a $(rootdir)/libseckey/libseckey.a +libs = $(rootdir)/libutil/libutil.a $(rootdir)/libargz/libargz.a $(rootdir)/libseckey/libseckey.a zkey-kmip.o: zkey-kmip.c zkey-kmip.h ../kms-plugin.h ../plugin-utils.h \ ../cca.h ../utils.h ../pkey.h ../properties.h \ @@ -31,7 +31,7 @@ utils.o: ../utils.c ../utils.h ../pkey.h ../cca.h ../ep11.h ../kms-plugin.h $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -fPIC -c $< -o $@ zkey-kmip.so: ALL_CFLAGS += -fPIC -zkey-kmip.so: LDLIBS = -L$(rootdir)/libkmipclient -lkmipclient -ldl -lcrypto +zkey-kmip.so: LDLIBS = -L$(rootdir)/libkmipclient -lkmipclient -ldl -lcrypto $(LIBEXECINFO_LIBS) zkey-kmip.so: ALL_LDFLAGS += -shared -Wl,--version-script=zkey-kmip.map \ -Wl,-z,defs,-Bsymbolic -Wl,-soname,zkey-kmip.so.$(VERM) zkey-kmip.so: zkey-kmip.o plugin-utils.o properties.o pkey.o cca.o ep11.o \