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
21 # Flags for the C++ preprocessor (and makedepend as well):
24 # Flags for dependency generation
27 # Flags for the C++ compiler:
30 # Flags for the linker:
33 # Flags for the TTCN-3 and ASN.1 compiler:
36 # Execution mode: (either ttcn3 or ttcn3-parallel)
37 TTCN3_LIB
= ttcn3
$(RT2_SUFFIX
)$(DYNAMIC_SUFFIX
)
40 # You may change these variables. Add your files if necessary...
43 # TTCN-3 modules of this project:
44 TTCN3_MODULES
= $(wildcard HS16977
*.ttcn
)
46 # ASN.1 modules of this project:
49 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
51 GENERATED_SOURCES
= $(TTCN3_MODULES
:.ttcn
=.
cc) $(ASN1_MODULES
:.asn
=.
cc)
52 GENERATED_HEADERS
= $(GENERATED_SOURCES
:.
cc=.hh
)
54 # C/C++ Source & header files of Test Ports, external functions and
57 USER_HEADERS
= $(USER_SOURCES
:.
cc=.hh
)
59 # Object files of this project that are needed for the executable test suite:
60 OBJECTS
= $(GENERATED_OBJECTS
) $(USER_OBJECTS
)
62 GENERATED_OBJECTS
= $(GENERATED_SOURCES
:.
cc=.o
)
64 USER_OBJECTS
= $(USER_SOURCES
:.
cc=.o
)
66 DEPFILES
= $(USER_OBJECTS
:.o
=.d
) $(GENERATED_OBJECTS
:.o
=.d
)
68 # Other files of the project (Makefile, configuration files, etc.)
69 # that will be added to the archived source files:
70 OTHER_FILES
= Makefile
72 # The name of the executable test suite:
73 TARGET
= HS16977
$(EXESUFFIX
)
77 # Rules for building the executable...
82 objects
: $(OBJECTS
) compile
;
85 if
$(CXX
) $(LDFLAGS
) -o
$@
$^ \
86 -L
$(TTCN3_DIR
)/lib
-l
$(TTCN3_LIB
) \
87 -L
$(OPENSSL_DIR
)/lib
-lcrypto \
88 -L
$(XMLDIR
)/lib
$($(PLATFORM
)_LIBS
); \
89 then
: ; else $(TTCN3_DIR
)/bin
/titanver
$(OBJECTS
); exit
1; fi
92 $(CXX
) -c
$(CPPFLAGS
) $(CXXFLAGS
) -o
$@
$<
95 @echo Creating dependency file for
'$<'; set
-e
; \
96 $(CXX
) $(CXXDEPFLAGS
) $(CPPFLAGS
) $(CXXFLAGS
) $< \
97 | sed
's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@
; \
100 $(GENERATED_SOURCES
) $(GENERATED_HEADERS
): compile
101 @if
[ ! -f
$@
]; then
$(RM
) compile
; $(MAKE
) compile
; fi
103 compile
: $(TTCN3_MODULES
) $(ASN1_MODULES
)
104 $(TTCN3_COMPILER
) $(COMPILER_FLAGS
) $^
- $?
108 -$(RM
) $(TARGET
) $(OBJECTS
) $(GENERATED_HEADERS
) \
109 $(GENERATED_SOURCES
) compile
$(DEPFILES
) \
112 dep
: $(GENERATED_SOURCES
) $(USER_SOURCES
) ;
114 ifeq ($(findstring n
,$(MAKEFLAGS
)),)
115 ifeq ($(filter clean distclean check compile archive diag
,$(MAKECMDGOALS
)),)
121 $(TTCN3_DIR
)/bin
/compiler
-v
2>&1
122 $(TTCN3_DIR
)/bin
/mctr_cli
-v
2>&1
124 @echo TTCN3_DIR
=$(TTCN3_DIR
)
125 @echo OPENSSL_DIR
=$(OPENSSL_DIR
)
126 @echo XMLDIR
=$(XMLDIR
)
127 @echo PLATFORM
=$(PLATFORM
)
130 # Add your rules here if necessary...