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