summaryrefslogtreecommitdiff
path: root/device/non-free/lib/pic16/supported-devices.ac
diff options
context:
space:
mode:
Diffstat (limited to 'device/non-free/lib/pic16/supported-devices.ac')
-rw-r--r--device/non-free/lib/pic16/supported-devices.ac55
1 files changed, 55 insertions, 0 deletions
diff --git a/device/non-free/lib/pic16/supported-devices.ac b/device/non-free/lib/pic16/supported-devices.ac
new file mode 100644
index 0000000..c9c80df
--- /dev/null
+++ b/device/non-free/lib/pic16/supported-devices.ac
@@ -0,0 +1,55 @@
+AC_MSG_CHECKING([devices supported by gputils])
+GOOD_PICS="";
+BAD_PICS="";
+CHECK=".checkdevices/check";
+RESULT="pics.supported";
+N_GOOD=0
+N_BAD=0
+mkdir -p ".checkdevices";
+rm -f "$RESULT";
+for i in "${LIBDEV}/pic1"*.c; do
+ p="${i##*pic}";
+ p="${p%.c}";
+ P=$(echo "$p" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ);
+ printf " include \"p%s.inc\"\n END" "$p" > "${CHECK}.asm";
+ if "$mCCAS" -p "$p" -o "${CHECK}.o" -c "${CHECK}.asm" >/dev/null 2>&1 && "$mLD" "${CHECK}.o" >/dev/null 2>&1; then
+ GOOD_PICS="$GOOD_PICS $p";
+ N_GOOD=`expr $N_GOOD + 1`;
+ echo "$P" >> "$RESULT";
+ else
+ BAD_PICS="$BAD_PICS $p";
+ N_BAD=`expr $N_BAD + 1`;
+ fi;
+done;
+AC_MSG_RESULT([[$N_GOOD devices ($GOOD_PICS)]])
+AC_SUBST([GOOD_PICS])
+
+if test -n "$BAD_PICS"; then
+ AC_MSG_WARN([[
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!
+!!! WARNING: The installed gputils do not support all
+!!! PIC devices currently supported by SDCC.
+!!! If you continue to build SDCC, library files for the
+!!! following devices will not be built, and you will
+!!! not be able to compile any projects for these devices:
+!!!
+
+$BAD_PICS
+==> $N_BAD devices are *not* supported
+ $N_GOOD devices are supported
+
+!!!
+!!! Please update your gputils to a recent snapshot and
+!!! run configure again using the updated gputils. Make
+!!! sure to have them in PATH prior to the previously
+!!! found ones (or remove the older version completely).
+!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+]])
+ for d in 3 2 1; do
+ echo "Continuing in $d seconds ...";
+ sleep 1;
+ done;
+fi;