- if ( $3 == "." || srcdir == "." )
- printf "\t%scd ../%s; $(%s) $(CFLAGS_%s) -c ../%s/%s%s", atsign, model, compile, MODEL, name, $1, suffix
- else
- printf "\t%scd ../%s; $(%s) $(CFLAGS_%s) -c %s/%s%s", atsign, model, compile, MODEL, $3, $1, suffix
+ printf "\t%s", atsign;
+ if ( use_c_o != "yes" ) {
+ printf "cd ../%s; ", model;
+ }
+ # The choice here is between
+ # base+ext_funcs and
+ # termlib+ext_tinfo
+ # but they may appear in the same value.
+ if ( subset ~ /base/ ) {
+ mycflags=""
+ } else if ( subset ~ /termlib/ ) {
+ mycflags=" -DUSE_TERMLIB"
+ }
+ printf "$(LIBTOOL_COMPILE) $(%s) $(CFLAGS_%s)%s -c ", compile, MODEL, mycflags
+ if ( $3 == "." || srcdir == "." ) {
+ dir = $3 "/"
+ sub("^\\$\\(srcdir\\)/","",dir);
+ sub("^\\./","",dir);
+ printf "../%s/%s%s%s", name, dir, $1, suffix
+ } else {
+ printf "%s/%s%s", $3, $1, suffix
+ }
+ if ( use_c_o == "yes" ) {
+ printf " -o ../%s/%s$o", model, $1
+ }