File: INSTALL

package info (click to toggle)
ttcn3parser 20011019-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,720 kB
  • ctags: 3,392
  • sloc: cpp: 49,144; makefile: 115; sh: 5
file content (123 lines) | stat: -rw-r--r-- 3,663 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/*
 *           TTCN-3 Parser
 *
 *        Installation Guide
 *
 * Copyright (C) 2001 Institute for Telematics
 *
 *    Michael Schmitt <schmitt@itm.mu-luebeck.de>
 *    Roman Koch <rkoch@itm.mu-luebeck.de>
 *
 *    Medical University of Luebeck,
 *    Ratzeburger Allee 160,
 *    23538 Luebeck,
 *    Germany
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * $Id: INSTALL,v 1.8 2001/06/02 20:02:32 schmitt Exp $
 *
 */

Welcome to the TTCN-3 parser!

This file describes how to compile the TTCN-3 parser source code.
If the description below is faulty or lacks some information, please
send a short email to 'schmitt@itm.mu-luebeck.de'.

Good luck!

Michael Schmitt, Roman Koch

********************************************************************

What you need to compile the TTCN-3 parser source code:

  - ANTLR 2.7.1 or higher (download for free at www.antlr.org)
  - An ANSI C++ compiler (e.g., gcc 2.95.2, or Sun CC 5.0/5.1)
  - A 'Make' tool (e.g., GNU make)
  - The TTCN-3 parser source code (of course :-))

Preparation for ANTLR:

  - Install ANTLR in a directory of your choice,
    e.g. '/home/user/programs/antlr'

  - Set the Java 'CLASSPATH' to the ANTLR directory.

    In a C shell (csh/tcsh) on UN*X, you have to enter

      setenv CLASSPATH ${CLASSPATH}:/home/user/programs/antlr

    In a Bourne shell (sh/bash), the following commands must be used:

      CLASSPATH=${CLASSPATH}:/home/user/programs/antlr
      export CLASSPATH

  - Set the environment variables CXX and CXXFLAGS according to your
    preferred C++ compiler and its options.

    In a C shell (csh/tcsh), you may select Sun CC as follows:

      setenv CXX CC
      setenv CXXFLAGS "-O +p +w2"

    Alternatively, gcc 2.95.2 can be chosen in a Bourne shell by

      CXX=g++; export CXX
      CXXFLAGS="-O -ansi -pedantic -Wall"; export CXXFLAGS

  - Enter directory '/home/user/programs/antlr/lib/cpp/src' and compile
    all '*.cpp' files (create a '.o' file for each of them)

    Typically, you invoke your compiler like follows:

      ${CXX} ${CXXFLAGS} -c -I.. -I. *.cpp

  - Link all generated '.o' files, i.e. create one big library file.

    When using Sun's CC, you have to invoke

      CC -xar -o libantlr.a *.o

    Object files generated by gcc can be linked with ar:

      ar -r libantlr.a *.o

  - For convenience, move 'libantlr.a' to subdirectory
    '/home/user/programs/antlr/lib/cpp/antlr'


Compilation of the TTCN-3 parser:

  - Download the latest source files from the CVS repository and put
    them all in one working directory

  - Make a subdirectory in the working directory which is identical
    to '/home/user/programs/antlr/lib/cpp/antlr'.

    There are two possibilities: Either copy the directory or (preferably)
    make a symbolic link to it:

      ln -s /home/user/programs/antlr/lib/cpp/antlr .

  - Apply the 'Makefile' provided with the TTCN-3 parser by running

      make TTCN3Parser

  - Start the TTCN-3 parser with

      ./TTCN3Parser --help