Reference: emetool
emetool [--help | -h]
emetool [--options] [--cflags | --cppflags] [--libs]
emetool --compile OBJECT SOURCE
emetool --link EXECUTABLE OBJECTS...
emetool --build EXECUTABLE SOURCES...
emetool --makefile EXECUTABLE SOURCES...
Description
This scripts is a tool to compile plugins for eme.
Options
emetool accepts the following options:
--help | -h Prints an help message.
--version Prints eme version.
--options Prints the options used when eme was compiled on the standard output.
--remake Remake eme with the same options. Must be called in the eme directory.
--cflags | --cppflags Prints the compilation flags for plugins on the standard output.
--ldflagsPrints the link flags for plugins on the standard output.
--libs Prints the libraries on the standard output.
--compile OBJECT SOURCE Compiles SOURCE file into OBJECT file. SOURCE must be a C or C++ file.
--link EXECUTABLE OBJECTS... Links OBJECTS files to create EXECUTABLE.
--build EXECUTABLE SOURCES... Compiles and links SOURCES to create EXECUTABLE. SOURCES files must be C or C++ files.
--makefile EXECUTABLE SOURCES... Prints a makefile for compiling SOURCES into EXECUTABLE on the standard output. SOURCES files must be C or C++ files, ending with: .c, .cc, .cpp or .C. The generated makefile has two targets: all (compiles SOURCES into EXECUTABLE) and clean (removes EXECUTABLE and object files).
Examples
If the plugin consists of two files called plugin.cc and other.cc that you want to compile into my_eme, use the following command:
$ emetool --build my_eme plugin.cc other.cc
With the --build option, the files are always re-compiled. You may want to use a makefile if you have several files. The following command creates a makefile to build plugin.cc and other.cc into my_eme:
$ emetool --makefile my_eme plugin.cc other.cc > Makefile
You can then re-build your executable with the command:
$ make -f Makefile
and you can remove the executable and the object files with the command:
$ make -f Makefile clean
If you need to re-compile eme itself, you can use (in the eme directory):
$ make `emetool --options`
It will re-compile eme with the previously used options.