Building the Wfdcfg library

After extracting the files from the Wfdcfg archive and modifying your source, you're ready to rebuild the Wfdcfg library.

Remember that the directory where you extracted the Wfdcfg archive is referred to as wfdcfg_working_dir.

Building from an existing stage area

If you've already configured a stage area, then:

  1. From the command line on your development host, go to the directory where you unzipped your Wfdcfg archive.
    cd wfdcfg_working_dir
                     
  2. Ensure your environment is clean.
    make clean
                     
  3. Use the make command to build.
    make hinstall install
                     

    Your stage directory should now be populated with the library that you've just built.

Building without an existing stage area

A stage area is a directory location that mimics the local installation path(s) that you would find under the QNX_TARGET variable of your development host. The stage area is built up based on the content from the tree when make hinstall (headers) or make install (binaries) is performed.

The stage area directory path is selected by setting the INSTALL_ROOT_nto makefile variable to the base path where your headers and libraries are to be installed. You also need to set the USE_INSTALL_ROOT macro. This macro tells the makefiles to search the INSTALL_ROOT_nto directory tree when the compiler and linker are seaching for headers and libraries. It is cumbersome to set these values each time you perform an installation, so the build environment facilitates the setting of these variables through the use of a single override makefile that is specified using the QCONF_OVERRIDE environment variable.

You can use the stage-sh script that is included in the Wfdcfg archive to create a stage area for you.

  1. From the command line, go to your the directory where you unzipped your Wfdcfg archive.
    cd wfdcfg_working_dir
                     
  2. Run the provided script to create a stage area for building your source.
    stage-sh
                     
  3. From within the shell created by stage-sh, ensure your environment is clean.
    make clean
                     
  4. From within the shell created by stage-sh, use the make command to build.
    make hinstall install
                     

    The stage directory that was created by running the stage-sh script should now be populated with the library that you've just built.

For more information on building OS source, refer to Building Embedded Systems, or to our community forums from our website, www.qnx.com.