implemented new code splitting mechanism (split to equal slices)
[deliverable/titan.core.git] / regression_test / iconv / Makefile
CommitLineData
d44e3c4f 1##############################################################################
2# Copyright (c) 2000-2016 Ericsson Telecom AB
970ed795
EL
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
d44e3c4f 7#
8# Contributors:
9# Baji, Laszlo
10# Balasko, Jeno
11# Raduly, Csaba
14e21cff 12# Szabo, Bence Janos
d44e3c4f 13#
14##############################################################################
970ed795
EL
15TOPDIR := ..
16include ../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
27# Flags for the C++ compiler:
28CXXFLAGS += -g
29
30# Flags for the linker:
31LDFLAGS += -g
32
33# Flags for the TTCN-3 and ASN.1 compiler:
34#COMPILER_FLAGS += -Lg
35
36# Execution mode: (either ttcn3 or ttcn3-parallel)
37TTCN3_LIB = ttcn3$(RT2_SUFFIX)$(DYNAMIC_SUFFIX)
38
39#
40# You may change these variables. Add your files if necessary...
41#
42
43# TTCN-3 modules of this project:
44TTCN3_MODULES = converter.ttcn convertest.ttcn
45
46# ASN.1 modules of this project:
47ASN1_MODULES =
48
49# C++ source & header files generated from the TTCN-3 & ASN.1 modules of
50# this project:
51GENERATED_SOURCES = $(TTCN3_MODULES:.ttcn=.cc) $(ASN1_MODULES:.asn=.cc)
52GENERATED_HEADERS = $(GENERATED_SOURCES:.cc=.hh)
53ifdef CODE_SPLIT
54GENERATED_SOURCES := $(foreach file, $(GENERATED_SOURCES:.cc=), $(addprefix $(file), .cc _seq.cc _set.cc _seqof.cc _setof.cc _union.cc))
14e21cff 55else ifdef SPLIT_TO_SLICES
56POSTFIXES := $(foreach file, $(SPLIT_TO_SLICES), $(addsuffix $(file), _part_))
57POSTFIXES := $(foreach file, $(POSTFIXES), $(addprefix $(file), .cc))
58GENERATED_SOURCES2 := $(foreach file, $(GENERATED_SOURCES:.cc=), $(addprefix $(file), $(POSTFIXES)))
59GENERATED_SOURCES += $(GENERATED_SOURCES2)
970ed795
EL
60endif
61
62# C/C++ Source & header files of Test Ports, external functions and
63# other modules:
64USER_SOURCES = iconver.cc
65USER_HEADERS = $(USER_SOURCES:.cc=.hh)
66
67# Object files of this project that are needed for the executable test suite:
68OBJECTS = $(GENERATED_SOURCES:.cc=.o) $(USER_SOURCES:.cc=.o)
69
70# Other files of the project (Makefile, configuration files, etc.)
71# that will be added to the archived source files:
72OTHER_FILES = Makefile
73
74# The name of the executable test suite:
75TARGET = convertest$(EXESUFFIX)
76
77#
78# Do not modify these unless you know what you are doing...
79# Platform specific additional libraries:
80# -lxml2 (and -lxnet on SOLARIS*) already there
81SOLARIS_LIBS += -lsocket -lnsl -lcrypto
82SOLARIS8_LIBS += -lsocket -lnsl -lcrypto
83LINUX_LIBS += -lcrypto
84FREEBSD_LIBS += -lcrypto -liconv
85WIN32_LIBS += -lcrypto -liconv
86INTERIX_LIBS += -L/usr/local/ssl/lib -lcrypto
87
88#
89# Rules for building the executable...
90#
91
92all: $(TARGET) ;
93
94objects: $(OBJECTS) ;
95
96# Don't bother with .o files
97$(TARGET): $(GENERATED_SOURCES) $(USER_SOURCES)
98 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ \
99 -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
100 -L$(XMLDIR)/lib -L$(OPENSSL_DIR)/lib $($(PLATFORM)_LIBS)
101
102$(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
103 @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi
104
105compile: $(TTCN3_MODULES) $(ASN1_MODULES)
106 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
107 touch $@
108
109clean distclean:
110 -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
111 $(GENERATED_SOURCES) compile \
112 tags *.log
113
114
115#
116# Add your rules here if necessary...
117#
118
119RUN := $(shell which colortitan 2>/dev/null)
120ifeq ($(firstword $(RUN)),no)
121# stupid /bin/which on Solaris writes errors to stdout instead of stderr
122RUN :=
123endif
124
125run: $(TARGET) config.cfg
126 $(RUN) ./$^
127
128vpath iconver.cc $(ABS_SRC)
129vpath %.ttcn $(ABS_SRC)
This page took 0.028618 seconds and 5 git commands to generate.