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