- subdir handler for install headers into a specific directory
-- hack for loading modules locally
- - create
- saner names for some of the .pc files
- .pc files also when there is a public header?
- get rid of include/structs.h and include/proto.h
for each subsystem:
- include line in Makefile
- rule in Makefile
-- determine dependencies from #include lines ?
- install (parts of ?) autogenerated headers
+
+set of test scripts that check the code:
+- configure_check_unused.pl
+- find_unused_macros.pl
+- find_unused_makefilevars.pl
+- find_unused_options.sh
+- findstatic.pl
+- minimal_includes.pl
+- check dependencies based on #include lines ?
+- check whether private headers are not used outside their own subsystem
my $init_obj = "";
if ($self->{duplicate_build}) {
- $installdir = "bin/install";
+ $installdir = $ctx->{INSTALLDIR};
} else {
- $installdir = "bin";
+ $installdir = $ctx->{BUILDDIR};
}
if ($ctx->{TYPE} eq "LIBRARY") {
- push (@{$self->{shared_libs}}, "bin/$ctx->{LIBRARY_REALNAME}");
+ push (@{$self->{shared_libs}}, "$ctx->{BUILDDIR}/$ctx->{LIBRARY_REALNAME}");
} elsif ($ctx->{TYPE} eq "MODULE") {
- push (@{$self->{shared_modules}}, "bin/$ctx->{LIBRARY_REALNAME}");
+ push (@{$self->{shared_modules}}, "$ctx->{BUILDDIR}/$ctx->{LIBRARY_REALNAME}");
push (@{$self->{plugins}}, "$installdir/$ctx->{LIBRARY_REALNAME}");
my $fixedname = $ctx->{NAME};
$self->output(<< "__EOD__"
#
-bin/$ctx->{LIBRARY_REALNAME}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST) $init_obj
+$ctx->{TARGET}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST) $init_obj
\@echo Linking \$\@
+ \@mkdir -p $ctx->{BUILDDIR}
\@\$(SHLD) \$(SHLD_FLAGS) -o \$\@ \$(LOCAL_LINK_FLAGS) \\
\$($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) $soarg \\
$init_obj \$($ctx->{TYPE}_$ctx->{NAME}_LINK_LIST)
$lib_name = "lib$link_name";
}
+ $lib->{BUILDDIR} = "bin";
+ $lib->{INSTALLDIR} = "bin/install";
$lib->{LIBRARY_REALNAME} = $lib->{LIBRARY_NAME} = "$lib_name.\$(SHLIBEXT)";
+
if (defined($lib->{VERSION})) {
$lib->{LIBRARY_SONAME} = $lib->{LIBRARY_NAME}.".$lib->{SO_VERSION}";
$lib->{LIBRARY_REALNAME} = $lib->{LIBRARY_NAME}.".$lib->{VERSION}";
+ } elsif ($lib->{TYPE} eq "MODULE") {
+ $lib->{BUILDDIR} = "bin/modules/$lib->{SUBSYSTEM}";
}
- $lib->{TARGET} = "bin/$lib->{LIBRARY_REALNAME}";
+ $lib->{TARGET} = "$lib->{BUILDDIR}/$lib->{LIBRARY_REALNAME}";
$lib->{OUTPUT} = $lib->{TARGET};
}
@{$bin->{LINK_LIST}} = ("\$($bin->{TYPE}_$bin->{NAME}\_OBJ_LIST)");
@{$bin->{LINK_FLAGS}} = ();
- $bin->{TARGET} = $bin->{OUTPUT} = "bin/$bin->{NAME}";
+ $bin->{INSTALLDIR} = "bin/install";
+ $bin->{BUILDDIR} = "bin/";
+ $bin->{TARGET} = $bin->{OUTPUT} = "$bin->{BUILDDIR}/$bin->{NAME}";
$bin->{BINARY} = $bin->{NAME};
}