Commit 38244c35 authored by József Gyürüsi's avatar József Gyürüsi Committed by Lenard Nagy
Browse files

[internal #0] makefile update patch to add -e -N to COMPILER_FLAGS to support new titan versions



Change-Id: I21ff013601b4095bf27b9e29adcf284874626b10
Signed-off-by: József Gyürüsi's avatarJózsef Gyürüsi <jozsef.gyurusi@ericsson.com>
parent 44c261fb
......@@ -7,6 +7,9 @@
#// which accompanies this distribution, and is available at //
#// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
#///////////////////////////////////////////////////////////////////////////////
# if -e or -N compiler flag is supported, it is needed
comm_base_dir=`dirname $0`
sed -e '
s/SOLARIS8_LIBS = -lsocket -lnsl/SOLARIS8_LIBS = -lsocket -lnsl -lresolv/g
' <$1 >$2
' <$1 | "$comm_base_dir/../Variable/makefile_patch_compiler_flags.sh" >$2
......@@ -8,10 +8,12 @@
#// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
#///////////////////////////////////////////////////////////////////////////////
# if -e or -N compiler flag is supported, it is needed
comm_base_dir=`dirname $0`
sed -e '
s/SOLARIS_LIBS = -lsocket -lnsl/SOLARIS_LIBS = -lsocket -lnsl -lkstat -lpthread -lresolv -lrt -lpcap -lutil/g
s/SOLARIS8_LIBS = -lsocket -lnsl/SOLARIS8_LIBS = -lsocket -lnsl -lkstat -lpthread -lresolv -lrt -lpcap -lutil/g
s/LINUX_LIBS =/LINUX_LIBS = -lpthread -lpcap -lutil/g
s/WIN32_LIBS =/WIN32_LIBS = -lpthread -lpcap -lutil/g
s/COMPILER_FLAGS = -L/COMPILER_FLAGS = -L -w/g
' <$1 >$2
' <$1 | "$comm_base_dir/../Variable/makefile_patch_compiler_flags.sh" >$2
......@@ -7,6 +7,9 @@
#// which accompanies this distribution, and is available at //
#// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
#///////////////////////////////////////////////////////////////////////////////
# if -e or -N compiler flag is supported, it is needed
comm_base_dir=`dirname $0`
sed -e '
s/CPPFLAGS = .*/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -DNO_IPV6/g
s/SOLARIS_LIBS = -lsocket -lnsl/SOLARIS_LIBS = -lsocket -lnsl -lkstat -lpthread -lrt/g
......@@ -14,4 +17,4 @@ s/SOLARIS8_LIBS = -lsocket -lnsl/SOLARIS8_LIBS = -lsocket -lnsl -lkstat -lpthrea
s/LINUX_LIBS =/LINUX_LIBS = -lpthread -lutil/g
s/WIN32_LIBS =/WIN32_LIBS = -lpthread/g
s/FREEBSD_LIBS =/FREEBSD_LIBS = -lpthread/g
' <$1 >$2
' <$1 | "$comm_base_dir/../Variable/makefile_patch_compiler_flags.sh" >$2
......@@ -8,6 +8,8 @@
#// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
#///////////////////////////////////////////////////////////////////////////////
# if -e or -N compiler flag is supported, it is needed
comm_base_dir=`dirname $0`
sed -e '
s/CPPFLAGS = .*/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -DNO_IPV6 -DEPTF_DEBUG/g
s/CPPFLAGS_TTCN3 =/CPPFLAGS_TTCN3 = -DEPTF_DEBUG/g
......@@ -27,4 +29,4 @@ a\
a\
# End of additional rules for DPMG
}
' <$1 >$2
' <$1 | "$comm_base_dir/../Variable/makefile_patch_compiler_flags.sh" >$2
......@@ -8,10 +8,12 @@
#// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
#///////////////////////////////////////////////////////////////////////////////
# if -e or -N compiler flag is supported, it is needed
comm_base_dir=`dirname $0`
sed -e '
s/CPPFLAGS = .*/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -DNO_IPV6/g
s/SOLARIS_LIBS = -lsocket -lnsl/SOLARIS_LIBS = -lsocket -lnsl -lkstat -lpthread -lrt/g
s/SOLARIS8_LIBS = -lsocket -lnsl/SOLARIS8_LIBS = -lsocket -lnsl -lkstat -lpthread -lrt -lresolv/g
s/LINUX_LIBS =/LINUX_LIBS = -lpthread -lutil/g
s/WIN32_LIBS =/WIN32_LIBS = -lpthread -lutil/g
' <$1 >$2
' <$1 | "$comm_base_dir/../Variable/makefile_patch_compiler_flags.sh" >$2
......@@ -7,4 +7,7 @@
#// which accompanies this distribution, and is available at //
#// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
#///////////////////////////////////////////////////////////////////////////////
sed -e 's/LINUX_LIBS =/LINUX_LIBS = -lutil/g' <$1 >$2
# if -e or -N compiler flag is supported, it is needed
comm_base_dir=`dirname $0`
sed -e 's/LINUX_LIBS =/LINUX_LIBS = -lutil/g' <$1 | "$comm_base_dir/../Variable/makefile_patch_compiler_flags.sh" >$2
......@@ -7,4 +7,8 @@
#// which accompanies this distribution, and is available at //
#// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
#///////////////////////////////////////////////////////////////////////////////
sed -e 's/LINUX_LIBS =/LINUX_LIBS = -lutil/g' <$1 >$2
# if -e or -N compiler flag is supported, it is needed
comm_base_dir=`dirname $0`
sed -e '
s/LINUX_LIBS =/LINUX_LIBS = -lutil/g' <$1 | "$comm_base_dir/../Variable/makefile_patch_compiler_flags.sh" >$2
......@@ -8,10 +8,12 @@
#// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
#///////////////////////////////////////////////////////////////////////////////
# if -e or -N compiler flag is supported, it is needed
comm_base_dir=`dirname $0`
sed -e '
s/CPPFLAGS = .*/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -DNO_IPV6/g
s/SOLARIS_LIBS = -lsocket -lnsl/SOLARIS_LIBS = -lsocket -lnsl -lkstat -lpthread -lrt/g
s/SOLARIS8_LIBS = -lsocket -lnsl/SOLARIS8_LIBS = -lsocket -lnsl -lkstat -lpthread -lrt -lresolv/g
s/LINUX_LIBS =/LINUX_LIBS = -lpthread -lutil/g
s/WIN32_LIBS =/WIN32_LIBS = -lpthread/g
' <$1 >$2
' <$1 | "$comm_base_dir/../Variable/makefile_patch_compiler_flags.sh" >$2
......@@ -8,8 +8,8 @@
#// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
#///////////////////////////////////////////////////////////////////////////////
# if -e or -N compiler flag is supported, it is needed
comm_base_dir=`dirname $0`
sed -e '
s/CPPFLAGS = .*/CPPFLAGS = -DEPTF_DEBUG -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I$(OPENSSL_DIR)\/include -DNO_IPV6 -DLKSCTP_1_0_9 -DUSE_SCTP/g
s/CPPFLAGS_TTCN3 =/CPPFLAGS_TTCN3 = -DEPTF_DEBUG/g
......@@ -20,7 +20,7 @@ s/OPENSSL_DIR = $(TTCN3_DIR)/OPENSSL_DIR = \/mnt\/projects\/TTCN\/Tools\/openssl
s/LINUX_LIBS =/LINUX_LIBS = -lpcap -lutil/g
s/SOLARIS_LIBS =/SOLARIS_LIBS = -lnsl -lxml2 -lresolv -lpcap/g
' <$1 >$2
' <$1 | "$comm_base_dir/../Variable/makefile_patch_compiler_flags.sh" >$2
......
......@@ -7,6 +7,9 @@
#// which accompanies this distribution, and is available at //
#// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
#///////////////////////////////////////////////////////////////////////////////
# if -e or -N compiler flag is supported, it is needed
comm_base_dir=`dirname $0`
sed -e '
s/CPPFLAGS = .*/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -DNO_IPV6/g
s/SOLARIS_LIBS = -lsocket -lnsl/SOLARIS_LIBS = -lsocket -lnsl -lkstat -lpthread -lrt/g
......@@ -14,4 +17,4 @@ s/SOLARIS8_LIBS = -lsocket -lnsl/SOLARIS8_LIBS = -lsocket -lnsl -lkstat -lpthrea
s/LINUX_LIBS =/LINUX_LIBS = -lpthread -lutil/g
s/WIN32_LIBS =/WIN32_LIBS = -lpthread/g
s/FREEBSD_LIBS =/FREEBSD_LIBS = -lpthread/g
' <$1 >$2
' <$1 | "$comm_base_dir/../Variable/makefile_patch_compiler_flags.sh" >$2
......@@ -8,8 +8,8 @@
#// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
#///////////////////////////////////////////////////////////////////////////////
# if -e or -N compiler flag is supported, it is needed
comm_base_dir=`dirname $0`
sed -e '
s/CPPFLAGS = .*/CPPFLAGS = -DEPTF_DEBUG -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I$(OPENSSL_DIR)\/include -DNO_IPV6 -DLKSCTP_1_0_9 -DUSE_SCTP/g
s/CPPFLAGS_TTCN3 =/CPPFLAGS_TTCN3 = -DEPTF_DEBUG/g
......@@ -20,7 +20,7 @@ s/OPENSSL_DIR = $(TTCN3_DIR)/OPENSSL_DIR = \/mnt\/projects\/TTCN\/Tools\/openssl
s/LINUX_LIBS =/LINUX_LIBS = -lpcap -lutil/g
s/SOLARIS_LIBS =/SOLARIS_LIBS = -lnsl -lxml2 -lresolv -lpcap/g
' <$1 >$2
' <$1 | "$comm_base_dir/../Variable/makefile_patch_compiler_flags.sh" >$2
......
#!/bin/bash
#///////////////////////////////////////////////////////////////////////////////
#// Copyright (c) 2000-2021 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 //
#///////////////////////////////////////////////////////////////////////////////
# if -e or -N compiler flag is supported, it is needed
TTCN_COMPILER_SUPPORTS_E="$(compiler --help 2>&1 | grep "\-e:")"
TTCN_COMPILER_SUPPORTS_N="$(compiler --help 2>&1 | grep "\-N:")"
if [[ "$TTCN_COMPILER_SUPPORTS_E" != "" ]]
then
TTCN_COMPILER_SUPPORTS_E='-e'
fi
if [[ "$TTCN_COMPILER_SUPPORTS_N" != "" ]]
then
TTCN_COMPILER_SUPPORTS_N='-N'
fi
SED_CMD="s/COMPILER_FLAGS =/COMPILER_FLAGS = $TTCN_COMPILER_SUPPORTS_E $TTCN_COMPILER_SUPPORTS_N/g"
sed -e "$SED_CMD"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment