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