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