Update README.linux
[deliverable/titan.core.git] / function_test / BER_EncDec / Makefile
CommitLineData
970ed795
EL
1###############################################################################
2# Copyright (c) 2000-2014 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# uncomment this line to use alternative runtime (TITAN_RUNTIME_2)
9# RT2 = yes
10
11# This Makefile was generated by the compiler
12# of the TTCN-3 Test Executor version 1.4.pl5
13# for Matyas Hanko (ethmhk@duna61) on Mon Oct 6 16:26:18 2003
14
15# The following make commands are available:
16# - make, make all Builds the executable test suite.
17# - make compile Translates TTCN-3 and ASN.1 modules to C++.
18# - make clean Removes all generated files.
19# - make dep Creates/updates dependency list.
20# - make archive Archives all source files.
21
22#
23# Set these variables...
24#
25
26# The path of your TTCN-3 Test Executor installation:
27# Uncomment this line to override the environment variable.
28# TTCN3_DIR =
29
30# Your platform: (SOLARIS, LINUX, FREEBSD or WIN32)
31ifndef PLATFORM
32PLATFORM = SOLARIS
33endif
34
35# Your C++ compiler:
36CXX = g++
37
38XMLDIR = /mnt/TTCN/Tools/libxml2-2.7.1
39# Flags for the C++ preprocessor (and makedepend as well):
40CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)/include -I$(XMLDIR)/include/libxml2
41ifdef RT2
42CPPFLAGS += -DTITAN_RUNTIME_2
43endif
44
45# Flags for the C++ compiler:
46CXXFLAGS = -Wall
47
48# Flags for the linker:
49LDFLAGS =
50
51# Flags for the TTCN-3 and ASN.1 compiler:
52COMPILER_FLAGS = -L
53ifdef RT2
54COMPILER_FLAGS += -R
55endif
56
57# Execution mode: (either ttcn3 or ttcn3-parallel)
58ifndef RT2
59TTCN3_LIB = ttcn3
60else
61TTCN3_LIB = ttcn3-rt2
62endif
63
64
65# The path of your OpenSSL installation:
66# If you do not have your own one, leave it unchanged.
67OPENSSL_DIR = $(TTCN3_DIR)
68
69# Directory to store the archived source files:
70# Note: you can set any directory except ./archive
71ARCHIVE_DIR = ./backup
72
73#
74# You may change these variables. Add your files if necessary...
75#
76
77# The TTCN-3 modules needed for this project:
78TTCN3_MODULES = Temp.ttcn
79
80# The ASN.1 modules needed for this project:
81ASN1_MODULES = TempA.asn
82
83# C++ source & header files generated by TTCN-3 & ASN.1 compilers:
84GENERATED_SOURCES = Temp.cc TempA.cc
85GENERATED_HEADERS = Temp.hh TempA.hh
86
87# Source & header files of Test Ports and your other modules:
88USER_SOURCES =
89USER_HEADERS =
90
91# All object files needed for the executable test suite:
92OBJECTS = Temp.o TempA.o
93
94# The name of the executable test suite:
95TARGET = Temp
96
97ifdef COVERAGE
98CXXFLAGS += -fprofile-arcs -ftest-coverage -g
99LDFLAGS += -fprofile-arcs -ftest-coverage -g -lgcov
100endif
101
102#
103# Do not modify these unless you know what you are doing...
104#
105SOLARIS_LIBS = -lxnet -L$(XMLDIR)/lib -lxml2 -lresolv
106SOLARIS8_LIBS = -lxnet -L$(XMLDIR)/lib -lxml2 -lresolv -lnsl -lsocket
107LINUX_LIBS = -L$(XMLDIR)/lib -lxml2 -lpthread -lrt
108FREEBSD_LIBS = -L$(XMLDIR)/lib -lxml2
109WIN32_LIBS = -L$(XMLDIR)/lib -lxml2
110
111#
112# Rules for building the executable...
113#
114all: $(TARGET) ;
115
116$(TARGET): $(OBJECTS)
117 $(CXX) $(LDFLAGS) -o $@ $(OBJECTS) -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
118 -L$(OPENSSL_DIR)/lib -lcrypto $($(PLATFORM)_LIBS)
119
120.cc.o .c.o:
121 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $<
122
123$(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
124 @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi
125
126compile: $(TTCN3_MODULES) $(ASN1_MODULES)
127 $(TTCN3_DIR)/bin/compiler $(COMPILER_FLAGS) $(TTCN3_MODULES) \
128 $(ASN1_MODULES) - $?
129 touch $@
130
131clean:
132 -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
133 $(GENERATED_SOURCES) compile *.log *.gcda *.gcno
134
135dep: $(GENERATED_SOURCES)
136 makedepend $(CPPFLAGS) $(USER_SOURCES) $(GENERATED_SOURCES)
137
138archive:
139 mkdir -p $(ARCHIVE_DIR)
140 tar -cvhf - $(TTCN3_MODULES) $(ASN1_MODULES) \
141 $(USER_HEADERS) $(USER_SOURCES) Makefile \
142 | gzip >$(ARCHIVE_DIR)/$(TARGET)-`date '+%y%m%d-%H%M'`.tgz
143
This page took 0.030864 seconds and 5 git commands to generate.