Use LTTngUSTLogger logger plugin in logtest regression test
[deliverable/titan.core.git] / regression_test / Makefile.regression
CommitLineData
d44e3c4f 1##############################################################################
2# Copyright (c) 2000-2016 Ericsson Telecom AB
970ed795
EL
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
d44e3c4f 7#
8# Contributors:
9#
10# >
11# Balasko, Jeno
12# Beres, Szabolcs
13# Delic, Adam
14# Kovacs, Ferenc
15# Ormandi, Matyas
16# Raduly, Csaba
17# Szabados, Kristof
14e21cff 18# Szabo, Bence Janos
d44e3c4f 19#
20##############################################################################
970ed795
EL
21#
22# Common settings for all regression tests (formerly passed through
23# the environment).
24#
25# Warning! This makefile is included at the beginning of other makefiles.
26# Do not put any targets here (they would override the default target).
27#
28
29ifndef TOPDIR
30$(error Please define TOPDIR in the including makefile)
31endif
32
33# hardcode a path for Jenkinks to workaround XML/XmlWorkflow/bin/prj2mk.pl
34ifneq ($(origin TTCN3_DIR), file)
35# The directory that the Test Executor is installed in:
36TTCN3_DIR := $(shell cd $(TOPDIR)/..; pwd)/Install
37export TTCN3_DIR
38# The following would be nicer, but abspath requires make 3.81 (rhea has only 3.79.1)
39#TTCN3_DIR := $(abspath $(TOPDIR)/../Install)
40endif
41
42# Command for compiling TTCN-3 and ASN.1 modules
43TTCN3_COMPILER := $(TTCN3_DIR)/bin/compiler
44
45# Many tests ignore COMPILER_FLAGS. Append any common options to the compiler name.
46TTCN3_COMPILER += -g -L
47
48# Use the alternative runtime when running the tests
49#RT2 := true
50
51# Use code splitting when running the tests
14e21cff 52# DO NOT enable both CODE_SPLIT and SPLIT_TO_SLICES
970ed795 53#CODE_SPLIT := true
14e21cff 54# Use code splitting into slices when running the tests
55#SPLIT_TO_SLICES := 30
970ed795
EL
56
57ifdef RT2
58# add command line option to generate code for alternative runtime
59RT2_FLAG := -R
60TTCN3_COMPILER += $(RT2_FLAG)
61RT2_SUFFIX := -rt2
62endif
63
64ifdef DYN
65DYNAMIC_SUFFIX = -dynamic
66ifeq ($(PLATFORM), WIN32)
1076e2d0 67 export PATH+=:$(TTCN3_DIR)/lib:
970ed795 68else
1076e2d0 69 export LD_LIBRARY_PATH+=:$(TTCN3_DIR)/lib:
970ed795
EL
70endif
71endif
72
73ifdef CODE_SPLIT
74SPLIT_FLAG = -Utype
75# No space between -U and type !
76TTCN3_COMPILER += $(SPLIT_FLAG)
14e21cff 77export SPLIT_FLAG
78else ifdef SPLIT_TO_SLICES
79SPLIT_FLAG := -U$(SPLIT_TO_SLICES)
80TTCN3_COMPILER += $(SPLIT_FLAG)
81SPLIT_TO_SLICES := $(shell echo $(SPLIT_TO_SLICES) - 1 | bc)
82SPLIT_TO_SLICES := $(shell seq 1 ${SPLIT_TO_SLICES})
83export SPLIT_FLAG
970ed795
EL
84endif
85
86# Your platform. Allowed values: SOLARIS, SOLARIS8, LINUX, FREEBSD, WIN32
87ifndef PLATFORM
88PLATFORM1 := $(shell uname -s)
89PLATFORM2 := $(shell uname -r)
90PLATFORM3 := $(shell uname -m)
91
92ifeq ($(PLATFORM1), SunOS)
93 ifeq ($(PLATFORM2), 5.6)
94 PLATFORM := SOLARIS
95 else
96 PLATFORM := SOLARIS8
97 endif # 5.6
98endif # SunOS
99ifeq ($(PLATFORM1), Linux)
100 PLATFORM := LINUX
101endif # Linux
102ifeq ($(PLATFORM1), FreeBSD)
103 PLATFORM := FREEBSD
104endif # FreeBSD
105ifeq ($(findstring CYGWIN, $(PLATFORM1)), CYGWIN)
106 PLATFORM := WIN32
107endif # CYGWIN
108ifeq ($(PLATFORM1), Interix)
109 PLATFORM := INTERIX
110endif # Interix
111endif # ifndef PLATFORM
112ifndef PLATFORM
113 PLEASE CHECK THE ABOVE PLATFORM SETTINGS!!!
114endif # ifndef PLATFORM
115
116# Flags for the C++ preprocessor (and makedepend):
117# This must be recursively expanded (CPPFLAGS=), not simply expanded (CPPFLAGS:=)
118CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)/include
119ifdef RT2
120CPPFLAGS += -DTITAN_RUNTIME_2
121endif
122
123# # # # Old naming and enum hack (uncomment to test) # # # #
124# TTCN3_COMPILER += -Nold -E
125# CPPFLAGS += -DOLD_NAMES
126
127
128# The C++ compiler used for building:
129CXX := g++
130CC = $(CXX)
131
132# Flags for the C++ compiler:
133CXXFLAGS = -Wall
134
135# Flags for the linker:
136LDFLAGS =
137
138ifeq ($(PLATFORM), WIN32)
139 EXESUFFIX := .exe
140 LDFLAGS += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc
141else
142 EXESUFFIX :=
143
144 ifdef MINGW
145 $(error MingW not supported on $(PLATFORM))
146 endif
147endif
148
149ifeq ($(PLATFORM3), x86_64)
150 CCFLAGS += -fPIC
151 CXXFLAGS += -fPIC
152 LDFLAGS += -fPIC
153endif
154
155ifeq ($(PLATFORM),INTERIX)
156# Pick up the right iconv
157CPPFLAGS += -I/usr/local/include
158endif
159
160# Path of OpenSSL installation:
161OPENSSL_DIR = /mnt/TTCN/Tools/openssl-0.9.8k
162
163LCOV_DIR := /mnt/TTCN/Tools/lcov-1.7/usr
164
165#LCOV=1
166
167ifdef LCOV
3abe9331 168 CPPFLAGS += -fprofile-arcs -ftest-coverage -g
970ed795
EL
169 CXXFLAGS += -fprofile-arcs -ftest-coverage -g
170 LDFLAGS += -fprofile-arcs -ftest-coverage -g -lgcov
171endif
172
173
174# Utility for finding patterns:
175ifeq ($(PLATFORM1), SunOS)
176 GREP := /usr/xpg4/bin/grep
177else
178 GREP := grep
179endif # SunOS
180export GREP
181
182# Suffix of executables
183ifeq ($(PLATFORM), WIN32)
184 EXESUFFIX := .exe
185else
186 EXESUFFIX :=
187endif # WIN32
188
f08ff9ca
BB
189SOLARIS_LIBS = -lxnet -L${XMLDIR}/lib -lxml2 -lresolv -lcurses
190SOLARIS8_LIBS = $(SOLARIS_LIBS) -lresolv -lcurses
191LINUX_LIBS = -L${XMLDIR}/lib -lxml2 -lpthread -lrt -lncurses
192FREEBSD_LIBS = -lncurses
193WIN32_LIBS = -L${XMLDIR}/lib -lxml2 -lncurses
194INTERIX_LIBS = -L${XMLDIR}/lib -lxml2 -liconv -lncurses
970ed795
EL
195
196
197#
198# Include local preferences
199#
200-include $(TOPDIR)/Makefile.personal
201
202ifeq (${XMLDIR}, default)
203CPPFLAGS += -I/usr/include/libxml2
204else
205CPPFLAGS += -I${XMLDIR}/include/libxml2
206endif
207
208
209
210# Quiet down a bit
211CXXFLAGS += -Wno-deprecated-declarations
212
213# At least ASN1/errorMessages needs ASN1_COMPILER in the environment
214export ASN1_COMPILER TTCN3_COMPILER
215
216print-%:
217 @echo $* = \"$($*)\" from $(origin $*)
218
219#
220# Define SRCDIR for OOBE. It should point to the original regression_test dir.
221#
222ifdef SRCDIR
223TOP_SRC := $(SRCDIR)
224
225# absolute path to "regression_test" in the build dir
226ABS_TOP := $(abspath $(TOPDIR))/
227
228# relative path from "regression_test" to current dir
229REL_DIR := $(subst $(ABS_TOP),,$(CURDIR))
230
231# absolute path to the equivalent of current dir
232ABS_SRC := $(SRCDIR)/$(REL_DIR)/
233
234vpath %.ttcnpp $(ABS_SRC)
235vpath %.inc $(ABS_SRC)
236vpath %.ttcn $(ABS_SRC)
237vpath %.asn $(ABS_SRC)
238vpath %.ttcnin $(ABS_TOP)/XML
239
240$(foreach src, $(USER_SOURCES), $(eval vpath $(src) $(ABS_SRC)))
241
242CPPFLAGS += -I. -I$(ABS_SRC)
243
244else
245TOP_SRC := $(TOPDIR)
246
247ABS_SRC := $(abspath .)
248ifeq "${ABS_SRC}" ""
249ABS_SRC :=$(shell pwd)
250endif
251
252endif
253
254export ABS_SRC
255
256vpath %.cfg $(ABS_SRC)
This page took 0.03307 seconds and 5 git commands to generate.