Closed DanielO closed 4 years ago
Yeah, I'm not quite sure what the "right" way is either. Perhaps querying the path of the current "zipcpu-gcc" and using that to indicate the path of the install directory?
Dan
How about something like:
diff --git a/sw/board/Makefile b/sw/board/Makefile
index 0eb2b8b..fe09190 100644
--- a/sw/board/Makefile
+++ b/sw/board/Makefile
@@ -60,7 +60,8 @@ LFLAGS := -T $(LDSCRIPT) -L../zlib
LBKRAM := -T bkram.ld -L../zlib
CFLAGS := -O3 -I../zlib -I../../rtl
LIBS := -lc -lzbasic -lgcc
-INSTALLD=/home/dan/work/rnd/zipcpu/sw/install
+INSTALLD_ := $(cd $(dirname $(which zip-gcc))/../..; pwd)
+INSTALLD?= $(INSTALLD_)
NLIBD=$(INSTALLD)/cross-tools/zip/lib
ZLIBD=../zlib
LIB=$(ZLIBD)/libzbasic.a $(NLIBD)/libg.a $(NLIBD)/libc.a
It should work for people following the tutorial without any editing and also let you override it if you want.
Let me close this issue. It's been long fixed (or at least, so I'm convinced), and I've removed all references to absolute path names from the ZBasic repository.
Hi, I'm trying to build zbasic as per http://zipcpu.com/zipcpu/2018/01/31/cpu-build.html however I get the above in sw/build.
Some digging shows the INSTALLD path in sw/build/Makefile is hard coded with your (I assume) path. I changed it to be INSTALLD?=.. then ran make like so.. make INSTALLD=/media/psf/Home/projects/zipcpu/sw/install
I'm not sure what the 'right' way is but this works OK :)