超漢字上で、mrubyを使ってhello worldを表示させる。
修訂 | 9a148dd759a153902c72118c89e9b46696f90497 (tree) |
---|---|
時間 | 2014-07-16 03:05:58 |
作者 | ornse01 <ornse01@user...> |
Commiter | ornse01 |
modify build target name and rule.
@@ -10,17 +10,21 @@ LDFLAGS = "-L#{ENV['BD']}/lib/i386e2" | ||
10 | 10 | NM = "#{ENV['GNUi386']}/bin/nm" |
11 | 11 | MAKEDEPS = "#{ENV['BD']}/etc/makedeps #{CPPFLAGS}" |
12 | 12 | |
13 | +TARGET = "hello" | |
14 | +TARGET_MAP = "#{TARGET}.map" | |
15 | +TARGET_BIN = "#{TARGET}.out" | |
16 | + | |
13 | 17 | SRCS = FileList["../src/*.c"] |
14 | 18 | OBJS = SRCS.pathmap("%f").ext('o') |
15 | 19 | |
16 | 20 | CLEAN.include(OBJS) |
17 | -CLOBBER.include("mruby-sample.out") | |
18 | -CLOBBER.include("mruby-sample.map") | |
21 | +CLOBBER.include(TARGET_MAP) | |
22 | +CLOBBER.include(TARGET_BIN) | |
19 | 23 | CLOBBER.include("Dependencies.mf") |
20 | 24 | CLOBBER.include(FileList["*.d"]) |
21 | 25 | CLOBBER.include("mruby") |
22 | 26 | |
23 | -task :default => ["mruby_lib", "mruby-sample.map"] | |
27 | +task :default => ["mruby_lib", TARGET_MAP] | |
24 | 28 | |
25 | 29 | task "clean" do |
26 | 30 | sh "ruby ../src/mruby/minirake MRUBY_CONFIG=../src/build_config.rb MRUBY_BUILD_DIR=./mruby -f ../src/mruby/Rakefile clean" |
@@ -30,7 +34,7 @@ task "mruby_lib" do | ||
30 | 34 | sh "ruby ../src/mruby/minirake MRUBY_CONFIG=../src/build_config.rb MRUBY_BUILD_DIR=./mruby -f ../src/mruby/Rakefile" |
31 | 35 | end |
32 | 36 | |
33 | -file "mruby-sample.out" => OBJS do |t| | |
37 | +file TARGET_BIN => OBJS do |t| | |
34 | 38 | sh "#{CC} #{LDFLAGS} #{t.prerequisites.join(' ')} mruby/pcat/lib/libmruby.a #{LOADLIBES} -o #{t.name} " |
35 | 39 | end |
36 | 40 |