Debian Codegraph @

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