implemented new code splitting mechanism (split to equal slices)
[deliverable/titan.core.git] / regression_test / HQ16404 / 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 # Baji, Laszlo
10 # Balasko, Jeno
11 # Raduly, Csaba
12 # Szabo, Bence Janos
13 #
14 ##############################################################################
15 TOPDIR := ..
16 include ../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
36 CXXDEPFLAGS = -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 # Execution mode: (either ttcn3 or ttcn3-parallel)
48 TTCN3_LIB = ttcn3$(RT2_SUFFIX)$(DYNAMIC_SUFFIX)
49
50 #
51 # You may change these variables. Add your files if necessary...
52 #
53
54 # TTCN-3 modules of this project:
55 TTCN3_MODULES = HQ16404.ttcn
56
57 # ASN.1 modules of this project:
58 ASN1_MODULES =
59
60 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
61 # this project:
62 GENERATED_SOURCES = $(TTCN3_MODULES:.ttcn=.cc) $(ASN1_MODULES:.asn=.cc)
63 GENERATED_HEADERS = $(GENERATED_SOURCES:.cc=.hh)
64 ifdef SPLIT_TO_SLICES
65 POSTFIXES := $(foreach file, $(SPLIT_TO_SLICES), $(addsuffix $(file), _part_))
66 POSTFIXES := $(foreach file, $(POSTFIXES), $(addprefix $(file), .cc))
67 GENERATED_SOURCES2 := $(foreach file, $(GENERATED_SOURCES:.cc=), $(addprefix $(file), $(POSTFIXES)))
68 GENERATED_SOURCES += $(GENERATED_SOURCES2)
69 endif
70 # C/C++ Source & header files of Test Ports, external functions and
71 # other modules:
72 USER_SOURCES =
73 USER_HEADERS = $(USER_SOURCES:.cc=.hh)
74
75 # Object files of this project that are needed for the executable test suite:
76 OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS)
77
78 GENERATED_OBJECTS = $(GENERATED_SOURCES:.cc=.o)
79
80 USER_OBJECTS = $(USER_SOURCES:.cc=.o)
81
82 DEPFILES = $(USER_OBJECTS:.o=.d) $(GENERATED_OBJECTS:.o=.d)
83
84 # Other files of the project (Makefile, configuration files, etc.)
85 # that will be added to the archived source files:
86 OTHER_FILES = Makefile
87
88 # The name of the executable test suite:
89 TARGET = HQ16404
90
91 #
92 # Rules for building the executable...
93 #
94
95 all: $(TARGET) ;
96
97 objects: $(OBJECTS) compile;
98
99 $(TARGET): $(OBJECTS)
100 if $(CXX) $(LDFLAGS) -o $@ $^ \
101 -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
102 -L$(OPENSSL_DIR)/lib -lcrypto \
103 -L$(XMLDIR)/lib $($(PLATFORM)_LIBS); \
104 then : ; else $(TTCN3_DIR)/bin/titanver $(OBJECTS); exit 1; fi
105
106 .cc.o .c.o:
107 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
108
109 .cc.d .c.d:
110 @echo Creating dependency file for '$<'; set -e; \
111 $(CXX) $(CXXDEPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $< \
112 | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
113 [ -s $@ ] || rm -f $@
114
115 $(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
116 @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi
117
118 compile: $(TTCN3_MODULES) $(ASN1_MODULES)
119 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
120 touch $@
121
122 clean:
123 -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
124 $(GENERATED_SOURCES) compile $(DEPFILES) \
125 tags *.log
126
127 distclean: clean
128 -$(RM) $(DEPFILES)
129
130 dep: $(GENERATED_SOURCES) $(USER_SOURCES) ;
131
132 ifeq ($(findstring n,$(MAKEFLAGS)),)
133 ifeq ($(filter clean distclean check compile archive diag,$(MAKECMDGOALS)),)
134 -include $(DEPFILES)
135 endif
136 endif
137
138 diag:
139 $(TTCN3_DIR)/bin/compiler -v 2>&1
140 $(TTCN3_DIR)/bin/mctr_cli -v 2>&1
141 $(CXX) -v 2>&1
142 @echo TTCN3_DIR=$(TTCN3_DIR)
143 @echo OPENSSL_DIR=$(OPENSSL_DIR)
144 @echo XMLDIR=$(XMLDIR)
145 @echo PLATFORM=$(PLATFORM)
146
147 run: $(TARGET) config.cfg
148 ./$^
149
150 %.cc: %.ttcn
151 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
152
153 LDLIBS := -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
154 -L$(OPENSSL_DIR)/lib -lcrypto \
155 -L$(XMLDIR)/lib $($(PLATFORM)_LIBS)
156
157 .PRECIOUS: %.cc
This page took 0.034809 seconds and 5 git commands to generate.