The original targets were 'Release' and 'Debug'. I create 'ReleaseStatic' and rename 'Release' to 'ReleaseDynamic' so that a new virtual target 'Release' can invoke both. However, the variable name $TARGET_NAME is tied to 'ReleaseDynamic' instead of 'Release' when I build 'Release' target, and that messes up my pre-build script, which keys on this value to select either 'Release' or 'Debug', not 'ReleaseStatic', 'ReleaseDynamic', 'DebugStatic', or 'DebugDynamic'.
If there is a variable name that represent all the object files, Maybe I can add a 'post-build' script to build static libraries when the dynamic library is built.