my $subsys_output_type = ["MERGED_OBJ"];
my $library_output_type;
-if ($config::config{USESHARED} eq "true") {
- $library_output_type = ["SHARED_LIBRARY", "STATIC_LIBRARY"];
+my $useshared = (defined($ENV{USESHARED})?$ENV{USESHARED}:$config::config{USESHARED});
+
+if ($useshared eq "true") {
+ $library_output_type = ["SHARED_LIBRARY", "MERGED_OBJ"];
} else {
- $library_output_type = ["STATIC_LIBRARY"];
+ $library_output_type = ["MERGED_OBJ"];
push (@$library_output_type, "SHARED_LIBRARY") if
($config::config{BLDSHARED} eq "true")
}
my $module_output_type;
-if ($config::config{USESHARED} eq "true") {
+if ($useshared eq "true") {
$module_output_type = ["SHARED_LIBRARY"];
} else {
$module_output_type = ["MERGED_OBJ"];
$shared_libs_used = 1;
}
if ($key->{TYPE} eq "MODULE" and @{$key->{OUTPUT_TYPE}}[0] eq "MERGED_OBJ" and defined($key->{INIT_FUNCTION})) {
- $mkenv->output("$key->{SUBSYSTEM}_INIT_FUNCTIONS += $key->{INIT_FUNCTION},\n");
+ $mkenv->output("$key->{SUBSYSTEM}_INIT_FUNCTIONS +=$key->{INIT_FUNCTION},\n");
}
$mkenv->CFlags($key);
}