Sync with 5.3.0
[deliverable/titan.core.git] / compiler2 / ttcn3 / Makefile
CommitLineData
970ed795
EL
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
9
10TOP := ../..
11include $(TOP)/Makefile.cfg
12
13ifeq ($(findstring g++, $(CXX)), g++)
14 CXXFLAGS += -fno-exceptions
15endif
16
17ifdef OPENSSL_DIR
18ifneq ($(OPENSSL_DIR), default)
19 CPPFLAGS += -I$(OPENSSL_DIR)/include
20endif
21endif
22
23CPPFLAGS += -I$(SRC_TOP)
24
25TARGETS := libttcn3_compiler.a
26
27ORIGINATORS := charstring_la.l coding_attrib_la.l coding_attrib_p.y \
28compiler.l compiler.y comptype_attrib_la.l pstring_la.l \
29rawAST.l rawAST.y ttcn3_preparser.l
30
31GENERATED_SOURCES := lex.ttcn3.cc compiler.tab.cc lex.rawAST.cc rawAST.tab.cc \
32charstring_la.cc pstring_la.cc comptype_attrib_la.cc coding_attrib_la.cc \
33coding_attrib_p.cc ttcn3_preparser.lex.c
34
35GENERATED_HEADERS := compiler.tab.hh rawAST.tab.hh coding_attrib_p.hh
36
37GENERATED_OTHERS := compiler.output rawAST.output coding_attrib_p.output lex.backup
38
39STATIC_SOURCES := ArrayDimensions.cc AST_ttcn3.cc Attributes.cc ILT.cc PatternString.cc \
40RawAST.cc Statement.cc TtcnTemplate.cc Templatestuff.cc TextAST.cc Ttcnstuff.cc \
a38c6d4c 41compiler.c port.c signature.c BerAST.cc JsonAST.cc Ttcn2Json.cc profiler.c
970ed795
EL
42
43SOURCES := $(STATIC_SOURCES) $(GENERATED_SOURCES)
44
45COMMON_OBJECTS := $(addprefix ../../common/, JSON_Tokenizer.o)
46
47OBJECTS := $(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(SOURCES))) $(COMMON_OBJECTS)
48
49DEPFILES := $(patsubst %.cc,%.d,$(patsubst %.c,%.d,$(SOURCES)))
50
51SUBDIRS :=
52
53all run: $(TARGETS)
54
55libttcn3_compiler.a: $(OBJECTS)
56 $(AR) -r $@ $?
57
58%_la.cc: %_la.l
59 $(FLEX) $(FLEXFLAGS) -o$@ $<
60
61%_p.cc %_p.hh: %_p.y
62 $(BISON) $(BISONFLAGS) $<
63
64compiler.tab.cc compiler.tab.hh: compiler.y
65 $(BISON) $(BISONFLAGS) -p ttcn3_ -o compiler.tab.cc $<
66
67rawAST.tab.cc rawAST.tab.hh: rawAST.y
68 $(BISON) $(BISONFLAGS) -p rawAST_ -o rawAST.tab.cc $<
69
70lex.ttcn3.cc: compiler.l
71 $(FLEX) $(FLEXFLAGS) -Pttcn3_ -o$@ $<
72
73lex.rawAST.cc: rawAST.l
74 $(FLEX) $(FLEXFLAGS) -PrawAST_ -o$@ $<
75
76ttcn3_preparser.lex.c: ttcn3_preparser.l
77 $(FLEX) $(FLEXFLAGS) -Pttcn3_preparser_ -o$@ $<
78
79include ../../Makefile.genrules
80
81# pre-seed dependencies
82lex.ttcn3.d: compiler.tab.hh
This page took 0.025632 seconds and 5 git commands to generate.