examples: Fix Makefile to stop building when find an error

Now the build process will stop when an example fails to build.