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