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
14 ##############################################################################
16 include ..
/Makefile.regression
19 # Do NOT touch this line...
21 .PHONY
: all archive
check clean dep objects
26 # Set these variables...
30 # Flags for the C++ preprocessor (and makedepend as well):
31 CPPFLAGS
+= -I..
/..
/core
/loggerapi
-I..
33 # Flags for dependency generation
36 # Flags for the C++ compiler: -Wall
39 # Flags for the linker:
42 # Flags for the TTCN-3 and ASN.1 compiler:
43 ifeq ($(findstring -L
,$(TTCN3_COMPILER
)),)
44 # logfilecheck requires location info.
48 # Execution mode: (either ttcn3 or ttcn3-parallel)
49 TTCN3_LIB
= ttcn3
$(RT2_SUFFIX
)$(DYNAMIC_SUFFIX
)
52 # You may change these variables. Add your files if necessary...
55 # TTCN-3 modules of this project:
56 TTCN3_MODULES
:= logcontrol.ttcn TitanLoggerControl.ttcn
58 # ASN.1 modules of this project:
61 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
63 GENERATED_SOURCES
:= $(TTCN3_MODULES
:.ttcn
=.
cc) $(ASN1_MODULES
:.asn
=.
cc)
64 GENERATED_HEADERS
:= $(GENERATED_SOURCES
:.
cc=.hh
)
66 POSTFIXES
:= $(foreach file
, $(SPLIT_TO_SLICES
), $(addsuffix $(file
), _part_
))
67 POSTFIXES
:= $(foreach file
, $(POSTFIXES
), $(addprefix $(file
), .
cc))
68 GENERATED_SOURCES2
:= $(foreach file
, $(GENERATED_SOURCES
:.
cc=), $(addprefix $(file
), $(POSTFIXES
)))
69 GENERATED_SOURCES
+= $(GENERATED_SOURCES2
)
71 # C/C++ Source & header files of Test Ports, external functions and
76 GENERATED_OBJECTS
:= $(GENERATED_SOURCES
:.
cc=.o
)
78 USER_OBJECTS
:= $(USER_SOURCES
:.
cc=.o
)
80 # Object files of this project that are needed for the executable test suite:
81 OBJECTS
= $(GENERATED_OBJECTS
) $(USER_OBJECTS
)
83 DEPFILES
= $(USER_OBJECTS
:.o
=.d
) $(GENERATED_OBJECTS
:.o
=.d
)
85 # Other files of the project (Makefile, configuration files, etc.)
86 # that will be added to the archived source files:
87 OTHER_FILES
= Makefile
89 # The name of the executable test suite:
90 TARGET
= logcontrol
$(EXESUFFIX
)
93 # Rules for building the executable...
100 $(TARGET
): $(OBJECTS
)
101 $(TTCN3_DIR
)/bin
/titanver
$(OBJECTS
)
102 $(CXX
) $(LDFLAGS
) -o
$@
$^ \
103 -L
$(TTCN3_DIR
)/lib
-l
$(TTCN3_LIB
) \
104 -L
$(OPENSSL_DIR
)/lib
-lcrypto \
105 -L
$(XMLDIR
)/lib
$($(PLATFORM
)_LIBS
)
108 $(CXX
) -c
$(CPPFLAGS
) $(CXXFLAGS
) -o
$@
$<
111 @echo Creating dependency file for
'$<'; set
-e
; \
112 $(CXX
) $(CXXDEPFLAGS
) $(CPPFLAGS
) $(CXXFLAGS
) $< \
113 | sed
's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@
; \
114 [ -s
$@
] ||
rm -f
$@
116 $(GENERATED_SOURCES
) $(GENERATED_HEADERS
): compile
117 @if
[ ! -f
$@
]; then
$(RM
) compile
; $(MAKE
) compile
; fi
119 compile
: $(TTCN3_MODULES
) $(ASN1_MODULES
)
120 $(TTCN3_COMPILER
) $(COMPILER_FLAGS
) $^
- $?
124 -$(RM
) $(TARGET
) $(OBJECTS
) $(GENERATED_HEADERS
) \
125 $(GENERATED_SOURCES
) compile
$(DEPFILES
) \
129 -$(RM
) TitanLoggerControl.ttcn
131 dep
: $(GENERATED_SOURCES
) $(USER_SOURCES
) ;
133 ifeq ($(findstring n
,$(MAKEFLAGS
)),)
134 ifeq ($(filter clean distclean check compile archive diag
,$(MAKECMDGOALS
)),)
141 $(TTCN3_DIR
)/bin
/compiler
-v
2>&1
142 $(TTCN3_DIR
)/bin
/mctr_cli
-v
2>&1
143 $(CXX
) -v
2>&1 @echo TTCN3_DIR
=$(TTCN3_DIR
)
144 @echo OPENSSL_DIR
=$(OPENSSL_DIR
)
145 @echo XMLDIR
=$(XMLDIR
)
146 @echo PLATFORM
=$(PLATFORM
)
149 # Add your rules here if necessary...
152 run
: $(TARGET
) config.cfg
155 $(ABS_SRC
)/logfilecheck
157 # files from the runtime
158 TitanLoggerControl.ttcn
: ..
/..
/core
/TitanLoggerControl.ttcn