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 ..
/..
/Makefile.regression
11 # WARNING! This Makefile can be used with GNU make only.
12 # Other versions of make may report syntax errors in it.
15 # Do NOT touch this line...
17 .PHONY
: all archive
check clean dep objects
22 # Set these variables...
25 # Flags for the C++ preprocessor (and makedepend as well):
28 # Flags for dependency generation
31 # Flags for the C++ compiler:
34 # Flags for the linker:
37 # Flags for the TTCN-3 and ASN.1 compiler:
40 # Execution mode: (either ttcn3 or ttcn3-parallel)
41 TTCN3_LIB
= ttcn3
$(RT2_SUFFIX
)$(DYNAMIC_SUFFIX
)
44 # You may change these variables. Add your files if necessary...
47 # TTCN-3 modules of this project:
48 TTCN3_MODULES
= HU13380.ttcn
50 # ASN.1 modules of this project:
53 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
55 GENERATED_SOURCES
= $(TTCN3_MODULES
:.ttcn
=.
cc) $(ASN1_MODULES
:.asn
=.
cc)
56 GENERATED_HEADERS
= $(GENERATED_SOURCES
:.
cc=.hh
)
58 # C/C++ Source & header files of Test Ports, external functions and
61 USER_HEADERS
= $(USER_SOURCES
:.
cc=.hh
)
63 # Object files of this project that are needed for the executable test suite:
64 OBJECTS
= $(GENERATED_OBJECTS
) $(USER_OBJECTS
)
66 GENERATED_OBJECTS
= $(GENERATED_SOURCES
:.
cc=.o
)
68 USER_OBJECTS
= $(USER_SOURCES
:.
cc=.o
)
70 DEPFILES
= $(USER_OBJECTS
:.o
=.d
) $(GENERATED_OBJECTS
:.o
=.d
)
72 # Other files of the project (Makefile, configuration files, etc.)
73 # that will be added to the archived source files:
74 OTHER_FILES
= Makefile
76 # The name of the executable test suite:
80 # Rules for building the executable...
85 objects
: $(OBJECTS
) compile
;
88 if
$(CXX
) $(LDFLAGS
) -o
$@
$^ \
89 -L
$(TTCN3_DIR
)/lib
-l
$(TTCN3_LIB
) \
90 -L
$(OPENSSL_DIR
)/lib
-lcrypto \
91 -L
$(XMLDIR
)/lib
$($(PLATFORM
)_LIBS
); \
92 then
: ; else $(TTCN3_DIR
)/bin
/titanver
$(OBJECTS
); exit
1; fi
95 $(CXX
) -c
$(CPPFLAGS
) $(CXXFLAGS
) -o
$@
$<
98 @echo Creating dependency file for
'$<'; set
-e
; \
99 $(CXX
) $(CXXDEPFLAGS
) $(CPPFLAGS
) $(CXXFLAGS
) $< \
100 | sed
's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@
; \
101 [ -s
$@
] ||
rm -f
$@
103 $(GENERATED_SOURCES
) $(GENERATED_HEADERS
): compile
104 @if
[ ! -f
$@
]; then
$(RM
) compile
; $(MAKE
) compile
; fi
106 compile
: $(TTCN3_MODULES
) $(ASN1_MODULES
)
107 $(TTCN3_COMPILER
) $(COMPILER_FLAGS
) $^
- $?
111 -$(RM
) $(TARGET
) $(LIBRARY
) $(OBJECTS
) $(GENERATED_HEADERS
) \
112 $(GENERATED_SOURCES
) compile
$(DEPFILES
) \
115 dep
: $(GENERATED_SOURCES
) $(USER_SOURCES
) ;
117 ifeq ($(findstring n
,$(MAKEFLAGS
)),)
118 ifeq ($(filter clean distclean check compile archive diag
,$(MAKECMDGOALS
)),)
124 $(TTCN3_DIR
)/bin
/compiler
-v
2>&1
125 $(TTCN3_DIR
)/bin
/mctr_cli
-v
2>&1
127 @echo TTCN3_DIR
=$(TTCN3_DIR
)
128 @echo OPENSSL_DIR
=$(OPENSSL_DIR
)
129 @echo XMLDIR
=$(XMLDIR
)
130 @echo PLATFORM
=$(PLATFORM
)
133 # Add your rules here if necessary...