How to build custom components
You may build custom components in a manner that fits you best. Or you can use Ubix Makefile materials provided by COREmanager. The files are located in the src directory.
If you want to build programs using our libraries, you will need a compiler supporting c++0x. You should use gcc 4.4. or later, and GNU make to be able to use our makefile.
To use our makefile, create a new directory in the src directory. A directory name should match the name of the control panel that you are developing, for correct upload. For example mypanel. Create the Makefile file with the following contents in that directory:
LIB += mypanel mypanel_SOURCES = mypanel.cpp mypanel_LDADD = -lbase #mypanel_LDADD = -rdynamic #WRAPPER += some_command_line_tool #XMLLIST += some_xml #XMLPATH = my_xml_path include ../isp.mk
LIBa list of .so files to be built.SBINa list of application started from the command line that you need to set up.WRAPPERthe same as SBIN - a list of application started from the command line that you need to set upIn COREmanager all the console applications are represented as .so files located in the libexec directory. They are started by the sbin/wrapper program. All binary files in the sbin directory are links to the wrapper file.XMLPATHthe directoy where standard XML files are located. They are
You can provide the following parameters for every name, which was added to one of the above variables:
mypanel_SOURCESdescription of sources for libraries (the list of .cpp files)mypanel_LDADDdescription of additional linker parameters include ../isp.mkconnect the templates provided by COREmanager for Makefile. Make sure this record exists and stands at the very end.
XMLLISTthe list of additional XML files with metadata describing the interface of your control panel. XMLPATH doesn't affect these files. The list may contain file templates, where '*' is any number of arbitrary symbols.SUBDIRthe directory with source code files. Also, the directory contains the Makefile.inc file, which contents will be automatically connected to the main Makefile.
To build our library mypanel.so, you only need to execute gmake in the src/mypanel directory. Or in the src directory, in this case, the projects from all the directories inside src will be set up. в этом случае будут собраны проекты из всех каталогов внутри .
To install the panel, go to the directory with the source code ([mgr5_DIR]/src/mypanel) and execute the make install command. The mypanel.so library will be copied into the lib directory.
For WRAPPER applications, the file will be copied into the libexec directory, and the corresponding link to wrapper will be made in sbin.
The corresponding control panel will be automatically restarted.
To delete all the files, you may execute gmake clean
This command wont' delete the files that were created during setup.