aboutsummaryrefslogtreecommitdiff
path: root/tests/scripts/gen-prog
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts/gen-prog')
-rwxr-xr-xtests/scripts/gen-prog32
1 files changed, 0 insertions, 32 deletions
diff --git a/tests/scripts/gen-prog b/tests/scripts/gen-prog
deleted file mode 100755
index 6e99f37..0000000
--- a/tests/scripts/gen-prog
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-
-NAME=
-PROG=
-while getopts "n:p:" opt; do
- case "$opt" in
- n) NAME="$OPTARG";;
- p) PROG="$OPTARG";;
- *) echo "unrecognised options -$OPTARG" >&2; exit 1;
- esac
-done
-
-shift $((OPTIND - 1))
-
-# create all subdirectories
-mkdir -p $(echo "${@}" | tr ' ' '\n' | sed "s|[^/]*$||;s|^|build/$NAME|" | uniq)
-
-for s in ${@}
-do
- obj="build/${NAME}/${s%.*}.o"
- dep="${obj}.d"
-
- echo "${NAME}_OBJS += ${obj}" >> tests.mk
- echo "${dep}:" >> tests.mk
- echo "-include ${dep}" >> tests.mk
- echo "${obj}: $NAME/${s} \$(COMMON)" >> tests.mk
- echo " \$(COMPILE_TEST) -c $NAME/${s} -o ${obj}" >> tests.mk
-done
-
-echo "build/${NAME}/$PROG: \$(${NAME}_OBJS) \$(COMMON)" >> tests.mk
-echo " \$(COMPILE_TEST) \$(${NAME}_OBJS) \$(COMMON) \
- -o build/${NAME}/$PROG" >> tests.mk