After the introduction of the "set -e" option, the build script fails on non debian/ubuntu linux distributions.
This is a quick fix to allow the users of distros other than debian/ubuntu to build the library, not a definitive solution.
The COCOS2DX_USEAPT environment variable can be set in the user shell config or used directly in
the command line: COCOS2DX_USEAPT=false ./make-all-linux-project.sh
There was a bug where missing packages would cause the script
to exit.
This change also makes several improvements:
- script can now be run from anywhere (not only the cocos root)
- apt-get is called only once to install all missing packages
(this makes output much more informative on first use)
- added comment/docs to the top of the script
This change makes several fundamental improvements to the linux
build system:
- Remove duplication: a lot of the common make logic is now in
a central shared makefile: cocos2dx/proj.linux/cocos2dx.mk
- Quiet by default: unless you specify V=1 on the commandline
the output is now very clean and quiet.
- Dependencies: gcc's automatic dependancy generation is now
used (-MMD). This means that if you change a header file
then all the object that depend on it now get rebuilt.
- Don't store objects in the source tree: previously object
files were stored alongside the sources, which meant that
debug and release object clobbered each other which leads
to confusion and lots of unnecessary rebuilding.Q
- Library dependencies: each binary now depends on the libraries
it links aginst. This means that if the cocos2dx library
changes then all examples will get re-linked.
- Top level Makefile: there is now a top level Makefile that
can be shared/used by any platform the uses make as the
build system (for example NaCl). Everything can be built
by simply running 'make' at the top level. e.g:
make DEBUG=1
make DEBUG=1 clean