Makefile: fix building on Linux with Clang.
Properly set CC variable to clang++ as it's a C++ project and remove unnecessary compiler and linker flags.
This is similar to https://github.com/DigiDNA/ISOBMFF/pull/17.
Thanks for the PR.
However, this would break the build on some distributions as libc++ might not be the default C++ library.
There's also no difference between calling clang++ or clang -x c++.
It's just a matter of preferences, as both executables are identical and are just wrappers.
You're right about libc++, on Ubuntu 22.04 installing libc++abi-dev did the trick. Maybe we could include that info on README.
But, regarding clang -x c++, building is still breaking with the following error and it's only getting solved when changing CXX to cmake++.
[ ISOBMFF ]> Compiling C++ file [ Release - x86_64 ]: BinaryDataStream.cpp
ISOBMFF/source/BinaryDataStream.cpp:31:10: fatal error: 'fstream' file not found
#include <fstream>
^~~~~~~~~
1 error generated.
make[1]: *** [Submodules/makelib/Targets.mk:220: Build/Release/Intermediates/x86_64/BinaryDataStream.cpp.o] Error 1
make[1]: *** Waiting for unfinished jobs....
[ ISOBMFF ]> Compiling C++ file [ Release - x86_64 ]: BinaryFileStream.cpp
ISOBMFF/source/BinaryFileStream.cpp:31:10: fatal error: 'fstream' file not found
#include <fstream>
^~~~~~~~~
1 error generated.
make[1]: *** [Submodules/makelib/Targets.mk:220: Build/Release/Intermediates/x86_64/BinaryFileStream.cpp.o] Error 1
make: *** [Submodules/makelib/Targets.mk:68: release] Error 2
Ok, I don’t mind using clang++ as long as you keep the flags for the C++ standard library.