1 ###############################################################################
2 # Copyright (c) 2000-2015 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 ###############################################################################
9 include $(TOPDIR
)/Makefile.regression
12 .PHONY
: all clean dep run
14 # Remove any swtches incorporated into the name of the compiler
15 # to avoid "duplicate switch" errors.
16 TTCN3_COMPILER
:= $(filter %compiler
, $(TTCN3_COMPILER
))
22 # There is a testcase which requires -L (location information)
23 COMPILER_FLAGS
+= -L
-g
$(RT2_FLAG
)
25 TTCN3_LIB
= ttcn3
$(RT2_SUFFIX
)-parallel
$(DYNAMIC_SUFFIX
)
27 TTCN3_MODULES
= LogFiles.ttcn CommonStuff.ttcn TitanLogTest.ttcn
29 GENERATED_SOURCES
= $(TTCN3_MODULES
:.ttcn
=.
cc)
30 GENERATED_HEADERS
= $(GENERATED_SOURCES
:.
cc=.hh
)
33 GENERATED_SOURCES
:= $(foreach file
, $(GENERATED_SOURCES
:.
cc=), $(addprefix $(file
), .
cc _seq.
cc _set.
cc _seqof.
cc _setof.
cc _union.
cc))
36 USER_SOURCES
:= $(ABS_SRC
)/extfunc.
cc
38 OBJECTS
= $(GENERATED_SOURCES
:.
cc=.o
) $(USER_SOURCES
:.
cc=.o
)
40 TARGET
= LogFiles
$(EXESUFFIX
)
44 $(GENERATED_SOURCES
) $(GENERATED_HEADERS
): compile
45 @if
[ ! -f
$@
]; then
$(RM
) compile
; $(MAKE
) compile
; fi
47 ifeq ($(findstring dynamic
,$(TTCN3_LIB
)),)
49 CORELIB_BINARY
:= $(TTCN3_DIR
)/lib
/lib
$(TTCN3_LIB
).a
51 CORELIB_BINARY
:= $(TTCN3_DIR
)/lib
/lib
$(TTCN3_LIB
).so
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
)
59 compile
: $(TTCN3_MODULES
)
60 $(TTCN3_COMPILER
) $(COMPILER_FLAGS
) $^
- $?
64 -rm -f
$(TARGET
) $(OBJECTS
) \
65 compile
$(GENERATED_HEADERS
) $(GENERATED_SOURCES
) \
66 *.log baseline_logs
/*.lo2 Makefile.bak
69 dep
: $(GENERATED_SOURCES
)
70 makedepend
$(CPPFLAGS
) $(GENERATED_SOURCES
) extfunc.
cc
74 $(TTCN3_DIR
)/bin
/ttcn3_start
$(TARGET
) LogFiles.cfg
75 $(TTCN3_DIR
)/bin
/ttcn3_start
$(TARGET
) LogFiles2.cfg
76 $(TTCN3_DIR
)/bin
/ttcn3_start
$(TARGET
) LogFilesProc.cfg
77 $(TTCN3_DIR
)/bin
/ttcn3_start
$(TARGET
) TitanLogTest.cfg
78 for l in
*MTC.log
*mtc.log
; do grep
'pass (100\.00 %)' >/dev
/null
$$l || echo
"!!!! $$l not 100% !!!!"; done
79 # Bangjohansen produces incomplete xml logs sometimes; delete them
80 # Check that $j exists: unmatched wildcards are returned as-is
81 if xmllint
--version
2>/dev
/null
; then \
82 for j in junit-xml
*.log
; do \
84 xmllint
--noout
$$j || sh
-xc
"rm $$j"; \
88 #./diffLogs new_logs/ baseline_logs/
90 #LogFiles.o: LogFiles.hh
91 #extfunc.o: LogFiles.hh
96 #$(foreach src, $(USER_SOURCES), $(eval vpath $(src) $(ABS_SRC)))
98 # vpath doesn't work with direct cc -> exe