Makefiles: Remove query for CMAKE_OBJECT_NAME

it is not set.
2 jobs for st2-exclude-patterns-variable
Status Name Job ID Coverage
  External
passed kwrobot-commit-check

passed kwrobot-commit-check