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