summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorEdoardo La Greca2025-05-02 19:56:50 +0200
committerEdoardo La Greca2025-05-02 19:58:55 +0200
commitd5263fdfc89ecf9a5d2386b8b4ba8aad1d6ce105 (patch)
treea32a42f8760d2b6aa5656b2652bf50db6425df72 /sh
parentbf4350b9ad80948d7e79ab64fe5cdff7c10a813a (diff)
add a proper way to make platform-dependent code, update readme with compilation instructions
Diffstat (limited to 'sh')
-rwxr-xr-xsh/platdep.sh17
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' }'
+