diff options
author | Mattias Andrée <maandree@kth.se> | 2020-06-02 14:44:08 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2020-06-02 14:44:08 +0200 |
commit | 7198c7b9f01bbd5e8f8528440d290569e588b260 (patch) | |
tree | c4bbeb956b37965d589ffe3c0b4dbde94e0ccaca /Makefile | |
parent | Reject i386 and x32 applications (not yet supported) (diff) | |
download | sctrace-7198c7b9f01bbd5e8f8528440d290569e588b260.tar.gz sctrace-7198c7b9f01bbd5e8f8528440d290569e588b260.tar.bz2 sctrace-7198c7b9f01bbd5e8f8528440d290569e588b260.tar.xz |
Some cleanup and preparation for support for multiple architectures (both host and client) and OSes
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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' >> $@ |