global srcdir subdir
global STATIC SHARED

catch "glob -nocomplain $srcdir/$subdir/*.cc" srcfiles
#set srcfiles $srcdir/$subdir/type_info.cc
verbose "srcfiles are $srcfiles"

set prefix ""
foreach x $srcfiles {
    regsub "\\.cc$" $x "" prefix
    set resfile "${prefix}.re"
    set options "regexp_match nodebug"
    if { $STATIC == "yes" } {
      test_libcwd "static $options" "${prefix}.cc" $resfile
    }
    if { $SHARED == "yes" } {
      test_libcwd "$options" "${prefix}.cc" $resfile
    }
}
