implemented new code splitting mechanism (split to equal slices)
[deliverable/titan.core.git] / regression_test / transparent / Makefile
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# Baji, Laszlo
10# Balasko, Jeno
11# Raduly, Csaba
14e21cff 12# Szabo, Bence Janos
d44e3c4f 13#
14##############################################################################
970ed795
EL
15TOPDIR := ..
16include ../Makefile.regression
17
18# WARNING! This Makefile can be used with GNU make only.
19# Other versions of make may report syntax errors in it.
20
21#
22# Do NOT touch this line...
23#
24.PHONY: all archive check clean dep objects
25
26.SUFFIXES: .d
27
28#
29# Set these variables...
30#
31
32# Flags for the C++ preprocessor (and makedepend as well):
33#CPPFLAGS +=
34
35# Flags for dependency generation
36CXXDEPFLAGS = -MM
37
38# Flags for the C++ compiler:
39#CXXFLAGS +=
40
41# Flags for the linker:
42#LDFLAGS +=
43
44# Flags for the TTCN-3 and ASN.1 compiler:
45#COMPILER_FLAGS +=
46
47#
48# This test requires location info (when checking the generated log file).
49# Add -L to COMPILER_FLAGS, *unless* it's already present in COMPILER_FLAGS
50# or TTCN3_COMPILER: the compiler doesn't like it if a flag is set more than once.
51#
52ifeq ($(findstring L, $(COMPILER_FLAGS)),)
53ifeq ($(findstring -L, $(TTCN3_COMPILER)),)
54COMPILER_FLAGS += -L
55endif
56endif
57
58# Execution mode: (either ttcn3 or ttcn3-parallel)
59TTCN3_LIB = ttcn3$(RT2_SUFFIX)$(DYNAMIC_SUFFIX)
60
61#
62# You may change these variables. Add your files if necessary...
63#
64
65# TTCN-3 modules of this project:
66TTCN3_MODULES = transparent.ttcn
67
68# ASN.1 modules of this project:
69ASN1_MODULES =
70
71# C++ source & header files generated from the TTCN-3 & ASN.1 modules of
72# this project:
73GENERATED_SOURCES = $(TTCN3_MODULES:.ttcn=.cc) $(ASN1_MODULES:.asn=.cc)
74GENERATED_HEADERS = $(GENERATED_SOURCES:.cc=.hh)
14e21cff 75ifdef SPLIT_TO_SLICES
76POSTFIXES := $(foreach file, $(SPLIT_TO_SLICES), $(addsuffix $(file), _part_))
77POSTFIXES := $(foreach file, $(POSTFIXES), $(addprefix $(file), .cc))
78GENERATED_SOURCES2 := $(foreach file, $(GENERATED_SOURCES:.cc=), $(addprefix $(file), $(POSTFIXES)))
79GENERATED_SOURCES += $(GENERATED_SOURCES2)
80endif
970ed795
EL
81# C/C++ Source & header files of Test Ports, external functions and
82# other modules:
83USER_SOURCES =
84USER_HEADERS = $(USER_SOURCES:.cc=.hh)
85
86# Object files of this project that are needed for the executable test suite:
87OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS)
88
89GENERATED_OBJECTS = $(GENERATED_SOURCES:.cc=.o)
90
91USER_OBJECTS = $(USER_SOURCES:.cc=.o)
92
93DEPFILES = $(USER_OBJECTS:.o=.d) $(GENERATED_OBJECTS:.o=.d)
94
95# Other files of the project (Makefile, configuration files, etc.)
96# that will be added to the archived source files:
97OTHER_FILES = Makefile
98
99# The name of the executable test suite:
100TARGET = transparent
101
102#
103# Rules for building the executable...
104#
105
106all: $(TARGET) ;
107
108objects: $(OBJECTS) compile;
109
110$(TARGET): $(OBJECTS)
111 if $(CXX) $(LDFLAGS) -o $@ $^ \
112 -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
113 -L$(OPENSSL_DIR)/lib -lcrypto \
114 -L$(XMLDIR)/lib $($(PLATFORM)_LIBS); \
115 then : ; else $(TTCN3_DIR)/bin/titanver $(OBJECTS); exit 1; fi
116
117.cc.o .c.o:
118 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
119
120.cc.d .c.d:
121 @echo Creating dependency file for '$<'; set -e; \
122 $(CXX) $(CXXDEPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $< \
123 | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
124 [ -s $@ ] || rm -f $@
125
126$(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
127 @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi
128
129compile: $(TTCN3_MODULES) $(ASN1_MODULES)
130 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
131 touch $@
132
133clean:
134 -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
135 $(GENERATED_SOURCES) compile $(DEPFILES) \
136 tags *.log
137
138distclean: clean
139 -$(RM) $(DEPFILES)
140
141dep: $(GENERATED_SOURCES) $(USER_SOURCES) ;
142
143ifeq ($(findstring n,$(MAKEFLAGS)),)
144ifeq ($(filter clean distclean check compile archive diag,$(MAKECMDGOALS)),)
145-include $(DEPFILES)
146endif
147endif
148
149diag:
150 $(TTCN3_DIR)/bin/compiler -v 2>&1
151 $(TTCN3_DIR)/bin/mctr_cli -v 2>&1
152 $(CXX) -v 2>&1
153 @echo TTCN3_DIR=$(TTCN3_DIR)
154 @echo OPENSSL_DIR=$(OPENSSL_DIR)
155 @echo XMLDIR=$(XMLDIR)
156 @echo PLATFORM=$(PLATFORM)
157
158run: $(TARGET) run.cfg
159 ./$^
160 # the setverdict line should contain the testcase as the location
161 grep '(testcase:comp) setverdict' $(TARGET:.exe=).log
162
This page took 0.031099 seconds and 5 git commands to generate.