File: Makefile

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 (130 lines) | stat: -rw-r--r-- 3,692 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
124
125
126
127
128
129
130
#
#       TTCN-3 Parser
#
#         Makefile
#
# 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: Makefile,v 1.25 2001/08/05 16:40:02 schmitt Exp $
#

ifeq ($(OSTYPE),solaris)
CXX=CC
CPPFLAGS=-I.
CXXFLAGS=-g +p +w2
ifndef LIBANTLR
LIBANTLR=antlr/libantlr.a
endif
LDFLAGS=-Bstatic
else
CXX=g++
CPPFLAGS=-I.
CXXFLAGS=-g -Wall -ansi -pedantic
ifndef LIBANTLR
LIBANTLR=antlr/libantlr-g++-cygwin.a
endif
LDFLAGS=
endif

objects	 = InfoAST.o EnvAST.o ScopeAST.o TTCNMain.o TTCNLexer.o TTCNParser.o TTCNSymbolParser.o TTCNTreeParser.o


# Eliminate implicit rules

.SUFFIXES :


# Link TTCN-3 Parser

TTCN3Parser : $(objects) $(LIBANTLR)
	$(CXX) -o TTCN3Parser $(objects) $(LIBANTLR) $(LDFLAGS)

TTCN3Parser.purify : $(objects) $(LIBANTLR)
	purify $(CXX) -o TTCN3Parser.purify $(objects) $(LIBANTLR) $(LDFLAGS)


# Compile .cpp files

%.o : %.cpp
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<


# Compile ANTLR grammar files

LexerFiles        = TTCNLexer.cpp TTCNLexer.hpp \
										TTCNLexerTokenTypes.hpp TTCNLexerTokenTypes.txt
ParserFiles       = TTCNParser.cpp TTCNParser.hpp \
										TTCNParserTokenTypes.hpp TTCNParserTokenTypes.txt
SymbolParserFiles = TTCNSymbolParser.cpp TTCNSymbolParser.hpp \
										TTCNSymbolParserTokenTypes.hpp TTCNSymbolParserTokenTypes.txt
TreeParserFiles   = TTCNTreeParser.cpp TTCNTreeParser.hpp \
										TTCNTreeParserTokenTypes.hpp TTCNTreeParserTokenTypes.txt

$(LexerFiles) : .lexer_made

.lexer_made : TTCNLexer.g Makefile
	java antlr.Tool $<
	touch .lexer_made

$(ParserFiles) : .parser_made

.parser_made : TTCNParser.g TTCNLexerTokenTypes.txt Makefile
	java antlr.Tool $<
	touch .parser_made

$(SymbolParserFiles) : .symbolparser_made

.symbolparser_made : TTCNSymbolParser.g TTCNParserTokenTypes.txt Makefile
	java antlr.Tool $<
	touch .symbolparser_made

$(TreeParserFiles) : .treeparser_made

.treeparser_made : TTCNTreeParser.g TTCNParserTokenTypes.txt Makefile
	java antlr.Tool $<
	touch .treeparser_made


# General file dependencies

*.o              : $(LIBANTLR) Makefile InfoAST.hpp EnvAST.hpp ScopeAST.hpp
TTCNMain.o       : TTCNLexer.hpp TTCNParser.hpp TTCNTreeParser.hpp
TTCNTreeParser.o : TTCNSymbolParser.hpp

# Maintainance

.PHONY : clean webupdate

clean :
	- rm -f TTCN3Parser TTCN3Parser.purify test_parser.log $(objects) \
          $(LexerFiles) $(ParserFiles) $(SymbolParserFiles) $(TreeParserFiles)\
	        .lexer_made .parser_made .symbolparser_made .treeparser_made *.tmp

webupdate :
	tar cvf sources.tar GPL.txt Makefile \
          InfoAST.hpp InfoAST.cpp EnvAST.hpp EnvAST.cpp ScopeAST.hpp ScopeAST.cpp \
          TTCNMain.cpp TTCNLexer.g TTCNParser.g TTCNSymbolParser.g TTCNTreeParser.g INSTALL README
	gzip -9 sources.tar
	mv sources.tar.gz /usr/local/apache/htdocs/english/research/specification/ttcn3parser/.