Sync with 5.3.0
[deliverable/titan.core.git] / regression_test / profiler / 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 .SUFFIXES: .ttcn .asn .hh .json
12 .PHONY: all clean dep run
13
14 TTCN3_LIB = ttcn3$(RT2_SUFFIX)$(DYNAMIC_SUFFIX)
15
16 # Tester modules
17 TTCN3_MODULES = PIPEasp_PortType.ttcn PIPEasp_Types.ttcn PIPEasp_Templates.ttcn Shell.ttcn Testcases.ttcn
18
19 GENERATED_SOURCES = $(TTCN3_MODULES:.ttcn=.cc) $(ASN1_MODULES:.asn=.cc)
20 GENERATED_HEADERS = $(GENERATED_SOURCES:.cc=.hh)
21 ifdef CODE_SPLIT
22 GENERATED_SOURCES := $(foreach file, $(GENERATED_SOURCES:.cc=), $(addprefix $(file), .cc _seq.cc _set.cc _seqof.cc _setof.cc _union.cc))
23 endif
24
25 USER_SOURCES = PIPEasp_PT.cc
26 USER_HEADERS = $(USER_SOURCES:.cc=.hh)
27
28 OBJECTS = $(GENERATED_SOURCES:.cc=.o) $(USER_SOURCES:.cc=.o)
29
30 TARGET = profiler_test$(EXESUFFIX)
31
32 # Tested modules (these are compiled with profiling enabled, and are executed by the tester modules)
33 PROF_MODULES = prof1.ttcn prof2.ttcn prof3.ttcn
34
35 PROF_COMPILER_FLAGS = $(COMPILER_FLAGS) -z prof_files.txt
36
37 PROF_TTCN3_LIB = ttcn3$(RT2_SUFFIX)-parallel$(DYNAMIC_SUFFIX)
38
39 PROF_GENERATED_SOURCES = $(PROF_MODULES:.ttcn=.cc)
40 PROF_GENERATED_HEADERS = $(PROF_GENERATED_SOURCES:.cc=.hh)
41
42 PROF_OBJECTS = $(PROF_GENERATED_SOURCES:.cc=.o)
43
44 PROF_TARGET = prof.exe
45
46 TEMP_FILES = $(PROF_GENERATED_SOURCES) $(PROF_GENERATED_HEADERS) $(PROF_OBJECTS) $(PROF_TARGET) data.json prof1.stats empty.stats
47
48 # Rules for tester modules
49 all: $(TARGET)
50
51 $(TARGET): $(GENERATED_SOURCES) $(USER_SOURCES)
52 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) -L$(OPENSSL_DIR)/lib -lcrypto $($(PLATFORM)_LIBS)
53
54 $(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
55 @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi
56
57 compile: $(TTCN3_MODULES)
58 $(filter-out -Nold -E, $(TTCN3_COMPILER)) $(COMPILER_FLAGS) $^
59 touch compile
60
61 clean distclean:
62 -rm -f $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
63 $(GENERATED_SOURCES) *.log Makefile.bak $(TEMP_FILES)
64
65 dep: $(GENERATED_SOURCES) $(PROF_GENERATED_SOURCES)
66 makedepend $(CPPFLAGS) $^
67
68 run: $(TARGET)
69 ./$^
70
71 .NOTPARALLEL:
72
73 # Rules for tested modules
74 $(PROF_TARGET): $(PROF_GENERATED_SOURCES)
75 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ -L$(TTCN3_DIR)/lib -l$(PROF_TTCN3_LIB) -L$(OPENSSL_DIR)/lib -lcrypto $($(PLATFORM)_LIBS)
76
77 $(PROF_GENERATED_SOURCES) $(PROF_GENERATED_HEADERS): prof_compile
78 @if [ ! -f $@ ]; then $(RM) prof_compile; $(MAKE) prof_compile; fi
79
80 prof_compile: $(PROF_MODULES)
81 $(filter-out -Nold -E, $(TTCN3_COMPILER)) $(PROF_COMPILER_FLAGS) $^
82 touch compile
This page took 0.031974 seconds and 6 git commands to generate.