Debian Codegraph @

regression_test/CRTR00015758/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 # Raduly, Csaba
12 # Szabo, Bence Janos
13 #
14 ##############################################################################
15 TOPDIR := ..
16 include ../Makefile.regression
17
18 # WARNING! This Makefile can be used with GNU make only.
19 # Other versions of make may report syntax errors in it.
20
21 #
22 # Do NOT touch this line...
23 #
24 .PHONY: all archive check clean dep objects
25
26 .SUFFIXES: .d
27
28 #
29 # Set these variables...
30 #
31
32 #export LD_LIBRARY_PATH:=$(TTCN3_DIR)/lib:$(LD_LIBRARY_PATH)
33
34
35 # Flags for dependency generation
36 CXXDEPFLAGS = -MM
37
38 # Execution mode: (either ttcn3 or ttcn3-parallel)
39 TTCN3_LIB = ttcn3$(RT2_SUFFIX)-parallel$(DYNAMIC_SUFFIX)
40 #-dynamic
41
42 #
43 # You may change these variables. Add your files if necessary...
44 #
45
46 # TTCN-3 modules of this project:
47 TTCN3_MODULES = no.ttcn
48
49 # ASN.1 modules of this project:
50 ASN1_MODULES =
51
52 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
53 # this project:
54 GENERATED_SOURCES = $(TTCN3_MODULES:.ttcn=.cc) $(ASN1_MODULES:.asn=.cc)
55 GENERATED_HEADERS = $(GENERATED_SOURCES:.cc=.hh)
56 ifdef SPLIT_TO_SLICES
57 POSTFIXES := $(foreach file, $(SPLIT_TO_SLICES), $(addsuffix $(file), _part_))
58 POSTFIXES := $(foreach file, $(POSTFIXES), $(addprefix $(file), .cc))
59 GENERATED_SOURCES2 := $(foreach file, $(GENERATED_SOURCES:.cc=), $(addprefix $(file), $(POSTFIXES)))
60 GENERATED_SOURCES += $(GENERATED_SOURCES2)
61 endif
62 # C/C++ Source & header files of Test Ports, external functions and
63 # other modules:
64 USER_SOURCES =
65 USER_HEADERS = $(USER_SOURCES:.cc=.hh)
66
67 # Object files of this project that are needed for the executable test suite:
68 OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS)
69
70 GENERATED_OBJECTS = $(GENERATED_SOURCES:.cc=.o)
71
72 USER_OBJECTS = $(USER_SOURCES:.cc=.o)
73
74 DEPFILES = $(USER_OBJECTS:.o=.d) $(GENERATED_OBJECTS:.o=.d)
75
76 # Other files of the project (Makefile, configuration files, etc.)
77 # that will be added to the archived source files:
78 OTHER_FILES = Makefile logfilecheck $(wildcard *.cfg)
79
80 # The name of the executable test suite:
81 TARGET = no$(EXESUFFIX)
82
83
84 #
85 # Rules for building the executable...
86 #
87
88 all: $(TARGET) ;
89
90 objects: $(OBJECTS) ;
91
92 $(TARGET): $(GENERATED_SOURCES)
93 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ \
94 -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
95 -L$(OPENSSL_DIR)/lib -lcrypto \
96 -L$(XMLDIR)/lib $($(PLATFORM)_LIBS)
97
98 .cc.o .c.o:
99 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
100
101 .cc.d .c.d:
102 @echo Creating dependency file for '$<'; set -e; \
103 $(CXX) $(CXXDEPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $< \
104 | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
105 [ -s $@ ] || rm -f $@
106
107 $(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
108 @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi
109
110 compile: $(TTCN3_MODULES) $(ASN1_MODULES)
111 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
112 touch $@
113
114 clean distclean:
115 -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
116 $(GENERATED_SOURCES) compile $(DEPFILES) \
117 tags *.log
118
119 dep: $(GENERATED_SOURCES) $(USER_SOURCES) ;
120
121 ifeq ($(findstring n,$(MAKEFLAGS)),)
122 ifeq ($(filter clean distclean check compile archive diag,$(MAKECMDGOALS)),)
123 -include $(DEPFILES)
124 endif
125 endif
126
127
128 #
129 # Add your rules here if necessary...
130 #
131 IP := 127.0.0.1
132 run: $(TARGET)
133 # clear the field because logging is in append mode
134 -rm *.log
135 $(TTCN3_DIR)/bin/ttcn3_start no $(ABS_SRC)/config.cfg -ip ${IP}
136 $(TTCN3_DIR)/bin/ttcn3_start no $(ABS_SRC)/trouble.cfg
137 $(ABS_SRC)/logfilecheck