Kernel: allow the user to set an environment variable for the sdcc libs
authorAlan Cox <alan@linux.intel.com>
Fri, 2 Jan 2015 11:14:50 +0000 (11:14 +0000)
committerAlan Cox <alan@linux.intel.com>
Fri, 2 Jan 2015 11:14:50 +0000 (11:14 +0000)
Kernel/Makefile

index 30fbc94..b8638e8 100644 (file)
@@ -29,10 +29,14 @@ export BINEXT = .rel
 #      Adjust this as needed for your platform (or contribute a script
 #      to look in the usual places !)
 #
-ifeq ($(UNAME_S),Darwin)
-export LIBZ80=/usr/local/share/sdcc/lib/$(CPU)
+ifeq ($(SDCC_LIB), "")
+  ifeq ($(UNAME_S),Darwin)
+    export LIBZ80=/usr/local/share/sdcc/lib/$(CPU)
+  else
+    export LIBZ80=/usr/share/sdcc/lib/$(CPU)
+  endif
 else
-export LIBZ80=/usr/share/sdcc/lib/$(CPU)
+  export LIBZ80=$(SDCC_LIB)/$(CPU)
 endif
 else ifeq ($(CPU),6502)
 export CROSS_AS=ca65