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
9 # Botond Baranyi – initial implementation
11 ##############################################################################
13 include ..
/..
/Makefile.regression
15 # WARNING! This Makefile can be used with GNU make only.
16 # Other versions of make may report syntax errors in it.
19 # Do NOT touch this line...
21 .PHONY
: all archive
check clean dep objects
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
= ustr.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:
77 TARGET
= ustr
$(EXESUFFIX
)
81 # Rules for building the executable...
86 objects
: $(OBJECTS
) compile
;
89 if
$(CXX
) $(LDFLAGS
) -o
$@
$^ \
90 -L
$(TTCN3_DIR
)/lib
-l
$(TTCN3_LIB
) \
91 -L
$(OPENSSL_DIR
)/lib
-lcrypto \
92 -L
$(XMLDIR
)/lib
$($(PLATFORM
)_LIBS
); \
93 then
: ; else $(TTCN3_DIR
)/bin
/titanver
$(OBJECTS
); exit
1; fi
96 $(CXX
) -c
$(CPPFLAGS
) $(CXXFLAGS
) -o
$@
$<
99 @echo Creating dependency file for
'$<'; set
-e
; \
100 $(CXX
) $(CXXDEPFLAGS
) $(CPPFLAGS
) $(CXXFLAGS
) $< \
101 | sed
's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@
; \
102 [ -s
$@
] ||
rm -f
$@
104 $(GENERATED_SOURCES
) $(GENERATED_HEADERS
): compile
105 @if
[ ! -f
$@
]; then
$(RM
) compile
; $(MAKE
) compile
; fi
107 compile
: $(TTCN3_MODULES
) $(ASN1_MODULES
)
108 $(TTCN3_COMPILER
) $(COMPILER_FLAGS
) $^
- $?
112 -$(RM
) $(TARGET
) $(OBJECTS
) $(GENERATED_HEADERS
) \
113 $(GENERATED_SOURCES
) compile
$(DEPFILES
) \
116 dep
: $(GENERATED_SOURCES
) $(USER_SOURCES
) ;
118 ifeq ($(findstring n
,$(MAKEFLAGS
)),)
119 ifeq ($(filter clean distclean check compile archive diag
,$(MAKECMDGOALS
)),)
125 $(TTCN3_DIR
)/bin
/compiler
-v
2>&1
126 $(TTCN3_DIR
)/bin
/mctr_cli
-v
2>&1
128 @echo TTCN3_DIR
=$(TTCN3_DIR
)
129 @echo OPENSSL_DIR
=$(OPENSSL_DIR
)
130 @echo XMLDIR
=$(XMLDIR
)
131 @echo PLATFORM
=$(PLATFORM
)
134 # Add your rules here if necessary...