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
15 ##############################################################################
17 include $(TOPDIR
)/Makefile.regression
20 .PHONY
: all clean dep run
22 # Remove any swtches incorporated into the name of the compiler
23 # to avoid "duplicate switch" errors.
24 TTCN3_COMPILER
:= $(filter %compiler
, $(TTCN3_COMPILER
))
30 # There is a testcase which requires -L (location information)
31 COMPILER_FLAGS
+= -L
-g
$(RT2_FLAG
)
33 TTCN3_LIB
= ttcn3
$(RT2_SUFFIX
)-parallel
$(DYNAMIC_SUFFIX
)
35 TTCN3_MODULES
= LogFiles.ttcn CommonStuff.ttcn TitanLogTest.ttcn
37 GENERATED_SOURCES
= $(TTCN3_MODULES
:.ttcn
=.
cc)
38 GENERATED_HEADERS
= $(GENERATED_SOURCES
:.
cc=.hh
)
41 GENERATED_SOURCES
:= $(foreach file
, $(GENERATED_SOURCES
:.
cc=), $(addprefix $(file
), .
cc _seq.
cc _set.
cc _seqof.
cc _setof.
cc _union.
cc))
44 USER_SOURCES
:= $(ABS_SRC
)/extfunc.
cc
46 OBJECTS
= $(GENERATED_SOURCES
:.
cc=.o
) $(USER_SOURCES
:.
cc=.o
)
48 TARGET
= LogFiles
$(EXESUFFIX
)
52 $(GENERATED_SOURCES
) $(GENERATED_HEADERS
): compile
53 @if
[ ! -f
$@
]; then
$(RM
) compile
; $(MAKE
) compile
; fi
55 ifeq ($(findstring dynamic
,$(TTCN3_LIB
)),)
57 CORELIB_BINARY
:= $(TTCN3_DIR
)/lib
/lib
$(TTCN3_LIB
).a
59 CORELIB_BINARY
:= $(TTCN3_DIR
)/lib
/lib
$(TTCN3_LIB
).so
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
)
67 compile
: $(TTCN3_MODULES
)
68 $(TTCN3_COMPILER
) $(COMPILER_FLAGS
) $^
- $?
72 -rm -f
$(TARGET
) $(OBJECTS
) \
73 compile
$(GENERATED_HEADERS
) $(GENERATED_SOURCES
) \
74 *.log baseline_logs
/*.lo2 Makefile.bak
77 dep
: $(GENERATED_SOURCES
)
78 makedepend
$(CPPFLAGS
) $(GENERATED_SOURCES
) extfunc.
cc
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 \
92 xmllint
--noout
$$j || sh
-xc
"rm $$j"; \
96 #./diffLogs new_logs/ baseline_logs/
98 #LogFiles.o: LogFiles.hh
99 #extfunc.o: LogFiles.hh
104 #$(foreach src, $(USER_SOURCES), $(eval vpath $(src) $(ABS_SRC)))
106 # vpath doesn't work with direct cc -> exe