Software Development Environment

General

Contents

  1. Software Development in TUCH Network
    Helps you with the on-site directory structure, development tools and environment settings.
  2. Software Development Outside TUCH Network
    Provides (short) instructions for off-site usage.

Software Development in TUCH Network

Directories

Source code archives, compiled libraries and binaries for all supported platforms and the working directories are placed in common directory structure build below root directory petsoftware. The directory structure is illustrated in file directory_structure. Software developers having access to TUCH network should primarily use and update the resources in petsoftware directory structure.

Tools and Settings

SUN/Solaris (UNIX,Linux)

The GNU C compiler collection gcc 3.2.2, doxygen and various text editors (Emacs, pico, vi, etc.) are installed in the UNIX network at Turku PET Centre.

To compile the C libraries and programs, use make. To compile C source codes with make using special TPC targets, you should (once) make additions to your environment variables:

  1. In terminal window, go to your home directory (cd)
  2. Open with texteditor file .cshrc.personal
  3. Add the following lines:
    setenv LDFLAGS '-L. -L/pet-storage/petsoftware/lib/unix'
    setenv INCLUDE '-I. -I./include -I/pet-storage/petsoftware/lib/include'
    setenv PET_BIN '/pet-storage/petsoftware/bin/unix'
    setenv PET_LIB '/pet-storage/petsoftware/lib/unix'
    setenv PET_ARCHIVE '/pet-storage/petsoftware/archive'
    setenv PET_WWW_ARCHIVE '/pet-storage/petsoftware/www/programs'
  4. Save and close the file

These environment variables determine the behaviour of make:

  • LDFLAGS: where to look for libraries; first from the current dir then from the lib dir
  • INCLUDE: where to look for header files; first from the current dir then from the lib dir
  • PET_BIN: where to install binaries
  • PET_LIB: where to install libraries
  • PET_ARCHIVE: where to archive sources
  • PET_WWW_ARCHIVE: where to put WWW content; used by doxygen from Doxyfile
  • PC/Windows

    A GNU based C compiler MinGW, UNIX type utility collection MSYS, and doxygen are installed under directory petsoftware/bin/util. Path to the utility programs must be set in the PATH variable in Windows workstations. Do the following installation steps one time for each computer where the programs need to be compiled, or MinGW/MSYS are needed for other purposes.

    Notice! If there is another compiler configured on the workstation, such as DJGPP, one should remove all the environment variables related to that, prior configuring MinGW. This is done to avoid collisions between the compilers.

    Finnish Windows XP:

    If the network drive is automatically mapped (look for \\pet-storage\petsoftware, should be found in all desktops at TPC), skip "Yhdistä verkkoasemaan".

    If the network drive is automatically mapped and the environment variables are automatically set, skip the following steps, your system is ready to run.

    1. Click the right mouse button over icon "Verkkoympäristö"
    2. Select "Yhdistä verkkoasemaan"
    3. Enter the drive letter which to use for the petsoftware directory structure, e.g. P:, and the network path \\pet-storage\petsoftware and select "Valmis"
    4. Open "Käynnistä" menu
    5. Select "Asetukset", "Ohjauspaneeli", and "Järjestelmä"
    6. Select "Lisäasetukset" and "Ympäristömuuttujat"
    7. To the upper list, create a new environment variable ("Uusi")
      PET_DRV P:
      (where "P:" is the network drive letter specified previously)
    8. From the upper list, select PATH and click "Muokkaa", or if PATH does not exist, then create it ("Uusi").
    9. Add the string
      ;%PET_DRV%\bin\windows
      to the end of the list for TPC binaries, and add
      ;%PET_DRV%\bin\util\MinGW\bin;%PET_DRV%\bin\util\MSYS\bin;%PET_DRV%\bin\util\doxygen\bin
      to the list for utilities: MinGW, MSYS, and doxygen.
    10. If you will compile programs, add also the following environment variables:
      INCLUDE -I. -I./include -I%PET_DRV%/lib/include
      LDFLAGS -L. -L%PET_DRV%/lib/windows
      PET_BIN %PET_DRV%/bin/windows
      PET_LIB %PET_DRV%/lib/windows
      PET_ARCHIVE %PET_DRV%/archive
      PET_WWW_ARCHIVE %PET_DRV%/www/programs
    11. Click Ok two times
    See section SUN/Solaris for the meaning of the above environment variables.

    After these steps, you can open a new command prompt window by selecting "Käynnistä", "Ohjelmat", "Apuohjelmat" and "Komentorivi". You can then run MinGW, MSYS and doxygen programs in this window. You should now be able to compile the C libraries with make, but notice that C programs that use the libraries should be compiled with command make -e, which overwrites the possible INCLUDE and LDFLAGS settings in the Makefile.

    If you wish to use the MSYS terminal, add a shortcut on your desktop to file P:\bin\util\MSYS\msys.bat, where P: is the drive letter specified previously. Doubleclicking the shortcut opens a terminal which you can use like a UNIX/Linux terminal.

    Address questions about network problems, usernames etc to Rami Mikkola, and about analysis programs to Vesa Oikonen or Jarkko Johansson.


    Software Development Outside TUCH Network

    General

    Programs are free software and can be redistributed and/or modified under the terms of the GNU LESSER PUBLIC LICENSE (LGPL). More information on LGPL and open source.


    For TPC employees a VPN access to TUCH Network can be provided. Address questions about VPN connections to Rami Mikkola or Marko Tättäläinen.

    Source codes can be downloaded through the page Download Programs. It is recommended that the developer uses a similar directory stucture and settings as described for TUCH Network. That makes it easier to compile the programs and libraries as the Makefiles do not need changes.



    Last modified: Fri Dec 02 14:45:16 Normaaliaika 2005