implemented new code splitting mechanism (split to equal slices)
[deliverable/titan.core.git] / regression_test / RAW / HN25015 / 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 dependency generation
33 CXXDEPFLAGS = -MM
34
35 ifeq ($(PLATFORM), WIN32)
36 # Silence linker warnings.
37 # Overridden by Makefile.cfg
38 endif
39
40 # Flags for the TTCN-3 and ASN.1 compiler:
41 COMPILER_FLAGS += -x
42
43 # Execution mode: (either ttcn3 or ttcn3-parallel)
44 TTCN3_LIB = ttcn3$(RT2_SUFFIX)$(DYNAMIC_SUFFIX)
45
46
47 #
48 # You may change these variables. Add your files if necessary...
49 #
50
51 # TTCN-3 modules of this project:
52 TTCN3_MODULES = General_Types.ttcn SGsAP_Types.ttcn HN25015.ttcn
53
54 # ASN.1 modules of this project:
55 ASN1_MODULES =
56
57 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
58 # this project:
59 GENERATED_SOURCES = $(TTCN3_MODULES:.ttcn=.cc) $(ASN1_MODULES:.asn=.cc)
60 GENERATED_HEADERS = $(GENERATED_SOURCES:.cc=.hh)
61 ifdef SPLIT_TO_SLICES
62 POSTFIXES := $(foreach file, $(SPLIT_TO_SLICES), $(addsuffix $(file), _part_))
63 POSTFIXES := $(foreach file, $(POSTFIXES), $(addprefix $(file), .cc))
64 GENERATED_SOURCES2 := $(foreach file, $(GENERATED_SOURCES:.cc=), $(addprefix $(file), $(POSTFIXES)))
65 GENERATED_SOURCES += $(GENERATED_SOURCES2)
66 endif
67 # C/C++ Source & header files of Test Ports, external functions and
68 # other modules:
69 USER_SOURCES =
70 USER_HEADERS = $(USER_SOURCES:.cc=.hh)
71
72 # Object files of this project that are needed for the executable test suite:
73 OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS)
74
75 GENERATED_OBJECTS = $(GENERATED_SOURCES:.cc=.o)
76
77 USER_OBJECTS = $(USER_SOURCES:.cc=.o)
78
79 DEPFILES = $(USER_OBJECTS:.o=.d) $(GENERATED_OBJECTS:.o=.d)
80
81
82 # The name of the executable test suite:
83 TARGET = HN25015$(RT2_SUFFIX)$(EXESUFFIX)
84
85
86 # Rules for building the executable...
87 #
88
89 all: $(TARGET) ;
90
91 objects: $(OBJECTS) ;
92
93 $(TARGET): $(OBJECTS)
94 if $(CXX) $(LDFLAGS) -o $@ $^ \
95 -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
96 -L$(OPENSSL_DIR)/lib -lcrypto \
97 -L$(XMLDIR)/lib $($(PLATFORM)_LIBS); \
98 then : ; else $(TTCN3_DIR)/bin/titanver $(OBJECTS); exit 1; fi
99
100 .cc.o .c.o:
101 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
102
103 .cc.d .c.d:
104 @echo Creating dependency file for '$<'; set -e; \
105 $(CXX) $(CXXDEPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $< \
106 | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
107 [ -s $@ ] || rm -f $@
108
109 $(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
110 @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi
111
112 compile: $(TTCN3_MODULES) $(ASN1_MODULES)
113 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
114 touch $@
115
116
117 clean:
118 -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
119 $(GENERATED_SOURCES) compile $(DEPFILES) \
120 tags *.log
121
122 distclean: clean
123 -$(RM) $(DEPFILES)
124
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
135
136 diag:
137 $(TTCN3_COMPILER) -v 2>&1
138 $(TTCN3_DIR)/bin/mctr_cli -v 2>&1
139 $(CXX) -v 2>&1
140 @echo TTCN3_DIR=$(TTCN3_DIR)
141 @echo OPENSSL_DIR=$(OPENSSL_DIR)
142 @echo XMLDIR=$(XMLDIR)
143 @echo PLATFORM=$(PLATFORM)
144
145 #
146 # Add your rules here if necessary...
147 #
148
149 run: $(TARGET) ./config.cfg
150 ./$^
This page took 0.042399 seconds and 6 git commands to generate.