global srcdir subdir
global STATIC SHARED

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

set prefix ""
foreach x $srcfiles {
    regsub "\\.cc$" $x "" prefix
    set bname [file tail $prefix]
    set resfile "${prefix}.re"
    set options "regexp_match"
    if { $STATIC == "yes" } {
      verbose "prefix = \"$prefix\""
      if { $bname != "dlopen" && $bname != "filter" } {
	test_libcwd "static $options" "${prefix}.cc" $resfile
      }
    }
    if { $SHARED == "yes" } {
      test_libcwd "$options" "${prefix}.cc" $resfile
    }
}
