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
12 ##############################################################################
14 include ..
/..
/Makefile.regression
16 # WARNING! This Makefile can be used with GNU make only.
17 # Other versions of make may report syntax errors in it.
20 # Do NOT touch this line...
22 .PHONY
: all archive
check clean dep objects
27 # Set these variables...
30 # Flags for the C++ preprocessor (and makedepend as well):
33 # Flags for dependency generation
36 # Flags for the C++ compiler:
39 # Flags for the linker:
42 # Flags for the TTCN-3 and ASN.1 compiler:
45 # Execution mode: (either ttcn3 or ttcn3-parallel)
46 TTCN3_LIB
= ttcn3
$(RT2_SUFFIX
)$(DYNAMIC_SUFFIX
)
49 # You may change these variables. Add your files if necessary...
52 # TTCN-3 modules of this project:
53 TTCN3_MODULES
= AbstractBlock.ttcn
55 # ASN.1 modules of this project:
58 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
60 GENERATED_SOURCES
= $(TTCN3_MODULES
:.ttcn
=.
cc) $(ASN1_MODULES
:.asn
=.
cc)
61 GENERATED_HEADERS
= $(GENERATED_SOURCES
:.
cc=.hh
)
63 # C/C++ Source & header files of Test Ports, external functions and
66 USER_HEADERS
= $(USER_SOURCES
:.
cc=.hh
)
68 # Object files of this project that are needed for the executable test suite:
69 OBJECTS
= $(GENERATED_OBJECTS
) $(USER_OBJECTS
)
71 GENERATED_OBJECTS
= $(GENERATED_SOURCES
:.
cc=.o
)
73 USER_OBJECTS
= $(USER_SOURCES
:.
cc=.o
)
75 DEPFILES
= $(USER_OBJECTS
:.o
=.d
) $(GENERATED_OBJECTS
:.o
=.d
)
77 # Other files of the project (Makefile, configuration files, etc.)
78 # that will be added to the archived source files:
79 OTHER_FILES
= Makefile
81 # The name of the executable test suite:
82 TARGET
= AbstractBlock
85 # Rules for building the executable...
90 objects
: $(OBJECTS
) compile
;
93 if
$(CXX
) $(LDFLAGS
) -o
$@
$^ \
94 -L
$(TTCN3_DIR
)/lib
-l
$(TTCN3_LIB
) \
95 -L
$(OPENSSL_DIR
)/lib
-lcrypto \
96 -L
$(XMLDIR
)/lib
$($(PLATFORM
)_LIBS
); \
97 then
: ; else $(TTCN3_DIR
)/bin
/titanver
$(OBJECTS
); exit
1; fi
100 $(CXX
) -c
$(CPPFLAGS
) $(CXXFLAGS
) -o
$@
$<
103 @echo Creating dependency file for
'$<'; set
-e
; \
104 $(CXX
) $(CXXDEPFLAGS
) $(CPPFLAGS
) $(CXXFLAGS
) $< \
105 | sed
's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@
; \
106 [ -s
$@
] ||
rm -f
$@
108 $(GENERATED_SOURCES
) $(GENERATED_HEADERS
): compile
109 @if
[ ! -f
$@
]; then
$(RM
) compile
; $(MAKE
) compile
; fi
111 compile
: $(TTCN3_MODULES
) $(ASN1_MODULES
)
112 $(TTCN3_COMPILER
) $(COMPILER_FLAGS
) $^
- $?
116 -$(RM
) $(TARGET
) $(OBJECTS
) $(GENERATED_HEADERS
) \
117 $(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
)),)
129 $(TTCN3_COMPILER
) -v
2>&1
130 $(TTCN3_DIR
)/bin
/mctr_cli
-v
2>&1
132 @echo TTCN3_DIR
=$(TTCN3_DIR
)
133 @echo OPENSSL_DIR
=$(OPENSSL_DIR
)
134 @echo XMLDIR
=$(XMLDIR
)
135 @echo PLATFORM
=$(PLATFORM
)
138 # Add your rules here if necessary...