|
|
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:
- In terminal window, go to your home directory (
cd)
- Open with texteditor file
.cshrc.personal
- 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'
- 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
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.
- Click the right mouse button over icon "Verkkoympäristö"
- Select "Yhdistä verkkoasemaan"
- 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"
- Open "Käynnistä" menu
- Select "Asetukset", "Ohjauspaneeli", and "Järjestelmä"
- Select "Lisäasetukset" and "Ympäristömuuttujat"
- To the upper list, create a new environment variable ("Uusi")
PET_DRV P:
(where "P:" is the network drive letter specified previously)
- From the upper list, select
PATH and click "Muokkaa", or if PATH does
not exist, then create it ("Uusi").
- 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.
- 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
- 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.
|
|