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