implemented new code splitting mechanism (split to equal slices)
[deliverable/titan.core.git] / regression_test / implicitOmit / Makefile
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
7 #
8 # Contributors:
9 #
10 # Baji, Laszlo
11 # Balasko, Jeno
12 # Baranyi, Botond
13 # Raduly, Csaba
14 # Szabo, Bence Janos
15 #
16 ##############################################################################
17 TOPDIR := ..
18 include ../Makefile.regression
19
20 # WARNING! This Makefile can be used with GNU make only.
21 # Other versions of make may report syntax errors in it.
22
23 #
24 # Do NOT touch this line...
25 #
26 .PHONY: all archive check clean distclean dep objects
27
28 .SUFFIXES: .d
29
30 #
31 # Set these variables...
32 #
33
34 # Flags for dependency generation
35 CXXDEPFLAGS = -MM
36
37 #COMPILER_FLAGS +=
38
39 # Execution mode: (either ttcn3 or ttcn3-parallel)
40 TTCN3_LIB = ttcn3$(RT2_SUFFIX)$(DYNAMIC_SUFFIX)
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 = io.ttcn
48
49 # ASN.1 modules of this project:
50 ASN1_MODULES = IOAsn.asn
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
79
80 # The name of the executable test suite:
81 TARGET = io
82
83 #
84 # Do not modify these unless you know what you are doing...
85 # Platform specific additional libraries:
86 #
87 SOLARIS_LIBS += -lsocket -lnsl -lxml2
88 SOLARIS8_LIBS += -lsocket -lnsl -lxml2
89 LINUX_LIBS += -lxml2
90 FREEBSD_LIBS += -lxml2
91 WIN32_LIBS += -lxml2
92
93 #
94 # Rules for building the executable...
95 #
96
97 all: $(TARGET) ;
98
99 objects: $(OBJECTS) ;
100
101 $(TARGET): $(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) \
106 || $(TTCN3_DIR)/bin/titanver $(OBJECTS)
107
108 .cc.o .c.o:
109 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
110
111 .cc.d .c.d:
112 @echo Creating dependency file for '$<'; set -e; \
113 $(CXX) $(CXXDEPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $< \
114 | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
115 [ -s $@ ] || rm -f $@
116
117 $(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
118 @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi
119
120 compile: $(TTCN3_MODULES) $(ASN1_MODULES)
121 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
122 touch $@
123
124 clean:
125 -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
126 $(GENERATED_SOURCES) compile $(DEPFILES) \
127 tags *.log
128
129 distclean: clean
130 $(RM) $(DEPFILES)
131
132 dep: $(GENERATED_SOURCES) $(USER_SOURCES) ;
133
134 ifeq ($(findstring n,$(MAKEFLAGS)),)
135 ifeq ($(filter clean distclean check compile archive diag,$(MAKECMDGOALS)),)
136 -include $(DEPFILES)
137 endif
138 endif
139
140 diag:
141 $(TTCN3_DIR)/bin/compiler -v 2>&1
142 $(TTCN3_DIR)/bin/mctr_cli -v 2>&1
143 $(CXX) -v 2>&1
144 @echo TTCN3_DIR=$(TTCN3_DIR)
145 @echo OPENSSL_DIR=$(OPENSSL_DIR)
146 @echo XMLDIR=$(XMLDIR)
147 @echo PLATFORM=$(PLATFORM)
148
149 #
150 # Add your rules here if necessary...
151 #
152
153 run: $(TARGET) config.cfg
154 ./$^
155
This page took 0.033332 seconds and 5 git commands to generate.