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() {
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
</#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>
|
Loading…
Add table
Reference in a new issue