Update makefile
PREFIX/DESTDIR: Standard install variables for system installs and packaging. LOCAL still works by overriding PREFIX.
Out-of-tree build: Objects and binaries go under build/, keeping your tree clean.
Shared/static: SHARED=1 builds a .so. If VERSION=X.Y.Z is set, the Makefile sets SONAME and creates the usual .so.$(MAJOR) and .so symlinks.
Dependency tracking: -MMD -MP generates .d files so only changed sources rebuild.
Safer defaults: g++ by default, with -Wall -Wextra -fPIC. Keeps your original -fno-strict-aliasing.
Debug/Release: BUILD=debug adds -g -O0 and defines DEBUG; release defines NDEBUG.
LTO optional: LTO=1 adds -flto and switches to gcc-ar/gcc-ranlib for compatibility.
pthread: Enabled by default (set PTHREAD=0 to disable).
pkg-config: Installs libangelscript.pc so downstream projects can pkg-config --cflags --libs angelscript.
Help/clean/distclean: Quality of life improvements.