From d5263fdfc89ecf9a5d2386b8b4ba8aad1d6ce105 Mon Sep 17 00:00:00 2001 From: Edoardo La Greca Date: Fri, 2 May 2025 19:56:50 +0200 Subject: add a proper way to make platform-dependent code, update readme with compilation instructions --- sh/platdep.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 sh/platdep.sh (limited to 'sh') diff --git a/sh/platdep.sh b/sh/platdep.sh new file mode 100755 index 0000000..dda0588 --- /dev/null +++ b/sh/platdep.sh @@ -0,0 +1,17 @@ +#! /bin/sh + +# Of all the available platform-dependent object file sets defined in the +# working directory's make file of the form 'OBJS_...', list all those that +# could be relevant to the current platform. + +keywords=$(uname -a) + +sets="" +for k in $keywords +do + sets="$sets\n$(echo "$k" | tr '[:lower:]' '[:upper:]' | xargs -I '%' grep '^OBJS_%[ =]' Makefile)" + +done + +echo "$sets" | sort | uniq | awk '/\n\n/ { print '\n' }' + -- cgit v1.2.3