mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 485992 - Add support for libs with parens and assembly files.
The AVR Timer Library has this. Change-Id: I595ed64d2d6d56e17cbbb503875b07afb77ec199
This commit is contained in:
parent
bf8d82a992
commit
d6d135d701
2 changed files with 23 additions and 6 deletions
|
@ -189,7 +189,7 @@ public class ArduinoLibrary {
|
||||||
|
|
||||||
public Path getInstallPath() {
|
public Path getInstallPath() {
|
||||||
return installPath == null
|
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;
|
: installPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,18 +51,25 @@ LIBRARIES_OBJS = \
|
||||||
<#list libraries_srcs as file>
|
<#list libraries_srcs as file>
|
||||||
<#assign cpp = file?matches("${libraries_path}/(.*?)/.*?/(.*)\\.cpp")>
|
<#assign cpp = file?matches("${libraries_path}/(.*?)/.*?/(.*)\\.cpp")>
|
||||||
<#if !cpp>
|
<#if !cpp>
|
||||||
<#assign cpp = file?matches("${platform_path}/libraries/(.*?)/(.*)\\.cpp")>
|
<#assign cpp = file?matches("${platform_core_path}/libraries/(.*?)/(.*)\\.cpp")>
|
||||||
</#if>
|
</#if>
|
||||||
<#if cpp>
|
<#if cpp>
|
||||||
${build_path}/libraries/${cpp?groups[1]}/${cpp?groups[2]}.cpp.o \
|
${build_path}/libraries/${cpp?groups[1]}/${cpp?groups[2]}.cpp.o \
|
||||||
</#if>
|
</#if>
|
||||||
<#assign c = file?matches("${libraries_path}/(.*?)/.*?/(.*)\\.c")>
|
<#assign c = file?matches("${libraries_path}/(.*?)/.*?/(.*)\\.c")>
|
||||||
<#if !c>
|
<#if !c>
|
||||||
<#assign c = file?matches("${platform_path}/libraries/(.*?)/(.*)\\.c")>
|
<#assign c = file?matches("${platform_core_path}/libraries/(.*?)/(.*)\\.c")>
|
||||||
</#if>
|
</#if>
|
||||||
<#if c>
|
<#if c>
|
||||||
${build_path}/libraries/${c?groups[1]}/${c?groups[2]}.c.o \
|
${build_path}/libraries/${c?groups[1]}/${c?groups[2]}.c.o \
|
||||||
</#if>
|
</#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>
|
</#list>
|
||||||
|
|
||||||
TARGETS = \
|
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)
|
${build_path}/core.a: $(PLATFORM_CORE_OBJS) $(PLATFORM_VARIANT_OBJS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RMDIR) ${build_path}
|
$(RMDIR) ${build_path}/*
|
||||||
|
|
||||||
size:
|
size:
|
||||||
${recipe_size_pattern}
|
${recipe_size_pattern}
|
||||||
|
@ -191,7 +198,7 @@ ${build_path}/variant/${S?groups[1]}.S.o: ${file}
|
||||||
<#list libraries_srcs as file>
|
<#list libraries_srcs as file>
|
||||||
<#assign cpp = file?matches("${libraries_path}/(.*?)/.*?/(.*)\\.cpp")>
|
<#assign cpp = file?matches("${libraries_path}/(.*?)/.*?/(.*)\\.cpp")>
|
||||||
<#if !cpp>
|
<#if !cpp>
|
||||||
<#assign cpp = file?matches("${platform_path}/libraries/(.*?)/(.*)\\.cpp")>
|
<#assign cpp = file?matches("${platform_core_path}/libraries/(.*?)/(.*)\\.cpp")>
|
||||||
</#if>
|
</#if>
|
||||||
<#if 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
|
${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>
|
</#if>
|
||||||
<#assign c = file?matches("${libraries_path}/(.*?)/.*?/(.*)\\.c")>
|
<#assign c = file?matches("${libraries_path}/(.*?)/.*?/(.*)\\.c")>
|
||||||
<#if !c>
|
<#if !c>
|
||||||
<#assign c = file?matches("${platform_path}/libraries/(.*?)/(.*)\\.c")>
|
<#assign c = file?matches("${platform_core_path}/libraries/(.*?)/(.*)\\.c")>
|
||||||
</#if>
|
</#if>
|
||||||
<#if 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
|
${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
|
-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>
|
</#if>
|
||||||
</#list>
|
</#list>
|
Loading…
Add table
Reference in a new issue