Sync with 5.4.0
[deliverable/titan.core.git] / regression_test / cfgFile / define / structured / Makefile
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 ###############################################################################
8 TOPDIR := ../../../
9 include $(TOPDIR)/Makefile.regression
10
11 MAKE_PROG := $(MAKE)
12
13 TTCN_FILE := structured.ttcn
14 CFG := structured.cfg
15
16 FILES := $(TTCN_FILE) $(CFG)
17 RUNNABLE := $(TTCN_FILE:.ttcn=)
18
19 DIR_SINGLE := dir_single_mode
20 DIR_PARALLEL := dir_parallel_mode
21 GENERATED_DIRS := $(DIR_SINGLE) $(DIR_PARALLEL)
22
23 COVERAGE_FLAG :=
24 ifeq ($(COVERAGE), yes)
25 COVERAGE_FLAG += -C
26 endif
27
28 # List of fake targets:
29 .PHONY: all clean run run_single run_parallel runall
30
31 all: $(GENERATED_DIRS)
32
33 $(DIR_SINGLE):
34 mkdir $@
35 cd $@ && for file in $(FILES); do ln -s ../$$file || exit; done
36 cd $@ && $(TTCN3_DIR)/bin/ttcn3_makefilegen $(COVERAGE_FLAG) -s ./* && $(MAKE_PROG) 'CXXFLAGS=$(CXXFLAGS)' 'LDFLAGS=$(LDFLAGS)'
37
38 $(DIR_PARALLEL):
39 mkdir $@
40 cd $@ && for file in $(FILES); do ln -s ../$$file || exit; done
41 cd $@ && $(TTCN3_DIR)/bin/ttcn3_makefilegen $(COVERAGE_FLAG) ./* && $(MAKE_PROG) 'CXXFLAGS=$(CXXFLAGS)' 'LDFLAGS=$(LDFLAGS)'
42
43 run: $(GENERATED_DIRS)
44 cd $(DIR_SINGLE) && ./$(RUNNABLE) $(CFG)
45 cd $(DIR_PARALLEL) && $(TTCN3_DIR)/bin/ttcn3_start $(RUNNABLE) $(CFG)
46
47 # To run all tests, possibly in parallel
48 run_single: $(DIR_SINGLE)
49 cd $(DIR_SINGLE) && ./$(RUNNABLE) $(CFG)
50 run_parallel: $(DIR_PARALLEL)
51 cd $(DIR_PARALLEL) && $(TTCN3_DIR)/bin/ttcn3_start $(RUNNABLE) $(CFG)
52 runall: run_single run_parallel
53
54 clean distclean:
55 rm -rf $(GENERATED_DIRS)
56
57
This page took 0.033405 seconds and 6 git commands to generate.