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
14 # Szabo, Janos Zoltan – initial implementation
17 ##############################################################################
19 include $(TOPDIR
)/Makefile.regression
22 .PHONY
: all clean dep run
24 TTCN3_LIB
:= ttcn3
$(RT2_SUFFIX
)-parallel
$(DYNAMIC_SUFFIX
)
26 TTCN3_MODULES
:= ProcPort.ttcn
28 GENERATED_SOURCES
:= $(TTCN3_MODULES
:.ttcn
=.
cc)
29 GENERATED_HEADERS
:= $(GENERATED_SOURCES
:.
cc=.hh
)
31 GENERATED_SOURCES
:= $(foreach file
, $(GENERATED_SOURCES
:.
cc=), $(addprefix $(file
), .
cc _seq.
cc _set.
cc _seqof.
cc _setof.
cc _union.
cc))
33 GENERATED_SOURCES
+= CompileOnlyPort.
cc CompileOnlyPortAddress.
cc
34 GENERATED_HEADERS
+= CompileOnlyPort.hh CompileOnlyPortAddress.hh
36 USER_SOURCES
:= ExtProcPort.
cc PortAddress.
cc
37 USER_HEADERS
:= $(USER_SOURCES
:.
cc=.hh
)
39 OBJECTS
:= $(GENERATED_SOURCES
:.
cc=.o
) $(USER_SOURCES
:.
cc=.o
)
41 TARGET
:= ProcPort
$(EXESUFFIX
)
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
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
)
57 $(GENERATED_SOURCES
) $(GENERATED_HEADERS
) $(USER_SOURCES
) $(USER_HEADERS
): compile
58 @if
[ ! -f
$@
]; then
$(RM
) compile
; $(MAKE
) compile
; fi
60 compile
: $(TTCN3_MODULES
)
61 $(TTCN3_COMPILER
) $(COMPILER_FLAGS
) $^
- $?
65 -rm -f
$(TARGET
) $(OBJECTS
) $(GENERATED_HEADERS
) \
66 $(GENERATED_SOURCES
) compile
*.log Makefile.bak
68 dep
: $(GENERATED_SOURCES
)
69 makedepend
$(CPPFLAGS
) $(USER_SOURCES
) $(GENERATED_SOURCES
)
72 $(TTCN3_DIR
)/bin
/ttcn3_start
$(TARGET
)
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