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