Skip to content

Create new compilation configuration

Damien Dosimont edited this page May 18, 2015 · 15 revisions

Create a new configuration

Right click on the project > Properties


C/C++ Build > Manage Configurations


New...


Fill the name and the description, by copying settings from an existing configuration.


The new configuration is now available. Click on OK.


Modify the compilation settings

Properties > C/C++Build > Settings

Select the configuration, and modify the compilation settings. Click on OK once it's done.

Compile

Select the compilation (arrow near the Build "hammer"). Click on the Build "hammer" to compile.

Compile using a terminal

Once these steps done, you can compile the project from the terminal. Don't forget to repeat the compilation procedure before each time you add classes or new files.

In the lpaggreg directory (replace configuration by the name of your new compilation configuration):

Compile

$cd configuration
$make

Clean

$cd configuration
$make clean

Easy make and installation

Modify the makefile

You'll have to edit the makefile contained at the root of lpaggreg, and add the rules to compile lpaggreg with your new configuration project. Define new rules following these schemas (replace configuration by the right name):

configuration:
    (cd configuration; make)

install-configuration: configuration
    ./install.sh configuration "${LIB}" "${INCLUDE}" ldconfig

Add these new rules in the .PHONY list. Add a new line in the clean: rule (replace .ext by the extension of the library that is generated).

clean:
    [...]
    (cd configuration; rm *.ext*; make clean)

Modify the installation script

Now, edit install.sh. You will have to take into account your new configuration. Note that if the name of this one contains static, shared, or bench, it will follow the existing corresponding rules for the installation.

To avoid any conflict, we advise you to use a new subdirectory to move the header .h files within during the installation, and not the default one (/usr/include/lpaggreg). For instance, the bench rule use its own location. Be careful: the exact location will be requested by the programs using your new version of the library. Remember to update this one in their include section. Be also careful with the prefix you give to your library (for instance, check the bench-linux configuration and rule that add the prefix bench to the lpaggreg library name). If you add a prefix following this way, don't forget to take this into consideration for the compilation settings of your programs using lpaggreg.