From: Oliver Schmidt
Date: Tue, 7 May 2013 15:58:56 +0000 (+0200)
Subject: Removed reference to CC65_HOME.
X-Git-Tag: V2.14~15
X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=717121a7cf20cb53d4fce479b70e838fadeb9a8b;p=cc65
Removed reference to CC65_HOME.
Now that we're pretty much independent from CC65_HOME
it doesn't make sense anymore to look for it in the Makefiles.
So rather dynamically check if there are "local" binaries in the
../bin directory. If there are "local" binaries use them - and
otherwise rely on "installed" binaries found in the path.
---
diff --git a/libsrc/Makefile b/libsrc/Makefile
index 4f8c622fe..a37abc98a 100644
--- a/libsrc/Makefile
+++ b/libsrc/Makefile
@@ -181,19 +181,11 @@ endef
$(foreach drvtype,$(DRVTYPES),$(eval $(call DRVTYPE_template,$(drvtype))))
-ifdef CC65_HOME
- AR = $(CC65_HOME)/bin/ar65
- CA = $(CC65_HOME)/bin/ca65
- CC = $(CC65_HOME)/bin/cc65
- CO = $(CC65_HOME)/bin/co65
- LD = $(CC65_HOME)/bin/ld65
-else
- AR = ../bin/ar65
- CA = ../bin/ca65
- CC = ../bin/cc65
- CO = ../bin/co65
- LD = ../bin/ld65
-endif
+AR = $(if $(wildcard ../bin/ar65*),../bin/ar65,ar65)
+CA = $(if $(wildcard ../bin/ca65*),../bin/ca65,ca65)
+CC = $(if $(wildcard ../bin/cc65*),../bin/cc65,cc65)
+CO = $(if $(wildcard ../bin/co65*),../bin/co65,co65)
+LD = $(if $(wildcard ../bin/ld65*),../bin/ld65,ld65)
../wrk/$(TARGET)/%.o: %.s | ../wrk/$(TARGET)
@echo $(TARGET) - $<