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