mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
For systems that do not have glibc-static installed, print the following error message when building zfcpdump: s390-tools/zfcpdump # make REQCHK zfcpdump (stdio.h) **************************************************************** * Missing build requirement for: zfcpdump * * Install package..............: glibc-static or libc-dev * * You can skip build with......: make HAVE_LIBC_STATIC=0 * **************************************************************** To allow the check add a new compiler/linker option to the "check_dep" macro and do full compile/link instead of a simple compile. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
46 lines
849 B
Makefile
46 lines
849 B
Makefile
include ../common.mak
|
|
|
|
CPIOINIT = $(call echocmd," CPIOINI ",/$@)./cpioinit
|
|
|
|
ifeq (${HAVE_LIBC_STATIC},0)
|
|
|
|
all:
|
|
$(SKIP) HAVE_LIBC_STATIC=0
|
|
|
|
install:
|
|
$(SKIP) HAVE_LIBC_STATIC=0
|
|
|
|
else
|
|
|
|
check_dep:
|
|
$(call check_dep, \
|
|
"zfcpdump", \
|
|
"stdio.h", \
|
|
"glibc-static or libc-dev", \
|
|
"HAVE_LIBC_STATIC=0", \
|
|
"-static")
|
|
|
|
all: check_dep $(ZFCPDUMP_PART_RD)
|
|
|
|
cpioinit: cpioinit.c
|
|
$(HOSTCC) $(HOSTCFLAGS) -o $@ $^
|
|
|
|
zfcpdump_part: zfcpdump.o zfcpdump_part.o
|
|
$(LINK) $(ALL_LDFLAGS) $^ -static -o $@
|
|
$(STRIP) -s $@
|
|
|
|
$(ZFCPDUMP_PART_RD): cpioinit zfcpdump_part
|
|
$(CPIOINIT) zfcpdump_part > $@.tmp
|
|
$(GZIP) -f $@.tmp
|
|
$(MV) $@.tmp.gz $(ZFCPDUMP_PART_RD)
|
|
|
|
install: all
|
|
$(INSTALL) -m 611 $(ZFCPDUMP_PART_RD) $(DESTDIR)$(ZFCPDUMP_DIR)
|
|
|
|
endif
|
|
|
|
clean:
|
|
rm -f *.o *.gz *.tmp *~ zfcpdump_part cpioinit $(ZFCPDUMP_PART_RD)
|
|
|
|
.PHONY: all clean install check_dep
|