1 ###############################################################################
2 # Copyright (c) 2000-2014 Ericsson Telecom AB
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Eclipse Public License v1.0
5 # which accompanies this distribution, and is available at
6 # http://www.eclipse.org/legal/epl-v10.html
7 ###############################################################################
8 # Makefile for the TTCN-3 part of the compiler
11 include $(TOP
)/Makefile.cfg
13 ifeq ($(findstring g
++, $(CXX
)), g
++)
14 CXXFLAGS
+= -fno-exceptions
18 ifneq ($(OPENSSL_DIR
), default
)
19 CPPFLAGS
+= -I
$(OPENSSL_DIR
)/include
23 CPPFLAGS
+= -I
$(SRC_TOP
)
25 TARGETS
:= libttcn3_compiler.a
27 ORIGINATORS
:= charstring_la.l coding_attrib_la.l coding_attrib_p.y \
28 compiler.l compiler.y comptype_attrib_la.l pstring_la.l \
29 rawAST.l rawAST.y ttcn3_preparser.l
31 GENERATED_SOURCES
:= lex.ttcn3.
cc compiler.tab.
cc lex.rawAST.
cc rawAST.tab.
cc \
32 charstring_la.
cc pstring_la.
cc comptype_attrib_la.
cc coding_attrib_la.
cc \
33 coding_attrib_p.
cc ttcn3_preparser.
lex.c
35 GENERATED_HEADERS
:= compiler.tab.hh rawAST.tab.hh coding_attrib_p.hh
37 GENERATED_OTHERS
:= compiler.output rawAST.output coding_attrib_p.output
lex.backup
39 STATIC_SOURCES
:= ArrayDimensions.
cc AST_ttcn3.
cc Attributes.
cc ILT.
cc PatternString.
cc \
40 RawAST.
cc Statement.
cc TtcnTemplate.
cc Templatestuff.
cc TextAST.
cc Ttcnstuff.
cc \
41 compiler.c port.c signature.c BerAST.
cc JsonAST.
cc Ttcn2Json.
cc profiler.c
43 SOURCES
:= $(STATIC_SOURCES
) $(GENERATED_SOURCES
)
45 COMMON_OBJECTS
:= $(addprefix ..
/..
/common
/, JSON_Tokenizer.o
)
47 OBJECTS
:= $(patsubst %.
cc,%.o
,$(patsubst %.c
,%.o
,$(SOURCES
))) $(COMMON_OBJECTS
)
49 DEPFILES
:= $(patsubst %.
cc,%.d
,$(patsubst %.c
,%.d
,$(SOURCES
)))
55 libttcn3_compiler.a
: $(OBJECTS
)
59 $(FLEX
) $(FLEXFLAGS
) -o
$@
$<
62 $(BISON
) $(BISONFLAGS
) $<
64 compiler.tab.
cc compiler.tab.hh
: compiler.y
65 $(BISON
) $(BISONFLAGS
) -p ttcn3_
-o compiler.tab.
cc $<
67 rawAST.tab.
cc rawAST.tab.hh
: rawAST.y
68 $(BISON
) $(BISONFLAGS
) -p rawAST_
-o rawAST.tab.
cc $<
70 lex.ttcn3.
cc: compiler.l
71 $(FLEX
) $(FLEXFLAGS
) -Pttcn3_
-o
$@
$<
73 lex.rawAST.
cc: rawAST.l
74 $(FLEX
) $(FLEXFLAGS
) -PrawAST_
-o
$@
$<
76 ttcn3_preparser.
lex.c
: ttcn3_preparser.l
77 $(FLEX
) $(FLEXFLAGS
) -Pttcn3_preparser_
-o
$@
$<
79 include ..
/..
/Makefile.genrules
81 # pre-seed dependencies
82 lex.ttcn3.d
: compiler.tab.hh