This CL makes sure that the tests dirctory Makefile works
properly, i.e. rebuild relevant targets if any of the
dependencies (implicit or explicit) change.

To make dependency generation easier the three source files
in the tests directory shared among many programs
(rollback_index_mock.c test_common.c timer_utils.c and
crc32_test.c) are separated into a library, with each of
them getting its own the automated dependency script
generated by the compiler.

To simplify rule definitions, all applications built in the
test directory get linked with -lcrypto and -lrt, which is
not a problem as the linker will not use the library unless
needed.

Tested by touching different .h and .c files in ./tests,
running make and then and observing the make results.

Also verified that emerging works for x86 in chroot environment.

Review URL: http://codereview.chromium.org/2847012
1 file changed