rakeoe 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rakeoe/app.rb +1 -1
- data/lib/rakeoe/binary_base.rb +11 -6
- data/lib/rakeoe/lib.rb +1 -1
- data/lib/rakeoe/toolchain.rb +14 -5
- data/lib/rakeoe/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5b4889f8d03d07ad15a14a56daace5e4ff4022e
|
4
|
+
data.tar.gz: 1b73e5c46b144fc90f2c2d8ba348cc0eabc4f49f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 710af6324c7c75ecbf7f72165b6141e1a3613a4df8c2c62c3eac4f94d5e9819990ea3700cc246e643919ca55a75c1fe7b1b1b574c0832d00c15c3320af3c0b81
|
7
|
+
data.tar.gz: 9dfd5d613c237b0068a52aa349cf66cf1994b6c6fc9cf2ef937d22ba814ba8cb84577604913dd554f40a991e8de76abd4a43449094c234c337c0ac76728d1525
|
data/lib/rakeoe/app.rb
CHANGED
@@ -52,7 +52,7 @@ module RakeOE
|
|
52
52
|
# create build directory
|
53
53
|
directory build_dir
|
54
54
|
|
55
|
-
binary_targets = paths_of_local_libs() + @app_main_dep + @app_main_obj
|
55
|
+
binary_targets = paths_of_local_libs() + @app_main_dep + @app_main_obj
|
56
56
|
|
57
57
|
# This is only necessary if we have more than a single app main file
|
58
58
|
if @app_lib_objs.any?
|
data/lib/rakeoe/binary_base.rb
CHANGED
@@ -67,7 +67,6 @@ module RakeOE
|
|
67
67
|
|
68
68
|
@objs = @srcs.map {|file| source_to_obj(file, @src_dir, @build_dir)}
|
69
69
|
@test_objs = @test_srcs.map {|file| source_to_obj(file, @src_dir, @build_dir)}
|
70
|
-
|
71
70
|
@deps = @objs.map {|obj| obj.ext('.d')}
|
72
71
|
@test_deps = @test_objs.map {|obj| obj.ext('.d')}
|
73
72
|
|
@@ -75,6 +74,11 @@ module RakeOE
|
|
75
74
|
load_deps(@deps)
|
76
75
|
load_deps(@test_deps)
|
77
76
|
|
77
|
+
# all objs are dependent on project file and platform file
|
78
|
+
(@objs+@test_objs).each do |obj|
|
79
|
+
file obj => [@settings['PRJ_FILE'], @tc.config.platform]
|
80
|
+
end
|
81
|
+
|
78
82
|
if (@settings['TEST_FRAMEWORK'].nil? or @settings['TEST_FRAMEWORK'].empty?)
|
79
83
|
@test_fw = @tc.default_test_framework
|
80
84
|
else
|
@@ -365,14 +369,15 @@ module RakeOE
|
|
365
369
|
|
366
370
|
incs = inc_dirs
|
367
371
|
# find platform specific resource flags
|
368
|
-
# XXX DS
|
369
372
|
libs = search_libs(@settings)
|
370
373
|
libs[:all].each do |name|
|
371
374
|
platform_settings = tc.res_platform_settings(name)
|
372
|
-
|
373
|
-
@settings['ADD_CFLAGS'] += " #{platform_settings[
|
374
|
-
@settings['ADD_CXXFLAGS'] += " #{platform_settings[
|
375
|
-
|
375
|
+
unless platform_settings.empty?
|
376
|
+
@settings['ADD_CFLAGS'] += " #{platform_settings[:CFLAGS]}" if platform_settings[:CFLAGS]
|
377
|
+
@settings['ADD_CXXFLAGS'] += " #{platform_settings[:CXXFLAGS]}" if platform_settings[:CXXFLAGS]
|
378
|
+
# platform_settings[:LDFLAGS] is set in Toolchain#linker_line_for
|
379
|
+
# XXX: remove all -lXX settings from platform_settings[:LDFLAGS] and add rest to @settings['ADD_LDFLAGS'],
|
380
|
+
# XXX: use all -lXX in Toolchain#linker_line_for
|
376
381
|
end
|
377
382
|
end
|
378
383
|
|
data/lib/rakeoe/lib.rb
CHANGED
data/lib/rakeoe/toolchain.rb
CHANGED
@@ -294,7 +294,15 @@ class Toolchain
|
|
294
294
|
# @return [String] Linker line
|
295
295
|
#
|
296
296
|
def linker_line_for(libs)
|
297
|
-
libs.map
|
297
|
+
libs.map do |lib|
|
298
|
+
settings = res_platform_settings(lib)
|
299
|
+
if settings[:LDFLAGS].nil?
|
300
|
+
# automatic linker line if no platform specific LDFLAGS exist
|
301
|
+
"-l#{lib}"
|
302
|
+
else
|
303
|
+
settings[:LDFLAGS]
|
304
|
+
end
|
305
|
+
end.join(' ').strip
|
298
306
|
end
|
299
307
|
|
300
308
|
# Touches a file
|
@@ -310,15 +318,16 @@ class Toolchain
|
|
310
318
|
# @param resource_name [String] name of resource
|
311
319
|
# @return [Hash] Hash of compilation/linkage flags or empty hash if no settings are defined
|
312
320
|
# The returned hash has the following format:
|
313
|
-
# {
|
321
|
+
# { :CFLAGS => '...', :CXXFLAGS => '...', :LDFLAGS => '...'}
|
314
322
|
#
|
315
323
|
def res_platform_settings(resource_name)
|
316
324
|
return {} if resource_name.empty?
|
317
325
|
|
318
326
|
rv = Hash.new
|
319
|
-
rv[
|
320
|
-
rv[
|
321
|
-
rv[
|
327
|
+
rv[:CFLAGS] = @settings["#{resource_name}_CFLAGS"]
|
328
|
+
rv[:CXXFLAGS]= @settings["#{resource_name}_CXXFLAGS"]
|
329
|
+
rv[:LDFLAGS] = @settings["#{resource_name}_LDFLAGS"]
|
330
|
+
rv = {} if rv.values.empty?
|
322
331
|
rv
|
323
332
|
end
|
324
333
|
|
data/lib/rakeoe/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rakeoe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Schnell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|