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
15 # Szabo, Janos Zoltan – initial implementation
18 ##############################################################################
20 include $(TOPDIR
)/Makefile.regression
23 .PHONY
: all clean dep run
25 TTCN3_LIB
:= ttcn3
$(RT2_SUFFIX
)-parallel
$(DYNAMIC_SUFFIX
)
27 TTCN3_MODULES
:= ProcPort.ttcn
29 GENERATED_SOURCES
:= $(TTCN3_MODULES
:.ttcn
=.
cc)
30 GENERATED_HEADERS
:= $(GENERATED_SOURCES
:.
cc=.hh
)
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
)
39 GENERATED_SOURCES
+= CompileOnlyPort.
cc CompileOnlyPortAddress.
cc
40 GENERATED_HEADERS
+= CompileOnlyPort.hh CompileOnlyPortAddress.hh
42 USER_SOURCES
:= ExtProcPort.
cc PortAddress.
cc
43 USER_HEADERS
:= $(USER_SOURCES
:.
cc=.hh
)
45 OBJECTS
:= $(GENERATED_SOURCES
:.
cc=.o
) $(USER_SOURCES
:.
cc=.o
)
47 TARGET
:= ProcPort
$(EXESUFFIX
)
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
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
)
63 $(GENERATED_SOURCES
) $(GENERATED_HEADERS
) $(USER_SOURCES
) $(USER_HEADERS
): compile
64 @if
[ ! -f
$@
]; then
$(RM
) compile
; $(MAKE
) compile
; fi
66 compile
: $(TTCN3_MODULES
)
67 $(TTCN3_COMPILER
) $(COMPILER_FLAGS
) $^
- $?
71 -rm -f
$(TARGET
) $(OBJECTS
) $(GENERATED_HEADERS
) \
72 $(GENERATED_SOURCES
) compile
*.log Makefile.bak
74 dep
: $(GENERATED_SOURCES
)
75 makedepend
$(CPPFLAGS
) $(USER_SOURCES
) $(GENERATED_SOURCES
)
78 $(TTCN3_DIR
)/bin
/ttcn3_start
$(TARGET
)
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