diff --git a/toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/board/ArduinoLibrary.java b/toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/board/ArduinoLibrary.java index 0cd02f6a424..db11c42b44f 100644 --- a/toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/board/ArduinoLibrary.java +++ b/toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/board/ArduinoLibrary.java @@ -189,7 +189,7 @@ public class ArduinoLibrary { public Path getInstallPath() { return installPath == null - ? ArduinoPreferences.getArduinoHome().resolve("libraries").resolve(name.replace(' ', '_')) //$NON-NLS-1$ + ? ArduinoPreferences.getArduinoHome().resolve("libraries").resolve(name.replaceAll("[ ()]", "_")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ : installPath; } diff --git a/toolchains/arduino/org.eclipse.cdt.arduino.core/templates/Makefile b/toolchains/arduino/org.eclipse.cdt.arduino.core/templates/Makefile index 82ec9471ff9..2c6c698af1d 100644 --- a/toolchains/arduino/org.eclipse.cdt.arduino.core/templates/Makefile +++ b/toolchains/arduino/org.eclipse.cdt.arduino.core/templates/Makefile @@ -51,18 +51,25 @@ LIBRARIES_OBJS = \ <#list libraries_srcs as file> <#assign cpp = file?matches("${libraries_path}/(.*?)/.*?/(.*)\\.cpp")> <#if !cpp> -<#assign cpp = file?matches("${platform_path}/libraries/(.*?)/(.*)\\.cpp")> +<#assign cpp = file?matches("${platform_core_path}/libraries/(.*?)/(.*)\\.cpp")> <#if cpp> ${build_path}/libraries/${cpp?groups[1]}/${cpp?groups[2]}.cpp.o \ <#assign c = file?matches("${libraries_path}/(.*?)/.*?/(.*)\\.c")> <#if !c> -<#assign c = file?matches("${platform_path}/libraries/(.*?)/(.*)\\.c")> +<#assign c = file?matches("${platform_core_path}/libraries/(.*?)/(.*)\\.c")> <#if c> ${build_path}/libraries/${c?groups[1]}/${c?groups[2]}.c.o \ +<#assign S = file?matches("${libraries_path}/(.*?)/.*?/(.*)\\.S")> +<#if !S> +<#assign S = file?matches("${platform_core_path}/libraries/(.*?)/(.*)\\.S")> + +<#if S> + ${build_path}/libraries/${S?groups[1]}/${S?groups[2]}.S.o \ + TARGETS = \ @@ -99,7 +106,7 @@ ${build_path}/${project_name}.elf: $(PROJECT_OBJS) $(LIBRARIES_OBJS) ${build_pat ${build_path}/core.a: $(PLATFORM_CORE_OBJS) $(PLATFORM_VARIANT_OBJS) clean: - $(RMDIR) ${build_path} + $(RMDIR) ${build_path}/* size: ${recipe_size_pattern} @@ -191,7 +198,7 @@ ${build_path}/variant/${S?groups[1]}.S.o: ${file} <#list libraries_srcs as file> <#assign cpp = file?matches("${libraries_path}/(.*?)/.*?/(.*)\\.cpp")> <#if !cpp> -<#assign cpp = file?matches("${platform_path}/libraries/(.*?)/(.*)\\.cpp")> +<#assign cpp = file?matches("${platform_core_path}/libraries/(.*?)/(.*)\\.cpp")> <#if cpp> ${build_path}/libraries/${cpp?groups[1]}/${cpp?groups[2]}.cpp.o: ${file} ${build_path}/libraries/${cpp?groups[1]}/${cpp?groups[2]}.cpp.d @@ -205,7 +212,7 @@ ${build_path}/libraries/${cpp?groups[1]}/${cpp?groups[2]}.cpp.d: ; <#assign c = file?matches("${libraries_path}/(.*?)/.*?/(.*)\\.c")> <#if !c> -<#assign c = file?matches("${platform_path}/libraries/(.*?)/(.*)\\.c")> +<#assign c = file?matches("${platform_core_path}/libraries/(.*?)/(.*)\\.c")> <#if c> ${build_path}/libraries/${c?groups[1]}/${c?groups[2]}.c.o: ${file} ${build_path}/libraries/${c?groups[1]}/${c?groups[2]}.c.d @@ -216,5 +223,15 @@ ${build_path}/libraries/${c?groups[1]}/${c?groups[2]}.c.d: ; -include ${build_path}/libraries/${c?groups[1]}/${c?groups[2]}.c.d + +<#assign S = file?matches("${libraries_path}/(.*?)/.*?/(.*)\\.S")> +<#if !S> +<#assign S = file?matches("${platform_core_path}/libraries/(.*?)/(.*)\\.S")> + +<#if S> +${build_path}/libraries/${S?groups[1]}/${S?groups[2]}.S.o: ${file} + @$(call mymkdir,$(dir $@)) + ${recipe_S_o_pattern} + \ No newline at end of file