8deeea6e513184db46a42b0acaaa8aa6db80b2ab
[deliverable/titan.core.git] / regression_test / logFiles / 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 # Balasko, Jeno
10 # Delic, Adam
11 # Kovacs, Ferenc
12 # Raduly, Csaba
13 # Szabo, Bence Janos
14 #
15 ##############################################################################
16 TOPDIR := ..
17 include $(TOPDIR)/Makefile.regression
18
19 .SUFFIXES: .ttcn .hh
20 .PHONY: all clean dep run
21
22 # Remove any swtches incorporated into the name of the compiler
23 # to avoid "duplicate switch" errors.
24 TTCN3_COMPILER := $(filter %compiler, $(TTCN3_COMPILER))
25
26 ifndef COMPILER_FLAGS
27 COMPILER_FLAGS :=
28 endif
29
30 # There is a testcase which requires -L (location information)
31 COMPILER_FLAGS += -L -g $(RT2_FLAG)
32
33 TTCN3_LIB = ttcn3$(RT2_SUFFIX)-parallel$(DYNAMIC_SUFFIX)
34
35 TTCN3_MODULES = LogFiles.ttcn CommonStuff.ttcn TitanLogTest.ttcn
36
37 GENERATED_SOURCES = $(TTCN3_MODULES:.ttcn=.cc)
38 GENERATED_HEADERS = $(GENERATED_SOURCES:.cc=.hh)
39
40 ifdef CODE_SPLIT
41 GENERATED_SOURCES := $(foreach file, $(GENERATED_SOURCES:.cc=), $(addprefix $(file), .cc _seq.cc _set.cc _seqof.cc _setof.cc _union.cc))
42 endif
43
44 USER_SOURCES := $(ABS_SRC)/extfunc.cc
45
46 OBJECTS = $(GENERATED_SOURCES:.cc=.o) $(USER_SOURCES:.cc=.o)
47
48 TARGET = LogFiles$(EXESUFFIX)
49
50 all: $(TARGET)
51
52 $(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
53 @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi
54
55 ifeq ($(findstring dynamic,$(TTCN3_LIB)),)
56 # not dynamic
57 CORELIB_BINARY := $(TTCN3_DIR)/lib/lib$(TTCN3_LIB).a
58 else
59 CORELIB_BINARY := $(TTCN3_DIR)/lib/lib$(TTCN3_LIB).so
60 endif
61
62
63
64 $(TARGET): $(GENERATED_SOURCES) $(USER_SOURCES) $(CORELIB_BINARY)
65 $(CXX) $(CPPFLAGS) $(CXXFLAGS) -g $(LDFLAGS) -o $@ $(GENERATED_SOURCES) $(USER_SOURCES) -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) -L$(OPENSSL_DIR)/lib -lcrypto $($(PLATFORM)_LIBS)
66
67 compile: $(TTCN3_MODULES)
68 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
69 touch $@
70
71 clean distclean:
72 -rm -f $(TARGET) $(OBJECTS) \
73 compile $(GENERATED_HEADERS) $(GENERATED_SOURCES) \
74 *.log baseline_logs/*.lo2 Makefile.bak
75 rm -rf new_logs
76
77 dep: $(GENERATED_SOURCES)
78 makedepend $(CPPFLAGS) $(GENERATED_SOURCES) extfunc.cc
79
80 run: $(TARGET)
81 ./logfilter.sh
82 $(TTCN3_DIR)/bin/ttcn3_start $(TARGET) LogFiles.cfg
83 $(TTCN3_DIR)/bin/ttcn3_start $(TARGET) LogFiles2.cfg
84 $(TTCN3_DIR)/bin/ttcn3_start $(TARGET) LogFilesProc.cfg
85 $(TTCN3_DIR)/bin/ttcn3_start $(TARGET) TitanLogTest.cfg
86 for l in *MTC.log *mtc.log; do grep 'pass (100\.00 %)' >/dev/null $$l || echo "!!!! $$l not 100% !!!!"; done
87 # Bangjohansen produces incomplete xml logs sometimes; delete them
88 # Check that $j exists: unmatched wildcards are returned as-is
89 if xmllint --version 2>/dev/null; then \
90 for j in junit-xml*.log; do \
91 if [ -f $$j ]; then \
92 xmllint --noout $$j || sh -xc "rm $$j"; \
93 else :; fi \
94 done; \
95 else :; fi
96 #./diffLogs new_logs/ baseline_logs/
97
98 #LogFiles.o: LogFiles.hh
99 #extfunc.o: LogFiles.hh
100
101 .NOTPARALLEL:
102
103 #ifdef SRCDIR
104 #$(foreach src, $(USER_SOURCES), $(eval vpath $(src) $(ABS_SRC)))
105 #endif
106 # vpath doesn't work with direct cc -> exe
This page took 0.031754 seconds and 4 git commands to generate.