-
Kristof Szabados authored
Signed-off-by:
Kristof Szabados <Kristof.Szabados@ericsson.com>
Kristof Szabados authoredSigned-off-by:
Kristof Szabados <Kristof.Szabados@ericsson.com>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Makefile 4.50 KiB
##############################################################################
# Copyright (c) 2000-2019 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
# Kovacs, Ferenc
# Lovassy, Arpad
# Ormandi, Matyas
# Szabados, Kristof
#
##############################################################################
# This Makefile was generated by the Makefile Generator
# of the TTCN-3 Test Executor version 1.8.pl5
# for ekrisza (ekrisza@EVF4CE46994947) on Mon Jan 24 08:27:55 2011
# 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
.PHONY: run
# The path of your TTCN-3 Test Executor installation:
# Uncomment this line to override the environment variable.
# TTCN3_DIR =
# Your platform: (SOLARIS, SOLARIS8, 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...
#
# TTCN-3 modules of this project:
TTCN3_MODULES = Text_EncDec_1.ttcn Text_EncDec_2.ttcn Text_EncDec_3.ttcn Text_EncDec_4.ttcn
# ASN.1 modules of this project:
ASN1_MODULES =
# C++ source & header files generated by TTCN-3 & ASN.1 compilers:
GENERATED_SOURCES = Text_EncDec_1.cc Text_EncDec_2.cc Text_EncDec_3.cc Text_EncDec_4.cc
GENERATED_HEADERS = Text_EncDec_1.hh Text_EncDec_2.hh Text_EncDec_3.hh Text_EncDec_4.hh
# Source & header files of Test Ports and your other modules:
USER_SOURCES =
USER_HEADERS =
# Object files of this project that are needed for the executable test suite:
OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS)
GENERATED_OBJECTS = Text_EncDec_1.o Text_EncDec_2.o Text_EncDec_3.o Text_EncDec_4.o
USER_OBJECTS =
# The name of the executable test suite:
TARGET = Text_EncDec.exe
ifeq ($(COVERAGE), yes)
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 -lresolv -lcurses
SOLARIS8_LIBS = -lxnet -L$(XMLDIR)/lib -lxml2 -lresolv -lnsl -lsocket -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 $@
run: $(TARGET) Text_EncDec.cfg
./$^
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...
#