File: Makefile

package info (click to toggle)
eclipse-titan 6.5.0-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 101,128 kB
  • sloc: cpp: 259,139; ansic: 47,560; yacc: 22,554; makefile: 14,074; sh: 12,630; lex: 9,101; xml: 5,362; java: 4,849; perl: 3,784; awk: 48; php: 32; python: 13
file content (156 lines) | stat: -rw-r--r-- 4,170 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
##############################################################################
# Copyright (c) 2000-2018 Ericsson Telecom AB
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v2.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
#
# Contributors:
#   Balasko, Jeno
#   Baranyi, Botond
#   Lovassy, Arpad
#   Szabados, Kristof
#
##############################################################################
# This Makefile was generated by the compiler
# of the TTCN-3 Test Executor version 1.5.pl1
# for Botond Baranyi (ebotbar) on Tue Apr 29 13:50:16 2014

# The following make commands are available:
# - make, make all       Builds the executable test suite.
# - make compile         Translates TTCN-3 and ASN.1 modules to C++.
# - make clean           Removes all generated files.
# - make dep             Creates/updates dependency list.
# - make archive         Archives all source files.

#
# Set these variables...
#

TOP := ../../
include   $(TOP)/Makefile.cfg


# The path of your TTCN-3 Test Executor installation:
# Uncomment this line to override the environment variable.
# TTCN3_DIR =

# Your platform: (SOLARIS, LINUX, FREEBSD or WIN32)
ifndef PLATFORM
PLATFORM = SOLARIS
endif

# Your C++ compiler:
#CXX = g++

# Flags for the C++ preprocessor (and makedepend as well):
CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)/include -I$(XMLDIR)/include/libxml2
ifdef RT2
CPPFLAGS += -DTITAN_RUNTIME_2
endif
ifeq ($(DEBUG), yes)
CPPFLAGS += -DMEMORY_DEBUG
endif

# Flags for the C++ compiler:
CXXFLAGS = -Wall

# Flags for the linker:
LDFLAGS =

# Flags for the TTCN-3 and ASN.1 compiler:
COMPILER_FLAGS = -L
ifdef RT2
COMPILER_FLAGS += -R
endif

# Execution mode: (either ttcn3 or ttcn3-parallel)
ifndef RT2
TTCN3_LIB = ttcn3
else
TTCN3_LIB = ttcn3-rt2
endif

# The path of your OpenSSL installation:
# If you do not have your own one, leave it unchanged.
OPENSSL_DIR = $(TTCN3_DIR)

# Directory to store the archived source files:
# Note: you can set any directory except ./archive
ARCHIVE_DIR = ./backup

#
# You may change these variables. Add your files if necessary...
#

# The TTCN-3 modules needed for this project:
TTCN3_MODULES = Temp.ttcn

# The ASN.1 modules needed for this project:
ASN1_MODULES =

# C++ source & header files generated by TTCN-3 & ASN.1 compilers:
GENERATED_SOURCES = Temp.cc
GENERATED_HEADERS = Temp.hh

# Source & header files of Test Ports and your other modules:
USER_SOURCES =
USER_HEADERS =

# All object files needed for the executable test suite:
OBJECTS = Temp.o

# The name of the executable test suite:
TARGET = Temp

ifdef COVERAGE
CPPFLAGS += -fprofile-arcs -ftest-coverage -g
CXXFLAGS += -fprofile-arcs -ftest-coverage -g
LDFLAGS += -fprofile-arcs -ftest-coverage -g -lgcov
endif

#
# Do not modify these unless you know what you are doing...
#
SOLARIS_LIBS = -lxnet -L$(XMLDIR)/lib -lxml2 -lcurses
SOLARIS8_LIBS = -lxnet -L$(XMLDIR)/lib -lxml2 -lnsl -lsocket -lresolv -lcurses
LINUX_LIBS = -L$(XMLDIR)/lib -lxml2 -lpthread -lrt -lncurses
FREEBSD_LIBS = -L$(XMLDIR)/lib -lxml2 -lncurses
WIN32_LIBS = -L$(XMLDIR)/lib -lxml2 -lncurses

#
# Rules for building the executable...
#
all: $(TARGET) ;

$(TARGET): $(OBJECTS)
	$(CXX) $(LDFLAGS) -o $@ $(OBJECTS) -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
	-L$(OPENSSL_DIR)/lib -lcrypto $($(PLATFORM)_LIBS)

.cc.o .c.o:
	$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $<

$(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
	@if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi

compile: $(TTCN3_MODULES) $(ASN1_MODULES)
	$(TTCN3_DIR)/bin/compiler $(COMPILER_FLAGS) $(TTCN3_MODULES) \
	$(ASN1_MODULES) - $?
	touch $@

clean:
	-$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
	$(GENERATED_SOURCES) compile *.log *.gcda *.gcno

dep: $(GENERATED_SOURCES)
	makedepend $(CPPFLAGS) $(USER_SOURCES) $(GENERATED_SOURCES)

archive:
	mkdir -p $(ARCHIVE_DIR)
	tar -cvhf - $(TTCN3_MODULES) $(ASN1_MODULES) \
	$(USER_HEADERS) $(USER_SOURCES) Makefile \
	| gzip >$(ARCHIVE_DIR)/$(TARGET)-`date '+%y%m%d-%H%M'`.tgz

#
# Add your rules here if necessary...
#