Use LTTngUSTLogger logger plugin in logtest regression test
[deliverable/titan.core.git] / Makefile.cfg
CommitLineData
970ed795 1###############################################################################
d44e3c4f 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# Baji, Laszlo
11# Balasko, Jeno
12# Baranyi, Botond
13# Beres, Szabolcs
14# Delic, Adam
15# Feher, Csaba
16# Forstner, Matyas
17# Kovacs, Ferenc
18# Kremer, Peter
19# Lovassy, Arpad
20# Ormandi, Matyas
21# Pandi, Krisztian
22# Raduly, Csaba
23# Szabados, Kristof
24# Szabo, Janos Zoltan – initial implementation
25# Szalai, Endre
26# Zalanyi, Balazs Andor
27#
970ed795
EL
28###############################################################################
29ifndef TOP
30$(error please define TOP)
31endif
32
33# Configurations for the Free Open Source Software version, if available
34ifneq ($(wildcard $(TOP)/MakefileFOSS.cfg), )
35 include $(TOP)/MakefileFOSS.cfg
36else
37 # Set whether licensing is enabled: (yes or no)
38 LICENSING := yes
39
40 # Set whether to send usage statistics: (yes or no)
41 USAGE_STATS := yes
42endif
43
44# Define SRCDIR to the root of Titan sources to enable out-of-tree build
45#SRCDIR := ${HOME}/workspace/TTCNv3
46
47# Set these variables to fit your system:
48
49# The target directory where the Test Executor will be installed to:
50TTCN3_DIR := ${TOP}/Install
51
52# New installed files are run from make install, so they are added to the PATH
53PATH := ${PATH}:${TTCN3_DIR}/bin
54
55# Set it to 'yes' for developing or 'no' for release.
56DEBUG := no
57
58# Set it to 'yes' to generate coverage data (requires DEBUG=yes)
59COVERAGE := no
60
5ea46818
BB
61# Set it to 'yes' to enable extra features for the debugger UI in single mode
62# (this requires an extra library when linking the generated code).
63# Set it to 'no' to use a simplified debugger UI.
1cb5b229 64ADVANCED_DEBUGGER_UI := no
5ea46818 65
970ed795
EL
66# Your platform. Allowed values: SOLARIS, SOLARIS8, LINUX, FREEBSD,
67# WIN32. Decided automagically if not defined (recommended).
68# PLATFORM :=
69
70# Uncomment the following for "native" Win32
71#MINGW := -DMINGW -mno-cygwin
72
73# Utility for building lexical analyzers (tokenizers):
74FLEX := flex
75
76# Utility for building parsers:
77BISON := bison
78
79# The C compiler used for building:
80CC := gcc
81
82# The C++ compiler used for building:
83CXX := g++
84
85# generate userguide at install ('make release' always generates it)
86GEN_PDF := no
87
88# Set whether to build the CLI for MC: (yes or no)
89CLI := yes
90
91# set whether to build the JNI native library: (yes or no)
92JNI := yes
93
94# Path of the Java Developement Kit installation
95# (must be at least version 1.5.0_10)
19700695 96JDKDIR := /usr/lib/jvm/default-java
970ed795
EL
97
98# Path of OpenSSL installation: (always required)
99OPENSSL_DIR := default
100
101# Location of libxml2
102XMLDIR := default
103
970ed795
EL
104# Flags for the C(++) preprocessor:
105# Prevent a warning about yyinput being defined but not used
20c9b1d8 106CPPFLAGS += -DYY_NO_INPUT
970ed795
EL
107
108# Flags shared between C and C++
109COMPILERFLAGS := -Wall
110
111# 'Hardcore' settings
112# Unlikely to work for GCC below 4.x
113#COMPILERFLAGS += -Werror -pedantic -W -Wno-unused-parameter -O1
114
115# Flags for the C compiler.
116# std=gnu9x shuts up warnings about long long and variadic macros
20c9b1d8 117CCFLAGS += $(COMPILERFLAGS) -std=gnu9x
3abe9331 118
119# Flags for the C++ compiler:
20c9b1d8 120CXXFLAGS += $(COMPILERFLAGS) -Wno-long-long
3abe9331 121
122# The command for maintaining static libraries:
123AR := ar
124
125# The command for building the shared libraries:
126# It shall be set to either "$(CXX) -G" or "$(CXX) -shared" depending
127# on the linker you use.
128LD = $(CXX) -shared
129
130# Flags for linking binary executables (e.g. for profiling):
20c9b1d8 131LDFLAGS += $(MINGW)
3abe9331 132
133# The command for removing symbol table from the executables:
134STRIP := strip
135
136# Flags for flex:
137FLEXFLAGS := -B -s -Cr
138
139# Flags for bison:
140BISONFLAGS := -d
141
142# Override common settings with personal preferences if needed
143-include $(TOP)/Makefile.personal
144
145## ## ## ## ## Variables below are automatically set ## ## ## ## ##
146
147ifeq ($(DEBUG), yes)
148 CPPFLAGS += -DMEMORY_DEBUG -DFATAL_DEBUG
149else
150 CPPFLAGS += -DNDEBUG
151endif
152
153# MingW flags need to be passed to the preprocessor during ctags configure
154CPPFLAGS += $(MINGW)
155
970ed795
EL
156ifeq ($(DEBUG), yes)
157 CCFLAGS += -g
158 CCFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align \
159 -Wstrict-prototypes
3abe9331 160else
161ifeq ($(COVERAGE), yes)
162 CCFLAGS += -O0
970ed795
EL
163else
164 CCFLAGS += -O2
165endif
3abe9331 166endif
970ed795
EL
167
168# Only the default Cygwin compiler can be used for Mingw.
169# Its version is 3.4.4, too low.
170ifndef MINGW
171# Only GCC 4.x understands -Wno-variadic-macros, comment out for lower versions
172#CXXFLAGS += -Wno-variadic-macros
173endif
174
175ifeq ($(DEBUG), yes)
176 CXXFLAGS += -g
177 CXXFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align
3abe9331 178else
179ifeq ($(COVERAGE), yes)
180 CXXFLAGS += -O0
970ed795
EL
181else
182 CXXFLAGS += -O2
183endif
3abe9331 184endif
970ed795
EL
185
186# Flags for the C/C++ compilers to generate dependency list (-M or -MM
187# for gcc or clang, -xM or -xM1 for Sun C compiler).
188
189ifneq ($(filter gcc% clang%, $(notdir $(CC))),)
190CCDEPFLAG := -MM
191CXXDEPFLAG := -MM
192else
193# Let's hope it's the Sun compiler
194CCDEPFLAG := -xM1
195CXXDEPFLAG := -xM1
196endif
197
970ed795
EL
198ifeq ($(DEBUG), yes)
199 LDFLAGS += -g
200endif
201
970ed795 202
970ed795
EL
203ifeq ($(DEBUG), yes)
204 FLEXFLAGS += -b -p
205# FLEXFLAGS += -d
206else
207# Comment out the line below if flex version 2.5.4[a] is used.
208# This version does not support optimized tables together with yylineno.
209 FLEXFLAGS += -Cfe
210endif
211
3abe9331 212
970ed795
EL
213ifeq ($(DEBUG), yes)
214 BISONFLAGS += -t -v
215endif
216
217ifeq ($(COVERAGE), yes)
970ed795
EL
218 CPPFLAGS += -DCOVERAGE_BUILD
219 COMPILERFLAGS += -fprofile-arcs -ftest-coverage
220 LDFLAGS += -fprofile-arcs -ftest-coverage -lgcov
221endif
970ed795 222
5ea46818
BB
223ifeq ($(ADVANCED_DEBUGGER_UI), yes)
224 CPPFLAGS += -DADVANCED_DEBUGGER_UI
225endif
226
970ed795
EL
227# Directory which contains the code for POSIX regular expression handling.
228# It is needed on platforms where the system's libc does not support POSIX
229# regexps. This is the case for Mingw.
230ifdef MINGW
231# If your platform isn't Mingw but lacks POSIX regular expressions,
232# comment out the ifdef/endif
233REGEX_DIR := /mnt/TTCN/Tools/CPP/regex-glibc-2.5.1
234endif
235
236# Warning! Never set the above directories to /usr.
237# If your OpenSSL, Qt is installed under /usr you'd better set
238# these variables to a fake (non-existent) directory. If this is the case,
239# gcc will find the required headers and libs anyway, but -I/usr/include
240# might confuse it.
241
242# This is especially true on Windows with Mingw installed as a Cygwin package.
243# -mno-cygwin alters the include serach path to find the Mingw headers.
244# Passing -I/usr/include would cause the Mingw compiler to read the Cygwin
245# headers, and the compilation will fail.
246
247# The path name where the LaTeX binaries can be found. (optional)
248# If this variable is not defined the User Documentation will not be built
249# or installed.
250TEXPATH := /usr/local/teTeX2.0.2/bin/sparc-sun-solaris2.8
251
970ed795
EL
252
253###########################################################################
254# You don't have to alter anything below this line.
255
256# Setting PLATFORM automagically if it is not defined.
257ifndef PLATFORM
258PLATFORM1 := $(shell uname -s)
259PLATFORM2 := $(shell uname -r)
260PLATFORM3 := $(shell uname -m)
261ifeq ($(PLATFORM1), SunOS)
262 ifneq ($(PLATFORM2), 5.6)
263 PLATFORM := SOLARIS8
264 PLATSUFFIX = -sol8
265 else
266 PLATFORM := SOLARIS
267 PLATSUFFIX = -sol6
268 endif # 5.8
269endif # SunOS
270ifeq ($(PLATFORM1), Linux)
271 PLATFORM := LINUX
272 PLATSUFFIX = -linux
273endif # Linux
274ifeq ($(PLATFORM1), FreeBSD)
275 PLATFORM := FREEBSD
276endif # FreeBSD
277ifeq ($(findstring CYGWIN, $(PLATFORM1)), CYGWIN)
278 PLATFORM := WIN32
279 PLATSUFFIX = -cygwin
280endif # CYGWIN
281endif # ifndef PLATFORM
282ifndef PLATFORM
283 PLATFORM := $(error PLEASE CHECK THE PLATFORM SETTINGS)
284endif # ifndef PLATFORM
285
286# Derived variables, which you should never change.
287
288ifdef MINGW
289
290# Target directory for binaries:
291BINDIR := $(TTCN3_DIR)/programs
292# Target directory for manual pages:
293MANDIR := $(TTCN3_DIR)/manuals
294# Target directory for other files (nedit/xemacs additions, etc.)
295ETCDIR := $(TTCN3_DIR)
296
297else
298
299# Target directory for binaries:
300BINDIR := $(TTCN3_DIR)/bin
301# Target directory for manual pages:
302MANDIR := $(TTCN3_DIR)/man
303# Target directory for other files (nedit/xemacs additions, etc.)
304ETCDIR := $(TTCN3_DIR)/etc
305
306endif
307
308# Target directory for header files:
309INCDIR := $(TTCN3_DIR)/include
310# Target directory for libraries:
311LIBDIR := $(TTCN3_DIR)/lib
312# Target directory for html help pages:
313HELPDIR := $(TTCN3_DIR)/help
314# Target directory for the documentation:
315DOCDIR := $(TTCN3_DIR)/doc
316# Target directory for the demo "Hello World!"
317DEMODIR := $(TTCN3_DIR)/demo
318
319CPPFLAGS += -D$(PLATFORM)
320
321ifeq ($(LICENSING), yes)
322 CPPFLAGS += -DLICENSE
323 LICENSE_LIBS = -L$(OPENSSL_DIR)/lib -lcrypto
324else
325 LICENSE_LIBS :=
326endif
327
328ifeq ($(USAGE_STATS), yes)
329 CPPFLAGS += -DUSAGE_STATS
330endif
331
332# Windows/Cygwin specific settings
333ifeq ($(PLATFORM), WIN32)
334 EXESUFFIX := .exe
335 LDFLAGS += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc
336
337 ifdef MINGW
338 MINGW_LIBS := -lgdi32
339 endif
340else
341 EXESUFFIX :=
342
343 ifdef MINGW
344 $(error MingW not supported on $(PLATFORM))
345 endif
346
347 CCFLAGS += -fPIC
348 CXXFLAGS += -fPIC
349 LDFLAGS += -fPIC
350endif
351
352# Try to use -isystem for Qt headers (this is a GCC feature).
353# This avoids the myriads of warnings issued for the Qt headers.
354ifneq (,$(findstring SOLARIS,$(PLATFORM)))
355# Avoid using it on Solaris, because
356# -isystem puts an implicit "extern C" around every system header,
357# which causes compilation of Qt headers to fail miserably :-(
358# (this could be fixed by recompiling GCC)
359 INCLUDEQT := -I
360else
361# Not Solaris
362 INCLUDEQT := -isystem
363endif
364
365# Setting EPOLL usage - It is Linux specific
366ifeq ($(PLATFORM), LINUX)
367 CPPFLAGS += -DUSE_EPOLL
368endif
369
370#not useful in compiler2/asn1, for example
371#REL_DIR := $(notdir $(CURDIR))
372
373export ABS_TOP := $(abspath $(TOP))/
374ifeq "$(ABS_TOP)" "/"
375# abspath only from GNU make 3.81, here's a replacement
376ABS_TOP := $(shell cd $(TOP); pwd)/
377endif
378
379ifdef SRCDIR
380
381REL_DIR := $(subst $(ABS_TOP),,$(CURDIR))
382
383ABS_SRC := $(SRCDIR)/$(REL_DIR)
384
385CPPFLAGS += -I. -I$(ABS_SRC)
386
387SRC_TOP := $(SRCDIR)
388
389else
390
391ABS_SRC := $(abspath $(CURDIR))
392ifeq "$(ABS_SRC)" ""
393ABS_SRC := $(shell cd $(CURDIR); pwd)
394endif
395
396SRC_TOP := $(TOP)
397
398endif
399
400
This page took 0.040121 seconds and 5 git commands to generate.