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 ###############################################################################
9 include $(TOPDIR
)/Makefile.regression
12 .PHONY
: all clean dep run
14 TTCN3_LIB
:= ttcn3
$(RT2_SUFFIX
)-parallel
$(DYNAMIC_SUFFIX
)
16 TTCN3_MODULES
:= ProcPort.ttcn
18 GENERATED_SOURCES
:= $(TTCN3_MODULES
:.ttcn
=.
cc)
19 GENERATED_HEADERS
:= $(GENERATED_SOURCES
:.
cc=.hh
)
21 GENERATED_SOURCES
:= $(foreach file
, $(GENERATED_SOURCES
:.
cc=), $(addprefix $(file
), .
cc _seq.
cc _set.
cc _seqof.
cc _setof.
cc _union.
cc))
23 GENERATED_SOURCES
+= CompileOnlyPort.
cc CompileOnlyPortAddress.
cc
24 GENERATED_HEADERS
+= CompileOnlyPort.hh CompileOnlyPortAddress.hh
26 USER_SOURCES
:= ExtProcPort.
cc PortAddress.
cc
27 USER_HEADERS
:= $(USER_SOURCES
:.
cc=.hh
)
29 OBJECTS
:= $(GENERATED_SOURCES
:.
cc=.o
) $(USER_SOURCES
:.
cc=.o
)
31 TARGET
:= ProcPort
$(EXESUFFIX
)
35 # Generated code has many shadowed definitions.
36 # Also, skeletons have many unused parameters.
37 # This will override any previous -Wshadow / -Wunused-parameter
38 CXXFLAGS
+= -Wno-shadow
-Wno-unused-parameter
42 $(TARGET
): $(GENERATED_SOURCES
) $(USER_SOURCES
)
43 $(CXX
) $(CPPFLAGS
) $(CXXFLAGS
) $(LDFLAGS
) -o
$@
$^ \
44 -L
$(TTCN3_DIR
)/lib
-l
$(TTCN3_LIB
) \
45 -L
$(OPENSSL_DIR
)/lib
-lcrypto
$($(PLATFORM
)_LIBS
)
47 $(GENERATED_SOURCES
) $(GENERATED_HEADERS
) $(USER_SOURCES
) $(USER_HEADERS
): compile
48 @if
[ ! -f
$@
]; then
$(RM
) compile
; $(MAKE
) compile
; fi
50 compile
: $(TTCN3_MODULES
)
51 $(TTCN3_COMPILER
) $(COMPILER_FLAGS
) $^
- $?
55 -rm -f
$(TARGET
) $(OBJECTS
) $(GENERATED_HEADERS
) \
56 $(GENERATED_SOURCES
) compile
*.log Makefile.bak
58 dep
: $(GENERATED_SOURCES
)
59 makedepend
$(CPPFLAGS
) $(USER_SOURCES
) $(GENERATED_SOURCES
)
62 $(TTCN3_DIR
)/bin
/ttcn3_start
$(TARGET
)
65 ExtProcPort.o
: ExtProcPort.hh ProcPort.hh
66 ExtProcPort.o
: PortAddress.hh CompileOnlyPort.hh CompileOnlyPortAddress.hh
67 PortAddress.o
: PortAddress.hh ProcPort.hh
68 PortAddress.o
: ExtProcPort.hh CompileOnlyPort.hh CompileOnlyPortAddress.hh
69 ProcPort.o
: ProcPort.hh PortAddress.hh ExtProcPort.hh
70 ProcPort.o
: CompileOnlyPort.hh CompileOnlyPortAddress.hh
71 CompileOnlyPort.o
: CompileOnlyPort.hh ProcPort.hh
72 CompileOnlyPort.o
: PortAddress.hh
73 CompileOnlyPort.o
: ExtProcPort.hh CompileOnlyPortAddress.hh
74 CompileOnlyPortAddress.o
: CompileOnlyPortAddress.hh ProcPort.hh
75 CompileOnlyPortAddress.o
: PortAddress.hh
76 CompileOnlyPortAddress.o
: ExtProcPort.hh CompileOnlyPort.hh