Last sync 2016.04.01
[deliverable/titan.core.git] / compiler2 / ttcn3 / Makefile
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
7 #
8 # Contributors:
9 # Balasko, Jeno
10 # Baranyi, Botond
11 # Cserveni, Akos
12 # Delic, Adam
13 # Forstner, Matyas
14 # Kovacs, Ferenc
15 # Kremer, Peter
16 # Raduly, Csaba
17 # Szabados, Kristof
18 # Szabo, Janos Zoltan – initial implementation
19 # Szalai, Gabor
20 # Tatarka, Gabor
21 # Zalanyi, Balazs Andor
22 #
23 ##############################################################################
24 # Makefile for the TTCN-3 part of the compiler
25
26 TOP := ../..
27 include $(TOP)/Makefile.cfg
28
29 ifeq ($(findstring g++, $(CXX)), g++)
30 CXXFLAGS += -fno-exceptions
31 endif
32
33 ifdef OPENSSL_DIR
34 ifneq ($(OPENSSL_DIR), default)
35 CPPFLAGS += -I$(OPENSSL_DIR)/include
36 endif
37 endif
38
39 CPPFLAGS += -I$(SRC_TOP)
40
41 TARGETS := libttcn3_compiler.a
42
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
46
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
50
51 GENERATED_HEADERS := compiler.tab.hh rawAST.tab.hh coding_attrib_p.hh
52
53 GENERATED_OTHERS := compiler.output rawAST.output coding_attrib_p.output lex.backup
54
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
58
59 SOURCES := $(STATIC_SOURCES) $(GENERATED_SOURCES)
60
61 COMMON_OBJECTS := $(addprefix ../../common/, JSON_Tokenizer.o)
62
63 OBJECTS := $(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(SOURCES))) $(COMMON_OBJECTS)
64
65 DEPFILES := $(patsubst %.cc,%.d,$(patsubst %.c,%.d,$(SOURCES)))
66
67 SUBDIRS :=
68
69 all run: $(TARGETS)
70
71 libttcn3_compiler.a: $(OBJECTS)
72 $(AR) -r $@ $?
73
74 %_la.cc: %_la.l
75 $(FLEX) $(FLEXFLAGS) -o$@ $<
76
77 %_p.cc %_p.hh: %_p.y
78 $(BISON) $(BISONFLAGS) $<
79
80 compiler.tab.cc compiler.tab.hh: compiler.y
81 $(BISON) $(BISONFLAGS) -p ttcn3_ -o compiler.tab.cc $<
82
83 rawAST.tab.cc rawAST.tab.hh: rawAST.y
84 $(BISON) $(BISONFLAGS) -p rawAST_ -o rawAST.tab.cc $<
85
86 lex.ttcn3.cc: compiler.l
87 $(FLEX) $(FLEXFLAGS) -Pttcn3_ -o$@ $<
88
89 lex.rawAST.cc: rawAST.l
90 $(FLEX) $(FLEXFLAGS) -PrawAST_ -o$@ $<
91
92 ttcn3_preparser.lex.c: ttcn3_preparser.l
93 $(FLEX) $(FLEXFLAGS) -Pttcn3_preparser_ -o$@ $<
94
95 include ../../Makefile.genrules
96
97 # pre-seed dependencies
98 lex.ttcn3.d: compiler.tab.hh
This page took 0.055511 seconds and 5 git commands to generate.