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
13 ##############################################################################
15 include ..
/..
/Makefile.regression
17 # WARNING! This Makefile can be used with GNU make only.
18 # Other versions of make may report syntax errors in it.
21 # Do NOT touch this line...
23 .PHONY
: all archive
check clean dep objects
28 # Set these variables...
31 # Flags for dependency generation
34 ifeq ($(PLATFORM
), WIN32
)
35 # Silence linker warnings.
36 # Overridden by Makefile.cfg
39 # Flags for the TTCN-3 and ASN.1 compiler:
42 # Execution mode: (either ttcn3 or ttcn3-parallel)
43 TTCN3_LIB
= ttcn3
$(RT2_SUFFIX
)$(DYNAMIC_SUFFIX
)
47 # You may change these variables. Add your files if necessary...
50 # TTCN-3 modules of this project:
51 TTCN3_MODULES
= General_Types.ttcn SGsAP_Types.ttcn HN25015.ttcn
53 # ASN.1 modules of this project:
56 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
58 GENERATED_SOURCES
= $(TTCN3_MODULES
:.ttcn
=.
cc) $(ASN1_MODULES
:.asn
=.
cc)
59 GENERATED_HEADERS
= $(GENERATED_SOURCES
:.
cc=.hh
)
61 # C/C++ Source & header files of Test Ports, external functions and
64 USER_HEADERS
= $(USER_SOURCES
:.
cc=.hh
)
66 # Object files of this project that are needed for the executable test suite:
67 OBJECTS
= $(GENERATED_OBJECTS
) $(USER_OBJECTS
)
69 GENERATED_OBJECTS
= $(GENERATED_SOURCES
:.
cc=.o
)
71 USER_OBJECTS
= $(USER_SOURCES
:.
cc=.o
)
73 DEPFILES
= $(USER_OBJECTS
:.o
=.d
) $(GENERATED_OBJECTS
:.o
=.d
)
76 # The name of the executable test suite:
77 TARGET
= HN25015
$(RT2_SUFFIX
)$(EXESUFFIX
)
80 # Rules for building the executable...
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
) $^
- $?
112 -$(RM
) $(TARGET
) $(OBJECTS
) $(GENERATED_HEADERS
) \
113 $(GENERATED_SOURCES
) compile
$(DEPFILES
) \
120 dep
: $(GENERATED_SOURCES
) $(USER_SOURCES
) ;
122 ifeq ($(findstring n
,$(MAKEFLAGS
)),)
123 ifeq ($(filter clean distclean check compile archive diag
,$(MAKECMDGOALS
)),)
131 $(TTCN3_COMPILER
) -v
2>&1
132 $(TTCN3_DIR
)/bin
/mctr_cli
-v
2>&1
134 @echo TTCN3_DIR
=$(TTCN3_DIR
)
135 @echo OPENSSL_DIR
=$(OPENSSL_DIR
)
136 @echo XMLDIR
=$(XMLDIR
)
137 @echo PLATFORM
=$(PLATFORM
)
140 # Add your rules here if necessary...
143 run
: $(TARGET
) .
/config.cfg