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 ##############################################################################
16 include ..
/..
/Makefile.regression
18 # WARNING! This Makefile can be used with GNU make only.
19 # Other versions of make may report syntax errors in it.
22 # Do NOT touch this line...
24 .PHONY
: all archive
check clean dep objects
29 # Set these variables...
32 # Flags for the C++ preprocessor (and makedepend as well):
35 # Flags for dependency generation
38 # Flags for the C++ compiler:
41 # Flags for the linker:
44 # Flags for the TTCN-3 and ASN.1 compiler:
47 # Execution mode: (either ttcn3 or ttcn3-parallel)
48 TTCN3_LIB
= ttcn3
$(RT2_SUFFIX
)$(DYNAMIC_SUFFIX
)
51 # You may change these variables. Add your files if necessary...
54 # TTCN-3 modules of this project:
55 TTCN3_MODULES
= HQ30408.ttcn
57 # ASN.1 modules of this project:
60 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
62 GENERATED_SOURCES
= $(TTCN3_MODULES
:.ttcn
=.
cc) $(ASN1_MODULES
:.asn
=.
cc)
63 GENERATED_HEADERS
= $(GENERATED_SOURCES
:.
cc=.hh
)
65 POSTFIXES
:= $(foreach file
, $(SPLIT_TO_SLICES
), $(addsuffix $(file
), _part_
))
66 POSTFIXES
:= $(foreach file
, $(POSTFIXES
), $(addprefix $(file
), .
cc))
67 GENERATED_SOURCES2
:= $(foreach file
, $(GENERATED_SOURCES
:.
cc=), $(addprefix $(file
), $(POSTFIXES
)))
68 GENERATED_SOURCES
+= $(GENERATED_SOURCES2
)
70 # C/C++ Source & header files of Test Ports, external functions and
73 USER_HEADERS
= $(USER_SOURCES
:.
cc=.hh
)
75 # Object files of this project that are needed for the executable test suite:
76 OBJECTS
= $(GENERATED_OBJECTS
) $(USER_OBJECTS
)
78 GENERATED_OBJECTS
= $(GENERATED_SOURCES
:.
cc=.o
)
80 USER_OBJECTS
= $(USER_SOURCES
:.
cc=.o
)
82 DEPFILES
= $(USER_OBJECTS
:.o
=.d
) $(GENERATED_OBJECTS
:.o
=.d
)
84 # Other files of the project (Makefile, configuration files, etc.)
85 # that will be added to the archived source files:
86 OTHER_FILES
= Makefile
88 # The name of the executable test suite:
92 # Rules for building the executable...
97 objects
: $(OBJECTS
) compile
;
100 if
$(CXX
) $(LDFLAGS
) -o
$@
$^ \
101 -L
$(TTCN3_DIR
)/lib
-l
$(TTCN3_LIB
) \
102 -L
$(OPENSSL_DIR
)/lib
-lcrypto \
103 -L
$(XMLDIR
)/lib
$($(PLATFORM
)_LIBS
); \
104 then
: ; else $(TTCN3_DIR
)/bin
/titanver
$(OBJECTS
); exit
1; fi
107 $(CXX
) -c
$(CPPFLAGS
) $(CXXFLAGS
) -o
$@
$<
110 @echo Creating dependency file for
'$<'; set
-e
; \
111 $(CXX
) $(CXXDEPFLAGS
) $(CPPFLAGS
) $(CXXFLAGS
) $< \
112 | sed
's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@
; \
113 [ -s
$@
] ||
rm -f
$@
115 $(GENERATED_SOURCES
) $(GENERATED_HEADERS
): compile
116 @if
[ ! -f
$@
]; then
$(RM
) compile
; $(MAKE
) compile
; fi
118 compile
: $(TTCN3_MODULES
) $(ASN1_MODULES
)
119 $(TTCN3_COMPILER
) $(COMPILER_FLAGS
) $^
- $?
123 -$(RM
) $(TARGET
) $(OBJECTS
) $(GENERATED_HEADERS
) \
124 $(GENERATED_SOURCES
) compile
$(DEPFILES
) \
127 dep
: $(GENERATED_SOURCES
) $(USER_SOURCES
) ;
129 ifeq ($(findstring n
,$(MAKEFLAGS
)),)
130 ifeq ($(filter clean distclean check compile archive diag
,$(MAKECMDGOALS
)),)
136 $(TTCN3_COMPILER
) -v
2>&1
137 $(TTCN3_DIR
)/bin
/mctr_cli
-v
2>&1
139 @echo TTCN3_DIR
=$(TTCN3_DIR
)
140 @echo OPENSSL_DIR
=$(OPENSSL_DIR
)
141 @echo XMLDIR
=$(XMLDIR
)
142 @echo PLATFORM
=$(PLATFORM
)
145 # Add your rules here if necessary...