Titan Core Initial Contribution
[deliverable/titan.core.git] / function_test / 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 # Makefile to run the non-interactive tests
9 DIRS := BER_EncDec RAW_EncDec Text_EncDec XER_EncDec Semantic_Analyser Semantic_Analyser_Csaba Config_Parser
10
11 SCRIPTFLAGS :=
12
13 # Coverage settings
14 LCOVDIR := /mnt/TTCN/Tools/lcov-1.7/usr
15 LCOV := no
16 ifeq ($(LCOV), yes)
17 SCRIPTFLAGS += -coverage
18 endif
19 # Runtime selection, doesn't have effect on BER/RAW tests yet
20 RT2 := no
21 ifeq ($(RT2), yes)
22 SCRIPTFLAGS += -rt2
23 endif
24
25 # Your platform. Allowed values: SOLARIS, SOLARIS8, LINUX, FREEBSD, WIN32
26 ifndef PLATFORM
27 PLATFORM1 := $(shell uname -s)
28 PLATFORM2 := $(shell uname -r)
29 PLATFORM3 := $(shell uname -m)
30
31 ifeq ($(PLATFORM1), SunOS)
32 ifeq ($(PLATFORM2), 5.6)
33 PLATFORM := SOLARIS
34 else
35 PLATFORM := SOLARIS8
36 endif # 5.6
37 endif # SunOS
38 ifeq ($(PLATFORM1), Linux)
39 PLATFORM := LINUX
40 endif # Linux
41 ifeq ($(PLATFORM1), FreeBSD)
42 PLATFORM := FREEBSD
43 endif # FreeBSD
44 ifeq ($(findstring CYGWIN, $(PLATFORM1)), CYGWIN)
45 PLATFORM := WIN32
46 endif # CYGWIN
47 ifeq ($(PLATFORM1), Interix)
48 PLATFORM := INTERIX
49 endif # Interix
50 endif # ifndef PLATFORM
51 ifndef PLATFORM
52 PLEASE CHECK THE ABOVE PLATFORM SETTINGS!!!
53 endif # ifndef PLATFORM
54
55 export PLATFORM
56
57 all check run: $(DIRS)
58
59 .PHONY: $(DIRS)
60
61 BER_EncDec:
62 cd $@; ./run_test $(SCRIPTFLAGS)
63
64 RAW_EncDec:
65 cd $@; ./run_test $(SCRIPTFLAGS)
66
67 Text_EncDec:
68 cd $@; if [ ! -f perl ] ; then ln -s `which perl` perl; fi; ./run_test $(SCRIPTFLAGS)
69
70 XER_EncDec:
71 cd $@; ./run_test $(SCRIPTFLAGS)
72
73 Semantic_Analyser:
74 cd $@; if [ ! -f perl ] ; then ln -s `which perl` perl; fi; ./run_test_all $(SCRIPTFLAGS)
75
76 Semantic_Analyser_Csaba:
77 make run -f Makefile.semantic -C Semantic_Analyser
78
79 Config_Parser:
80 cd $@; if [ ! -f perl ] ; then ln -s `which perl` perl; fi; ./run_test $(SCRIPTFLAGS)
81
82 profile: $(DIRS)
83 make all
84 $(LCOVDIR)/bin/lcov -d .. -c -o functest_coverage.info
85 $(LCOVDIR)/bin/genhtml -o functest_coverage -t "TITAN Function Test Coverage" functest_coverage.info
86
87 # It's a 50-50
88 clean:
89 for d in $(DIRS); do if [ -f $$d/Makefile ]; then $(MAKE) -C $$d clean; else : ; fi done
90
91 $(CURDIR)/Makefile.personal:
92 ln -s $(CURDIR)/../$(@F) $(CURDIR)/
93 include $(CURDIR)/Makefile.personal
This page took 0.037759 seconds and 5 git commands to generate.