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