Elastos c/c++ Build Environment

command to startup the ElastosRDK environment: source /home/xxx/Elastos.RDK/Setup/SetEnv.sh [ arm_android | gcc_devtools ]



=RDK Commands =
 * (1) emake:(recursively) build target files in the directory
 * (2) emake clean:clean up the target files in the mirror directory
 * (3) emake clobber:clean up the whole project in the target directory
 * (4) pd @:push current directory onto command stack, then jump to the target directory.
 * (5) pd:pop command stack, i.e., jump back to the previously working directory.
 * (6) pd ~:push current directory onto command stack,then jump to the mirror directory (of built files).
 * (7) ./HelloWorld1:execute the HelloWorld1 demo
 * (8) elcopy:copy a file or a directory to device
 * (9) eldrop:copy all the elastos runtime files to device
 * (10) elrsh:start the adb shell

emake
Elastos RDK provides a compile tool for developers to create a set of code skeletons of a CAR component from a CAR definition file(*.car) or build their Elastos projects. The compiler is used as a command line and named as emake. Emake command has two compile mode. One is for the creation of the code skeletions from a *.car file. One is for a complete Elastos projects. The compiler will compile all the files in the project root directory and it sub-directories recursively according to the manifest files such as dirs and sources files.

Command Format

emake [-? | -v | all | clean |clobber|rebuild| carfile.car]

Functions
 * -?:Display help information
 * -v:Display detailed compile information during compile time
 * all:Compile all the files in the current directory and sub-directories recursively
 * clean:Delete the images of current directory which is generated in the mirror directory.
 * clobber:Delete the whole mirror directory and the target directory over all the current development environment.
 * rebuild:Equivalent to the combination of emake clean and emake.
 * .car:Create a set of code skeletons of a CAR component from a CAR definition file(*.car)

emake compilation process

If there exists a dirs file in current directory, emake will compile all the directories recursively and sequencely that are listed in the dirs. And then, if there exists a sources file in current directory, emake will compile the project files according to the sources file. After finish the works assigned in the sources file, if there exists a makefile.inc file, emake will deal the works assigned in the makefile.inc file. Once meet any mistakes, emake will stop compiling and display error informations.

About the introduction of dirs, sources, makefile inc. Please refer to the the relevant documents.