diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-12-22 07:40:51 -0800 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-12-22 07:40:51 -0800 |
| commit | b42d17adb3d4a8481b3399b5e2ce2a8b783f9aea (patch) | |
| tree | cfb4e4e4cde2da7b5a99f73c856e5b2f22cb72e6 | |
| parent | 22c72b4d2abf7dce50237eab7b6338c8597a75de (diff) | |
| parent | b6c39975ab0f2977ba6efd4f2932d8aa80f2ed59 (diff) | |
| download | mruby-b42d17adb3d4a8481b3399b5e2ce2a8b783f9aea.tar.gz mruby-b42d17adb3d4a8481b3399b5e2ce2a8b783f9aea.zip | |
Merge pull request #668 from matsumoto-r/support_gem_flags_list
Support MakefileGemList for MRUBY_CFLAGS and MRUBY_LDFLAGS
| -rw-r--r-- | mrbgems/Makefile4gem | 2 | ||||
| -rw-r--r-- | mrbgems/build_tasks.rb | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/mrbgems/Makefile4gem b/mrbgems/Makefile4gem index 27b4701c4..d9f7d3724 100644 --- a/mrbgems/Makefile4gem +++ b/mrbgems/Makefile4gem @@ -124,7 +124,7 @@ gem-clean-rb-files : %.o : %.c - $(CC) -c $(CFLAGS) $(CPPFLAGS) $(GEM_INCLUDE_LIST) $< -o $@ + $(CC) -c $(CFLAGS) $(CPPFLAGS) $(GEM_CFLAGS_LIST) $< -o $@ .PHONY : clean clean : gem-clean diff --git a/mrbgems/build_tasks.rb b/mrbgems/build_tasks.rb index b98e641df..f52a786b0 100644 --- a/mrbgems/build_tasks.rb +++ b/mrbgems/build_tasks.rb @@ -114,7 +114,8 @@ GEM_LIST := #{for_each_gem{|path, gemname| "#{path}/mrb-#{gemname}-gem.a "}} GEM_ARCHIVE_FILES := #{MRUBY_ROOT}/mrbgems/gem_init.a GEM_ARCHIVE_FILES += $(GEM_LIST) -GEM_INCLUDE_LIST := #{for_each_gem{|path, gemname| "-I#{path}/include "}} +GEM_CFLAGS_LIST := #{for_each_gem{|path, gemname| "#{File.read("#{path}/gem-cflags.tmp").chomp} "}} +GEM_LDFLAGS_LIST := #{for_each_gem{|path, gemname| "#{File.read("#{path}/gem-ldflags.tmp").chomp} "}} __EOF__ end end |
