Generate all APIs.

This CL expands the generator to create all the .rsh files, not just
the core_math one.  To do so, processing of types (simple, struct, enums)
and constants was added.  .spec files corresponding to each .rsh file was
created.  Documentation was added.

This CL also generates HTML documentation files.  This generation will soon
be upgraded.

To make the code easier to expand, I've done fairly extensive refactoring.

In a subsequent CL, the APIs will be regrouped in different header files to
simplify learning the APIs.  In an other, the documentation generation will
be futher improved and incorporated in the actual online help.

Also removes rs_path & related functions.

Change-Id: I2c88554c9c6a8625233772b89e055fc6c4ad5da5
diff --git a/api/generate.sh b/api/generate.sh
index 44c9e80..0881690 100755
--- a/api/generate.sh
+++ b/api/generate.sh
@@ -16,9 +16,14 @@
 #
 
 set -e
-g++ gen_runtime.cpp -std=c++11 -Wall -o gen_runtime
-./gen_runtime -v 21 rs_core_math.spec
-mv GeneratedTest*.java ../../../cts/tests/tests/renderscript/src/android/renderscript/cts/
-mv GeneratedTest*.rs ../../../cts/tests/tests/renderscript/src/android/renderscript/cts/
-mv rs_core_math.rsh ../scriptc/
-rm ./gen_runtime
+g++ Generator.cpp Specification.cpp GenerateHtmlDocumentation.cpp GenerateHeaderFiles.cpp GenerateTestFiles.cpp Scanner.cpp Utilities.cpp -g -std=c++11 -Wall -o generator
+
+./generator rs_allocation.spec rs_atomic.spec rs_core_math.spec rs_core.spec rs_debug.spec rs_element.spec rs_graphics.spec rs_math.spec rs_matrix.spec rs_mesh.spec rs_object.spec rs_program.spec rs_quaternion.spec rs_sampler.spec rs_time.spec rs_types.spec
+
+rm ../../../cts/tests/tests/renderscript/src/android/renderscript/cts/GeneratedTest*
+mv GeneratedTest* ../../../cts/tests/tests/renderscript/src/android/renderscript/cts/
+
+mv *.rsh ../scriptc
+
+rm *.html # TODO handle the documentation files.
+rm generator