diff options
| author | MATSUMOTO Ryosuke <[email protected]> | 2012-12-22 23:30:37 +0900 |
|---|---|---|
| committer | MATSUMOTO Ryosuke <[email protected]> | 2012-12-22 23:30:37 +0900 |
| commit | b6c39975ab0f2977ba6efd4f2932d8aa80f2ed59 (patch) | |
| tree | d40265e450c2d665919bd077cefe623d580106a0 | |
| parent | a30c7fa73082d1e17bdd3adf87afd40e09640ef8 (diff) | |
| download | mruby-b6c39975ab0f2977ba6efd4f2932d8aa80f2ed59.tar.gz mruby-b6c39975ab0f2977ba6efd4f2932d8aa80f2ed59.zip | |
Support MakefileGemList for MRUBY_CFLAGS and MRUBY_LDFLAGS
Other apps using mruby like mod_mruby easy to link mrbgems dynamically by MakefileGemList
| -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 d6022c84a..08cdf11b5 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 4f0d1175f..76bff7b0e 100644 --- a/mrbgems/build_tasks.rb +++ b/mrbgems/build_tasks.rb @@ -113,7 +113,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 |
