implemented new code splitting mechanism (split to equal slices)
[deliverable/titan.core.git] / regression_test / commProcedure / Makefile
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
7 #
8 # Contributors:
9 # Balasko, Jeno
10 # Delic, Adam
11 # Kovacs, Ferenc
12 # Raduly, Csaba
13 # Szabados, Kristof
14 # Szabo, Bence Janos
15 # Szabo, Janos Zoltan – initial implementation
16 # Tatarka, Gabor
17 #
18 ##############################################################################
19 TOPDIR := ..
20 include $(TOPDIR)/Makefile.regression
21
22 .SUFFIXES: .ttcn .hh
23 .PHONY: all clean dep run
24
25 TTCN3_LIB := ttcn3$(RT2_SUFFIX)-parallel$(DYNAMIC_SUFFIX)
26
27 TTCN3_MODULES := ProcPort.ttcn
28
29 GENERATED_SOURCES := $(TTCN3_MODULES:.ttcn=.cc)
30 GENERATED_HEADERS := $(GENERATED_SOURCES:.cc=.hh)
31 ifdef CODE_SPLIT
32 GENERATED_SOURCES := $(foreach file, $(GENERATED_SOURCES:.cc=), $(addprefix $(file), .cc _seq.cc _set.cc _seqof.cc _setof.cc _union.cc))
33 else ifdef SPLIT_TO_SLICES
34 POSTFIXES := $(foreach file, $(SPLIT_TO_SLICES), $(addsuffix $(file), _part_))
35 POSTFIXES := $(foreach file, $(POSTFIXES), $(addprefix $(file), .cc))
36 GENERATED_SOURCES2 := $(foreach file, $(GENERATED_SOURCES:.cc=), $(addprefix $(file), $(POSTFIXES)))
37 GENERATED_SOURCES += $(GENERATED_SOURCES2)
38 endif
39 GENERATED_SOURCES += CompileOnlyPort.cc CompileOnlyPortAddress.cc
40 GENERATED_HEADERS += CompileOnlyPort.hh CompileOnlyPortAddress.hh
41
42 USER_SOURCES := ExtProcPort.cc PortAddress.cc
43 USER_HEADERS := $(USER_SOURCES:.cc=.hh)
44
45 OBJECTS := $(GENERATED_SOURCES:.cc=.o) $(USER_SOURCES:.cc=.o)
46
47 TARGET := ProcPort$(EXESUFFIX)
48
49 COMPILER_FLAGS := -t
50
51 # Generated code has many shadowed definitions.
52 # Also, skeletons have many unused parameters.
53 # This will override any previous -Wshadow / -Wunused-parameter
54 CXXFLAGS += -Wno-shadow -Wno-unused-parameter
55
56 all: $(TARGET) ;
57
58 $(TARGET): $(GENERATED_SOURCES) $(USER_SOURCES)
59 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ \
60 -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
61 -L$(OPENSSL_DIR)/lib -lcrypto $($(PLATFORM)_LIBS)
62
63 $(GENERATED_SOURCES) $(GENERATED_HEADERS) $(USER_SOURCES) $(USER_HEADERS): compile
64 @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi
65
66 compile: $(TTCN3_MODULES)
67 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
68 touch $@
69
70 clean distclean:
71 -rm -f $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
72 $(GENERATED_SOURCES) compile *.log Makefile.bak
73
74 dep: $(GENERATED_SOURCES)
75 makedepend $(CPPFLAGS) $(USER_SOURCES) $(GENERATED_SOURCES)
76
77 run: $(TARGET)
78 $(TTCN3_DIR)/bin/ttcn3_start $(TARGET)
79
80
81 ExtProcPort.o: ExtProcPort.hh ProcPort.hh
82 ExtProcPort.o: PortAddress.hh CompileOnlyPort.hh CompileOnlyPortAddress.hh
83 PortAddress.o: PortAddress.hh ProcPort.hh
84 PortAddress.o: ExtProcPort.hh CompileOnlyPort.hh CompileOnlyPortAddress.hh
85 ProcPort.o: ProcPort.hh PortAddress.hh ExtProcPort.hh
86 ProcPort.o: CompileOnlyPort.hh CompileOnlyPortAddress.hh
87 CompileOnlyPort.o: CompileOnlyPort.hh ProcPort.hh
88 CompileOnlyPort.o: PortAddress.hh
89 CompileOnlyPort.o: ExtProcPort.hh CompileOnlyPortAddress.hh
90 CompileOnlyPortAddress.o: CompileOnlyPortAddress.hh ProcPort.hh
91 CompileOnlyPortAddress.o: PortAddress.hh
92 CompileOnlyPortAddress.o: ExtProcPort.hh CompileOnlyPort.hh
This page took 0.045396 seconds and 5 git commands to generate.