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