From 8ced0a746b2cdafd7e00d3440aa20b55669b0ec3 Mon Sep 17 00:00:00 2001 From: Maxim Salov Date: Sun, 17 Mar 2013 22:37:57 +0300 Subject: [PATCH] Find and use latest installed GNURL78 toolchain automatically. --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4196a66fe..f81106dca 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,10 @@ PROJECT_MOT=$(PROJECT_ELF:.elf=.mot) PROJECT_MAP=$(PROJECT_ELF:.elf=.map) PROJECT_LST=$(PROJECT_ELF:.elf=.lst) -PREFIX=rl78-elf +# Find latest installed GNURL78 toolchain. If your toolchain is already in PATH, just comment next line. +TOOL_PATH:=$(shell find /usr/share -maxdepth 1 -type d -iname "gnurl78*" | sort | tail -n 1)/bin + +PREFIX:=$(TOOL_PATH)/rl78-elf LD = $(PREFIX)-gcc CC = $(PREFIX)-gcc