implemented new code splitting mechanism (split to equal slices)
[deliverable/titan.core.git] / regression_test / logger_control / Makefile
CommitLineData
d44e3c4f 1##############################################################################
2# Copyright (c) 2000-2016 Ericsson Telecom AB
970ed795
EL
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
d44e3c4f 7#
8# Contributors:
9# Baji, Laszlo
10# Balasko, Jeno
11# Raduly, Csaba
14e21cff 12# Szabo, Bence Janos
d44e3c4f 13#
14##############################################################################
970ed795
EL
15TOPDIR := ..
16include ../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):
31CPPFLAGS += -I../../core/loggerapi -I..
32
33# Flags for dependency generation
34CXXDEPFLAGS = -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:
43ifeq ($(findstring -L,$(TTCN3_COMPILER)),)
44# logfilecheck requires location info.
45COMPILER_FLAGS += -L
46endif
47
48# Execution mode: (either ttcn3 or ttcn3-parallel)
49TTCN3_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:
56TTCN3_MODULES := logcontrol.ttcn TitanLoggerControl.ttcn
57
58# ASN.1 modules of this project:
59ASN1_MODULES =
60
61# C++ source & header files generated from the TTCN-3 & ASN.1 modules of
62# this project:
63GENERATED_SOURCES := $(TTCN3_MODULES:.ttcn=.cc) $(ASN1_MODULES:.asn=.cc)
64GENERATED_HEADERS := $(GENERATED_SOURCES:.cc=.hh)
14e21cff 65ifdef SPLIT_TO_SLICES
66POSTFIXES := $(foreach file, $(SPLIT_TO_SLICES), $(addsuffix $(file), _part_))
67POSTFIXES := $(foreach file, $(POSTFIXES), $(addprefix $(file), .cc))
68GENERATED_SOURCES2 := $(foreach file, $(GENERATED_SOURCES:.cc=), $(addprefix $(file), $(POSTFIXES)))
69GENERATED_SOURCES += $(GENERATED_SOURCES2)
70endif
970ed795
EL
71# C/C++ Source & header files of Test Ports, external functions and
72# other modules:
73USER_SOURCES :=
74USER_HEADERS :=
75
76GENERATED_OBJECTS := $(GENERATED_SOURCES:.cc=.o)
77
78USER_OBJECTS := $(USER_SOURCES:.cc=.o)
79
80# Object files of this project that are needed for the executable test suite:
81OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS)
82
83DEPFILES = $(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:
87OTHER_FILES = Makefile
88
89# The name of the executable test suite:
90TARGET = logcontrol$(EXESUFFIX)
91
92#
93# Rules for building the executable...
94#
95
96all: $(TARGET) ;
97
98objects: $(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
119compile: $(TTCN3_MODULES) $(ASN1_MODULES)
120 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
121 touch $@
122
123clean:
124 -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
125 $(GENERATED_SOURCES) compile $(DEPFILES) \
126 tags *.log
127
128distclean: clean
129 -$(RM) TitanLoggerControl.ttcn
130
131dep: $(GENERATED_SOURCES) $(USER_SOURCES) ;
132
133ifeq ($(findstring n,$(MAKEFLAGS)),)
134ifeq ($(filter clean distclean check compile archive diag,$(MAKECMDGOALS)),)
135-include $(DEPFILES)
136endif
137endif
138
139
140diag:
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
152run: $(TARGET) config.cfg
153 rm -f *.log
154 ./$^
155 $(ABS_SRC)/logfilecheck
156
157# files from the runtime
158TitanLoggerControl.ttcn: ../../core/TitanLoggerControl.ttcn
159 ln -s $< $@
160
This page took 0.03238 seconds and 5 git commands to generate.