libclean: Search for SDCC in the same places as kernel/Makefile
authorAlan Cox <alan@linux.intel.com>
Fri, 2 Jan 2015 10:03:27 +0000 (10:03 +0000)
committerAlan Cox <alan@linux.intel.com>
Fri, 2 Jan 2015 10:03:27 +0000 (10:03 +0000)
From: Sergio L. Pascual <https://github.com/slp/FUZIX>

Library/tools/libclean

index 12df92c..f7d99df 100755 (executable)
@@ -4,7 +4,15 @@
 #      IMHO beats forking the library or building a private copy.
 #
 #
-cp /opt/sdcc/share/sdcc/lib/z80/z80.lib tmp.lib
+UNAME_S=`uname -s`
+
+if [ "${UNAME_S}" = "Darwin" ]; then
+       SDCC_LIB="/usr/local/share/sdcc/lib"
+else
+       SDCC_LIB="/usr/share/sdcc/lib"
+fi
+
+cp ${SDCC_LIB}/z80/z80.lib tmp.lib
 #
 #      Scrub the functions we don't want to inherit
 #      Need to review setjmp and maybe a couple of others