Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2016-06-16 22:15:37 -0400
committerDoug Schaefer2016-06-17 16:08:02 -0400
commitd6d135d7011f2171665a8fce8a7da8f16002e0b8 (patch)
treed778bd5dd885970da5c6e1fc9e0f43140b870073 /toolchains
parentbf8d82a992d82f3d60c65d88cee5bf07a60557e9 (diff)
downloadorg.eclipse.cdt-d6d135d7011f2171665a8fce8a7da8f16002e0b8.tar.gz
org.eclipse.cdt-d6d135d7011f2171665a8fce8a7da8f16002e0b8.tar.xz
org.eclipse.cdt-d6d135d7011f2171665a8fce8a7da8f16002e0b8.zip
Bug 485992 - Add support for libs with parens and assembly files.
The AVR Timer Library has this. Change-Id: I595ed64d2d6d56e17cbbb503875b07afb77ec199
Diffstat (limited to 'toolchains')
-rw-r--r--toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/board/ArduinoLibrary.java2
-rw-r--r--toolchains/arduino/org.eclipse.cdt.arduino.core/templates/Makefile27
2 files changed, 23 insertions, 6 deletions
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 0cd02f6a42..db11c42b44 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 82ec9471ff..2c6c698af1 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>
<#if cpp>
${build_path}/libraries/${cpp?groups[1]}/${cpp?groups[2]}.cpp.o \
</#if>
<#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>
<#if c>
${build_path}/libraries/${c?groups[1]}/${c?groups[2]}.c.o \
</#if>
+<#assign S = file?matches("${libraries_path}/(.*?)/.*?/(.*)\\.S")>
+<#if !S>
+<#assign S = file?matches("${platform_core_path}/libraries/(.*?)/(.*)\\.S")>
+</#if>
+<#if S>
+ ${build_path}/libraries/${S?groups[1]}/${S?groups[2]}.S.o \
+</#if>
</#list>
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>
<#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: ;
</#if>
<#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>
<#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
@@ -217,4 +224,14 @@ ${build_path}/libraries/${c?groups[1]}/${c?groups[2]}.c.d: ;
-include ${build_path}/libraries/${c?groups[1]}/${c?groups[2]}.c.d
</#if>
+<#assign S = file?matches("${libraries_path}/(.*?)/.*?/(.*)\\.S")>
+<#if !S>
+<#assign S = file?matches("${platform_core_path}/libraries/(.*?)/(.*)\\.S")>
+</#if>
+<#if S>
+${build_path}/libraries/${S?groups[1]}/${S?groups[2]}.S.o: ${file}
+ @$(call mymkdir,$(dir $@))
+ ${recipe_S_o_pattern}
+
+</#if>
</#list> \ No newline at end of file

Back to the top