Ignore:
Timestamp:
Jul 3, 2020, 7:19:17 PM (4 years ago)
Author:
coas-nagasima
Message:

ASP3, TINET, mbed を更新

File:
1 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/asp3_dcre/configure.rb

    r331 r429  
    77#  Copyright (C) 2001-2003 by Embedded and Real-Time Systems Laboratory
    88#                              Toyohashi Univ. of Technology, JAPAN
    9 #  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
     9#  Copyright (C) 2006-2019 by Embedded and Real-Time Systems Laboratory
    1010#              Graduate School of Information Science, Nagoya Univ., JAPAN
    1111#
     
    4242#
    4343
     44Encoding.default_external = 'utf-8'
    4445require "optparse"
    4546require "fileutils"
     
    5657#                                               ル名)名
    5758#  -C <cdlflle>                 コンポーネント記述ファイル(.cdlファイル)名
    58 #  -U <applobjs>                他のアプリケーションプログラムファイル
     59#  -U <applobjs>                アプリケーションの追加のオブジェクトファイル
    5960#                                               (.oファイル名で指定.複数指定可)
    60 #  -S <syssvcobjs>              システムサービスのプログラムファイル
     61#  -S <syssvcobjs>              システムサービスのオブジェクトファイル
    6162#                                               (.oファイル名で指定.複数指定可)
     63#  -B <bannerobj>               バナー表示のオブジェクトファイル(.oファイル名で指定)
    6264#  -L <kernel_lib>              カーネルライブラリ(libkernel.a)のディレクトリ名
    6365#                                               (省略した場合,カーネルライブラリもmakeする)
     
    6769#  -m <tempmakefile>    Makefileのテンプレートのファイル名の指定(デフォル
    6870#                                               トはsampleディレクトリのMakefile)
    69 #  -d <depdir>                  依存関係ファイルのディレクトリ名(デフォルトはdeps)
     71#  -d <objdir>                  中間オブジェクトファイルと依存関係ファイルを置く
     72#                                               ディレクトリ名(デフォルトはobjs)
    7073#  -w                                   TECSを使用しない
     74#  -W <tecsdir>                 TECS関係ファイルのディレクトリ名(デフォルトはソー
     75#                                               スファイルのディレクトリの下のtecsgen)
    7176#  -r                                   トレースログ記録のサンプルコードを使用するかどうか
    7277#                                               の指定
     
    7782#  -o <options>                 コンパイルオプション(COPTSに追加)
    7883#  -O <options>                 シンボル定義オプション(CDEFSに追加)
    79 #  -k <options>                 リンカオプション(LDFLAGS等に追加)
     84#  -k <options>                 リンカオプション(LDFLAGSに追加)
     85#  -b <options>                 リンカオプション(LIBSに追加)
    8086#  -e <tinetdir>                TINET のソースの置かれているディレクトリ
    8187#  -i <net_if>                  ネットワークインタフェース(TINETが有効の場合は必須)
     
    111117#
    112118#  % ../configure.rb -T gr_sakura_gcc -A sample1n \
    113 #                                       -e tinet -i ether -v if_rx62n -n inet4 -s tcp -U sample1.o
     119#                                       -e tinet -i ether -v if_mbed -n inet4 -s tcp -U sample1.o
    114120#       TINETを有効にする.
    115121
     
    119125$target = nil
    120126$appldirs = []
     127$applname = nil
     128$option_t = false
     129$cfgfile = nil
     130$cdlfile = nil
    121131$applobjs = []
    122132$syssvcobjs = []
     133$bannerobj = nil
    123134$kernel_lib = ""
    124135$kernel_funcobjs = ""
     136$srcdir = nil
    125137$srclang = "c"
    126 $depdir = "deps"
     138$tempmakefile = nil
     139$objdir = "objs"
    127140$omit_tecs = ""
     141$tecsdir = nil
    128142$enable_trace = ""
    129143$devtooldir = ""
    130144$ruby = "ruby"
     145$cfg = nil
     146$tecsgen = nil
    131147$copts = []
    132148$cdefs = []
    133149$ldflags = []
     150$libs = []
    134151
    135152#
     
    141158  end
    142159  opt.on("-a appldirs",         "application directories") do |val|
    143     $appldirs += val.split("\s+")
     160    $appldirs += val.split(/\s+/)
    144161  end
    145162  opt.on("-A applname",         "application program name") do |val|
     
    156173  end
    157174  opt.on("-U applobjs",         "additional application object files") do |val|
    158     $applobjs += val.split("\s+")
     175    $applobjs += val.split(/\s+/)
    159176  end
    160177  opt.on("-S syssvcobjs",       "system service object files") do |val|
    161     $syssvcobjs += val.split("\s+")
     178    $syssvcobjs += val.split(/\s+/)
     179  end
     180  opt.on("-B bannerobj",        "banner display object file") do |val|
     181    $bannerobj = val
    162182  end
    163183  opt.on("-L kernel_lib",       "directory of built kernel library") do |val|
     
    165185  end
    166186  opt.on("-f", "each function is complied separately in kernel") do |val|
    167     $kernel_funcobjs = true
     187    $kernel_funcobjs = "true"
    168188  end
    169189  opt.on("-D srcdir",           "path of source code directory") do |val|
     
    176196    $tempmakefile = val
    177197  end
    178   opt.on("-d depdir",           "dependency relation file directory") do |val|
    179     $depdir = val
     198  opt.on("-d objdir",           "relocatable object file directory") do |val|
     199    $objdir = val
    180200  end
    181201  opt.on("-w",                          "TECS is not used at all") do |val|
    182     $omit_tecs = true
     202    $omit_tecs = "true"
     203  end
     204  opt.on("-W tecsdir",          "path of TECS file directory") do |val|
     205    $tecsdir = val
    183206  end
    184207  opt.on("-r",                          "use the sample code for trace log") do |val|
    185     $enable_trace = true
     208    $enable_trace = "true"
    186209  end
    187210  opt.on("-V devtooldir",       "development tools directory") do |val|
     
    198221  end
    199222  opt.on("-o options",          "compiler options") do |val|
    200     $copts += val.split("\s+")
     223    $copts += val.split(/\s+/)
    201224  end
    202225  opt.on("-O options",          "symbol definition options") do |val|
    203     $cdefs += val.split("\s+")
     226    $cdefs += val.split(/\s+/)
    204227  end
    205228  opt.on("-k options",          "linker options") do |val|
    206     $ldflags += val.split("\s+")
     229    $ldflags += val.split(/\s+/)
     230  end
     231  opt.on("-b options",          "linker options for linking libraries") do |val|
     232    $libs += val.split(/\s+/)
    207233  end
    208234  opt.on("-e options",          "path of TINET directory") do |val|
     
    236262
    237263#
    238 #  変数のデフォルト値
     264#  変数のデフォルト値(文字列変数のデフォルト値は初期化で与える)
    239265#
    240266if $appldirs.empty?
     
    242268end
    243269$applname ||= "sample1"
    244 if $option_t.nil?
    245   $applobjs.unshift($applname + ".o")
    246 end
    247270$cfgfile ||= $applname + ".cfg"
    248271$cdlfile ||= $applname + ".cdl"
     272$applobjs.unshift($applname + ".o") if !$option_t
     273$bannerobj ||= ($omit_tecs == "") ? "tBannerMain.o" : "banner.o"
    249274if $srcdir.nil?
    250275  # ソースディレクトリ名を取り出す
     
    261286end
    262287$tempmakefile ||= $srcdir + "/sample/Makefile"
     288$tecsdir ||= "\$(SRCDIR)/tecsgen"
    263289$cfg ||= $ruby + " \$(SRCDIR)/cfg/cfg.rb"
    264 $tecsgen ||= $ruby + " \$(SRCDIR)/tecsgen/tecsgen.rb"
     290$tecsgen ||= $ruby + " \$(TECSDIR)/tecsgen.rb"
    265291
    266292#
     
    294320$vartable["APPLOBJS"] = $applobjs.join(" ")
    295321$vartable["SYSSVCOBJS"] = $syssvcobjs.join(" ")
     322$vartable["BANNEROBJ"] = $bannerobj
    296323$vartable["KERNEL_LIB"] = $kernel_lib
    297324$vartable["KERNEL_FUNCOBJS"] = $kernel_funcobjs
     
    299326$vartable["SRCABSDIR"] = $srcabsdir
    300327$vartable["SRCLANG"] = $srclang
    301 $vartable["DEPDIR"] = $depdir
     328$vartable["OBJDIR"] = $objdir
    302329$vartable["OMIT_TECS"] = $omit_tecs
     330$vartable["TECSDIR"] = $tecsdir
    303331$vartable["ENABLE_TRACE"] = $enable_trace
    304332$vartable["DEVTOOLDIR"] = $devtooldir
     
    309337$vartable["CDEFS"] = $cdefs.join(" ")
    310338$vartable["LDFLAGS"] = $ldflags.join(" ")
     339$vartable["LIBS"] = $libs.join(" ")
    311340$vartable["OBJEXT"] = GetObjectExtension()
    312341$vartable["TINETDIR"] = $tinetdir
     
    362391#  依存関係ファイルのディレクトリの作成
    363392#
    364 if !File.directory?($depdir)
    365   Dir.mkdir($depdir)
    366 end
     393if !File.directory?($objdir)
     394  Dir.mkdir($objdir)
     395end
Note: See TracChangeset for help on using the changeset viewer.