Your all target currently unconditionally compiles everything everytime it is called, for example from the install target. This prevents build and install from being two different steps of the build process, which breaks some packaging tools for example.
A good solution for this problem would be to add targets for core.so depending on all .o files, and list it as a dependency for the all target, so if core.so is already present it won’t get built again.