Adapt to locally imported clib and cpplib project subtrees

Now we can build it without dependent libraries (except DirectX SDK).