1 ##############################################################################
2 # Copyright (c) 2000-2016 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
18 # Szabo, Janos Zoltan – initial implementation
21 # Zalanyi, Balazs Andor
23 ##############################################################################
24 # Makefile for the TTCN-3 part of the compiler
27 include $(TOP
)/Makefile.cfg
29 ifeq ($(findstring g
++, $(CXX
)), g
++)
30 CXXFLAGS
+= -fno-exceptions
34 ifneq ($(OPENSSL_DIR
), default
)
35 CPPFLAGS
+= -I
$(OPENSSL_DIR
)/include
39 CPPFLAGS
+= -I
$(SRC_TOP
)
41 TARGETS
:= libttcn3_compiler.a
43 ORIGINATORS
:= charstring_la.l coding_attrib_la.l coding_attrib_p.y \
44 compiler.l compiler.y comptype_attrib_la.l pstring_la.l \
45 rawAST.l rawAST.y ttcn3_preparser.l
47 GENERATED_SOURCES
:= lex.ttcn3.
cc compiler.tab.
cc lex.rawAST.
cc rawAST.tab.
cc \
48 charstring_la.
cc pstring_la.
cc comptype_attrib_la.
cc coding_attrib_la.
cc \
49 coding_attrib_p.
cc ttcn3_preparser.
lex.c
51 GENERATED_HEADERS
:= compiler.tab.hh rawAST.tab.hh coding_attrib_p.hh
53 GENERATED_OTHERS
:= compiler.output rawAST.output coding_attrib_p.output
lex.backup
55 STATIC_SOURCES
:= ArrayDimensions.
cc AST_ttcn3.
cc Attributes.
cc ILT.
cc PatternString.
cc \
56 RawAST.
cc Statement.
cc TtcnTemplate.
cc Templatestuff.
cc TextAST.
cc Ttcnstuff.
cc \
57 compiler.c port.c signature.c BerAST.
cc JsonAST.
cc Ttcn2Json.
cc profiler.c
59 SOURCES
:= $(STATIC_SOURCES
) $(GENERATED_SOURCES
)
61 COMMON_OBJECTS
:= $(addprefix ..
/..
/common
/, JSON_Tokenizer.o
)
63 OBJECTS
:= $(patsubst %.
cc,%.o
,$(patsubst %.c
,%.o
,$(SOURCES
))) $(COMMON_OBJECTS
)
65 DEPFILES
:= $(patsubst %.
cc,%.d
,$(patsubst %.c
,%.d
,$(SOURCES
)))
71 libttcn3_compiler.a
: $(OBJECTS
)
75 $(FLEX
) $(FLEXFLAGS
) -o
$@
$<
78 $(BISON
) $(BISONFLAGS
) $<
80 compiler.tab.
cc compiler.tab.hh
: compiler.y
81 $(BISON
) $(BISONFLAGS
) -p ttcn3_
-o compiler.tab.
cc $<
83 rawAST.tab.
cc rawAST.tab.hh
: rawAST.y
84 $(BISON
) $(BISONFLAGS
) -p rawAST_
-o rawAST.tab.
cc $<
86 lex.ttcn3.
cc: compiler.l
87 $(FLEX
) $(FLEXFLAGS
) -Pttcn3_
-o
$@
$<
89 lex.rawAST.
cc: rawAST.l
90 $(FLEX
) $(FLEXFLAGS
) -PrawAST_
-o
$@
$<
92 ttcn3_preparser.
lex.c
: ttcn3_preparser.l
93 $(FLEX
) $(FLEXFLAGS
) -Pttcn3_preparser_
-o
$@
$<
95 include ..
/..
/Makefile.genrules
97 # pre-seed dependencies
98 lex.ttcn3.d
: compiler.tab.hh