From 7198c7b9f01bbd5e8f8528440d290569e588b260 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 2 Jun 2020 14:44:08 +0200 Subject: Some cleanup and preparation for support for multiple architectures (both host and client) and OSes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 44c177b..9c02102 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,8 @@ OBJ =\ util.o HDR =\ - arch-x86-64.h\ + linux/os.h\ + linux/x86-64.h\ arg.h\ common.h\ list-errnos.h\ @@ -29,15 +30,13 @@ sctrace: $(OBJ) list-errnos.h: printf '#define LIST_ERRNOS(_)\\\n\t' > $@ - cat /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ - | sed 's/\/\/.*$$//' | tr -d '$$' | sed 's/\*\//\$$/g' | sed 's/\/\*[^$$]*\$$//g' \ + cat $(ERRNO_HDRS) sed 's/\/\/.*$$//' | tr -d '$$' | sed 's/\*\//\$$/g' | sed 's/\/\*[^$$]*\$$//g' \ | sed -n '/^[ \t]*#[ \t]*define[ \t].*[ \t][0-9]*[ \t]*$$/s/^[ \t#]*define[ \t]*\([^ \t]*\).*$$/_(\1)/p' \ | sort | uniq | tr '\n' '#' | sed 's/#_/\\\n\t_/g' | tr '#' '\n' >> $@ list-signums.h: printf '#define LIST_SIGNUMS(_)\\\n\t' > $@ - cat /usr/include/bits/signum.h /usr/include/bits/signum-generic.h \ - | sed 's/\/\/.*$$//' | tr -d '$$' | sed 's/\*\//\$$/g' | sed 's/\/\*[^$$]*\$$//g' \ + cat $(SIGNUM_HDRS) | sed 's/\/\/.*$$//' | tr -d '$$' | sed 's/\*\//\$$/g' | sed 's/\/\*[^$$]*\$$//g' \ | sed -n '/^[ \t]*#[ \t]*define[ \t][^_]*[ \t][0-9]*[ \t]*$$/s/^[ \t#]*define[ \t]*\([^ \t]*\).*$$/_(\1)/p' \ | sort | uniq | tr '\n' '#' | sed 's/#_/\\\n\t_/g' | tr '#' '\n' >> $@ -- cgit v1.2.3-70-g09d2