diff options
author | Edoardo La Greca | 2025-05-02 19:56:50 +0200 |
---|---|---|
committer | Edoardo La Greca | 2025-05-02 19:58:55 +0200 |
commit | d5263fdfc89ecf9a5d2386b8b4ba8aad1d6ce105 (patch) | |
tree | a32a42f8760d2b6aa5656b2652bf50db6425df72 /sh | |
parent | bf4350b9ad80948d7e79ab64fe5cdff7c10a813a (diff) |
add a proper way to make platform-dependent code, update readme with compilation instructions
Diffstat (limited to 'sh')
-rwxr-xr-x | sh/platdep.sh | 17 |
1 files changed, 17 insertions, 0 deletions
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' }' + |