Rakefile: make header dependency optional

This commit is contained in:
King Kévin 2017-10-19 17:36:38 +02:00
parent a41773b3cf
commit d171e06337
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ task :doc => ["Doxyfile", "README.md"] do |t|
end
desc "compile source into object"
rule '.o' => ['.c', '.h', "#{LIBOPENCM3_LIB}/lib#{STM32F1_LIB}.a"] do |t|
rule '.o' => ['.c', proc{|f| File.file?(f.ext("h")) ? f.ext("h") : []}, "#{LIBOPENCM3_LIB}/lib#{STM32F1_LIB}.a"] do |t|
sh "#{CC} #{cflags} #{archflags} -o #{t.name} -c #{t.prerequisites[0]}"
end