Debian Codegraph @

regression_test/logger/logcontrol/Makefile

raw symbols SCIP
1 ##############################################################################
2 # Copyright (c) 2000-2021 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 v2.0
5 # which accompanies this distribution, and is available at
6 # https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
7 #
8 # Contributors:
9 # Baji, Laszlo
10 # Balasko, Jeno
11 #
12 ##############################################################################
13 TOPDIR := ../../
14 include ${TOPDIR}/Makefile.regression
15
16 #
17 # Do NOT touch this line...
18 #
19 .PHONY: all archive check clean dep objects
20
21 .SUFFIXES: .d
22
23 #
24 # Set these variables...
25 #
26
27
28 # Flags for the C++ preprocessor (and makedepend as well):
29 CPPFLAGS += -I../../../core/loggerapi -I..
30
31 # Flags for dependency generation
32 CXXDEPFLAGS = -MM
33
34 # Flags for the C++ compiler: -Wall
35 #CXXFLAGS +=
36
37 # Flags for the linker:
38 #LDFLAGS +=
39
40 # Flags for the TTCN-3 and ASN.1 compiler:
41 ifeq ($(findstring -L,$(TTCN3_COMPILER)),)
42 # logfilecheck requires location info.
43 COMPILER_FLAGS += -L
44 endif
45
46 # Execution mode: (either ttcn3 or ttcn3-parallel)
47 TTCN3_LIB = ttcn3$(RT2_SUFFIX)$(DYNAMIC_SUFFIX)
48
49 #
50 # You may change these variables. Add your files if necessary...
51 #
52
53 # TTCN-3 modules of this project:
54 TTCN3_MODULES := Titan_LogControlTest.ttcn TitanLoggerControl.ttcn
55
56 # ASN.1 modules of this project:
57 ASN1_MODULES =
58
59 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
60 # this project:
61 GENERATED_SOURCES := $(TTCN3_MODULES:.ttcn=.cc) $(ASN1_MODULES:.asn=.cc)
62 GENERATED_HEADERS := $(GENERATED_SOURCES:.cc=.hh)
63
64 # C/C++ Source & header files of Test Ports, external functions and
65 # other modules:
66 USER_SOURCES :=
67 USER_HEADERS :=
68
69 GENERATED_OBJECTS := $(GENERATED_SOURCES:.cc=.o)
70
71 USER_OBJECTS := $(USER_SOURCES:.cc=.o)
72
73 # Object files of this project that are needed for the executable test suite:
74 OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS)
75
76 DEPFILES = $(USER_OBJECTS:.o=.d) $(GENERATED_OBJECTS:.o=.d)
77
78 # Other files of the project (Makefile, configuration files, etc.)
79 # that will be added to the archived source files:
80 OTHER_FILES = Makefile
81
82 # The name of the executable test suite:
83 TARGET = Titan_LogControlTest$(EXESUFFIX)
84
85 #
86 # Rules for building the executable...
87 #
88
89 all: $(TARGET) ;
90
91 objects: $(OBJECTS) ;
92
93 $(TARGET): $(OBJECTS)
94 $(TTCN3_DIR)/bin/titanver $(OBJECTS)
95 $(CXX) $(LDFLAGS) -o $@ $^ \
96 -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
97 -L$(OPENSSL_DIR)/lib -lcrypto \
98 -L$(XMLDIR)/lib $($(PLATFORM)_LIBS)
99
100 .cc.o .c.o:
101 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
102
103 .cc.d .c.d:
104 @echo Creating dependency file for '$<'; set -e; \
105 $(CXX) $(CXXDEPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $< \
106 | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
107 [ -s $@ ] || rm -f $@
108
109 $(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
110 @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi
111
112 compile: $(TTCN3_MODULES) $(ASN1_MODULES)
113 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
114 touch $@
115
116 clean:
117 -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
118 $(GENERATED_SOURCES) compile $(DEPFILES) \
119 tags *.log
120
121 distclean: clean
122 -$(RM) TitanLoggerControl.ttcn
123
124 dep: $(GENERATED_SOURCES) $(USER_SOURCES) ;
125
126 ifeq ($(findstring n,$(MAKEFLAGS)),)
127 ifeq ($(filter clean distclean check compile archive diag,$(MAKECMDGOALS)),)
128 -include $(DEPFILES)
129 endif
130 endif
131
132
133 diag:
134 $(TTCN3_DIR)/bin/compiler -v 2>&1
135 $(TTCN3_DIR)/bin/mctr_cli -v 2>&1
136 $(CXX) -v 2>&1 @echo TTCN3_DIR=$(TTCN3_DIR)
137 @echo OPENSSL_DIR=$(OPENSSL_DIR)
138 @echo XMLDIR=$(XMLDIR)
139 @echo PLATFORM=$(PLATFORM)
140
141 #
142 # Add your rules here if necessary...
143 #
144
145 run: $(TARGET) $(TARGET).cfg
146 rm -f *.log
147 ./$^
148
149 # files from the runtime
150 TitanLoggerControl.ttcn: ../../../core/TitanLoggerControl.ttcn
151 ln -s $< $@
152