Permalink
Browse files

Added mips.openwrt_linux and mipsel.openwrt_linux for corss-compiling

OpenSplice DDS for OpenWRT targets
  • Loading branch information...
eugene
eugene committed Aug 27, 2018
1 parent f87cf10 commit b6c57da0f76e7ecbc37036bbb1113307758f109d
View
@@ -32,3 +32,8 @@ Execute bin/build.sparc.solaris8 from within the top level source directory.
To build all target releases the script bin/build.all is available.
Execute bin/build.all from within the top level source directory.
For OpenWRT targets ensure that:
- appropriate toolchain binaries (mips-openwrt-linux-* or mipsel-openwrt-linux-* )
are found on the PATH
- STAGING_DIR points to OpenWRT SDK's staging_dir
View
@@ -2,6 +2,8 @@
# supported targets
# sparc.solaris8 SPARC sun4 Solaris8 target
# x86.linux x86 linux (linux 2.4 with NPTL or greater) target
# mips.openwrt_linux MIPS OpenWRT
# mipsel.openwrt_linux MIPSel OpenWRT (little-endian MIPS)
#
# supported builds
# -dev for development (not optimized, debug option on, symbolic debugging)
@@ -0,0 +1,17 @@
# "Standard" features we don't build for this platform.
set_var INCLUDE_API_DLRL_SACPP no
set_var INCLUDE_CS no
set_var INCLUDE_DBT_API_DCPS_SACS no
set_var INCLUDE_API_DCPS_SACS no
set_var INCLUDE_ORB no
set_var INCLUDE_TOOLS_DCG no
set_var INCLUDE_API_DLRL no
set_var INCLUDE_DBT_API_DLRL_SAJ no
set_var INCLUDE_DBT_API_DLRL_SACPP no
set_var INCLUDE_DBT_API_DLRL no
set_var INCLUDE_API_DCPS_CCPP no
set_var INCLUDE_DBT_API_DCPS_CCPP no
set_var INCLUDE_API_STREAMS_CCPP no
set_undefined_var INCLUDE_API_DCPS_ISOCPP yes
set_undefined_var INCLUDE_API_DCPS_ISOCPP2 yes
@@ -0,0 +1,17 @@
# "Standard" features we don't build for this platform.
set_var INCLUDE_API_DLRL_SACPP no
set_var INCLUDE_CS no
set_var INCLUDE_DBT_API_DCPS_SACS no
set_var INCLUDE_API_DCPS_SACS no
set_var INCLUDE_ORB no
set_var INCLUDE_TOOLS_DCG no
set_var INCLUDE_API_DLRL no
set_var INCLUDE_DBT_API_DLRL_SAJ no
set_var INCLUDE_DBT_API_DLRL_SACPP no
set_var INCLUDE_DBT_API_DLRL no
set_var INCLUDE_API_DCPS_CCPP no
set_var INCLUDE_DBT_API_DCPS_CCPP no
set_var INCLUDE_API_STREAMS_CCPP no
set_undefined_var INCLUDE_API_DCPS_ISOCPP yes
set_undefined_var INCLUDE_API_DCPS_ISOCPP2 yes
@@ -0,0 +1,46 @@
. "$OSPL_HOME/bin/checkconf"
if [ "$SPLICE_HOST" = "" ]
then
SPLICE_HOST=x86_64.linux-release
fi
SPLICE_TARGET=mips.openwrt_linux-release
export SPLICE_HOST SPLICE_TARGET
SPLICE_TARGET_FULL=mipsel.openwrt_linux-release
export SPLICE_TARGET_FULL
CROSS_COMPILE=mips-openwrt-linux-
export CROSS_COMPILE
set_var CROSS_COMPILE mips-openwrt-linux-
echo
ERRS=0
gcc_check || ERRS=1
make_check || ERRS=1
gawk_check || ERRS=1
bison_check || ERRS=1
flex_check || ERRS=1
gsoap_check || ERRS=1
javac_check || ERRS=1
gmcs_check || ERRS=1
if [ "$CROSS" != "1" ]
then
tao_check || ERRS=1
jacorb_check || ERRS=1
fi
protoc_check || ERRS=1
c99_check || ERRS=1
if [ -z $REPORT ]
then
if [ "$ERRS" = "0" ]
then
echo Configuration OK
CONFIGURATION=OK
else
echo Configuration Invalid
CONFIGURATION=INVALID
fi
export CONFIGURATION
cleanup_checks
fi
@@ -0,0 +1,46 @@
. "$OSPL_HOME/bin/checkconf"
if [ "$SPLICE_HOST" = "" ]
then
SPLICE_HOST=x86_64.linux-release
fi
SPLICE_TARGET=mipsel.openwrt_linux-release
export SPLICE_HOST SPLICE_TARGET
SPLICE_TARGET_FULL=mipsel.openwrt_linux-release
export SPLICE_TARGET_FULL
CROSS_COMPILE=mipsel-openwrt-linux-
export CROSS_COMPILE
set_var CROSS_COMPILE mipsel-openwrt-linux-
echo
ERRS=0
gcc_check || ERRS=1
make_check || ERRS=1
gawk_check || ERRS=1
bison_check || ERRS=1
flex_check || ERRS=1
gsoap_check || ERRS=1
javac_check || ERRS=1
gmcs_check || ERRS=1
if [ "$CROSS" != "1" ]
then
tao_check || ERRS=1
jacorb_check || ERRS=1
fi
protoc_check || ERRS=1
c99_check || ERRS=1
if [ -z $REPORT ]
then
if [ "$ERRS" = "0" ]
then
echo Configuration OK
CONFIGURATION=OK
else
echo Configuration Invalid
CONFIGURATION=INVALID
fi
export CONFIGURATION
cleanup_checks
fi
@@ -0,0 +1,152 @@
PROC = mips1
OS = linux
OS_REV =
CC = $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++
CSC = gmcs
# Binary used for linking
LD_SO = $(CC)
# Binary used for linking executables
LD_EXE = $(CC)
LD_CXX = $(CXX)
# GNU yacc
YACC = bison
# GNU lex
LEX = flex
# GNU make
MAKE = make
# native touch
TOUCH = touch
# Tool used for creating soft/hard links.
LN = ln
# Archiving
AR = $(CROSS_COMPILE)ar
AR_CMDS = rv
# preprocessor
MAKEDEPFLAGS = -M
CPP = $(CROSS_COMPILE)gcc
GCPP = $(CROSS_COMPILE)g++ -E
# gcov
GCOV = gcov
#Javac
JCC = javac
JCFLAGS_JACORB = -endorseddirs "$(JACORB_HOME)/lib/endorsed"
JACORB_INC =
ifdef JAVA_COMPATJAR
ifneq (,$(JAVA_COMPATJAR))
JCFLAGS_COMPAT = -source 1.6 -target 1.6 -bootclasspath "$(JAVA_COMPATJAR)"
endif
endif
#JAR
JAR = jar
#JAVAH
JAVAH = javah
JAVAH_FLAGS = -force
#Java
JAVA = java
JAVA_SRCPATH_SEP = :
JAVA_LDFLAGS = -L"$(JAVA_HOME)/jre/lib/i386"
JAVA_LDFLAGS += -L"$(JAVA_HOME)/jre/lib/i386/client"
JAVA_LDFLAGS += -L"$(JAVA_HOME)/jre/lib/i386/native_threads"
JAVA_INCLUDE = -I"$(JAVA_HOME)/include"
JAVA_INCLUDE += -I"$(JAVA_HOME)/include/linux"
#soapcpp
SOAPCPP = soapcpp2
# Identify compiler flags for building shared libraries
SHCFLAGS = -fPIC
# Values of compiler flags can be overruled
#CFLAGS_OPT += -DNDEBUG
#CFLAGS_DEBUG += -g -D_TYPECHECK_
CFLAGS_STRICT = -Wall -W -pedantic -Wno-long-long
ifneq ($(TARGETSYSROOT),)
SYSROOTFLAGS=--sysroot=$(TARGETSYSROOT)
else
SYSROOTFLAGS=
endif
# Set compiler options
CFLAGS = -pipe -std=c99 -DNO_EXECINFO_H $(CFLAGS_OPT) $(CFLAGS_DEBUG) $(CFLAGS_STRICT) $(MTCFLAGS) -I$(ZLIB_HOME)/include $(SYSROOTFLAGS)
CXXFLAGS = -pipe -std=c++11 $(CFLAGS_OPT) $(CINCS) $(CFLAGS_DEBUG) $(MTCFLAGS)
CSFLAGS = -noconfig -nowarn:1701,1702 -warn:4 $(CSFLAGS_DEBUG) -optimize-
# For Linux, this version supports symbolic names instead of IP addresses
CFLAGS += -DDO_HOST_BY_NAME
# Set CPP flags
CPPFLAGS = -DOSPL_ENV_$(SPECIAL) -D_GNU_SOURCE $(SYSROOTFLAGS)
ifeq (,$(wildcard /etc/gentoo-release))
CPPFLAGS += -D_XOPEN_SOURCE=500
endif
# For isocpp2 use c++11 compiler option
ifeq ($(GCC_SUPPORTS_CPLUSPLUS11),1)
ISOCPP2_CXX_FLAGS=-std=c++0x
endif
# Disable licensing because RLM not available on ARM
CPPFLAGS += -DOSPL_NO_LICENSING
CFLAGS += -DOSPL_NO_LICENSING
# Set compiler options for multi threaded process
# notify usage of posix threads
MTCFLAGS = -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
# Set linker options
LDFLAGS = -L$(SPLICE_LIBRARY_PATH) $(SYSROOTFLAGS)
# Identify linker options for building shared libraries
SHLDFLAGS = -shared -fPIC
# Set library context
LDLIBS = -lc -lm -lpthread -lrt -ldl
# Set library context for building shared libraries
SHLDLIBS =
# Set component specific libraries that are platform dependent
LDLIBS_CXX = -lstdc++
LDLIBS_NW =
LDLIBS_OS = -lrt -ldl -lm
LDLIBS_CMS =
LDLIBS_JAVA = -ljvm -ljava -lverify -lhpi
LDLIBS_ODBC= -lodbc
#set platform specific pre- and postfixes for the names of libraries and executables
OBJ_POSTFIX = .o
SLIB_PREFIX = lib
SLIB_POSTFIX = .a
DLIB_PREFIX = lib
DLIB_POSTFIX = .so
EXEC_PREFIX =
EXEC_POSTFIX =
EXEC_LD_POSTFIX =
INLINESRC_POSTFIX = .i
CSLIB_PREFIX =
CSLIB_POSTFIX = .dll
CSMOD_PREFIX =
CSMOD_POSTFIX = .netmodule
CSEXEC_PREFIX =
CSEXEC_POSTFIX = .exe
CSDBG_PREFIX =
CSEXEC_DBG_POSTFIX = .exe.mdb
CSMOD_DBG_POSTFIX = .netmodule.mdb
CSLIB_DBG_POSTFIX = .dll.mdb
CS_LIBPATH_SEP = ,
# Identify linker options for building shared C# libraries and or executables.
CSTARGET_LIB = -target:library
CSTARGET_MOD = -t:module
CSTARGET_EXEC = -target:exe
@@ -0,0 +1 @@
include $(OSPL_HOME)/setup/mips.linux_cross-common.mak
@@ -0,0 +1,25 @@
SPECIAL = RELEASE
ifeq ($(FORCE_DEBUG_SYMBOLS), no)
# Compiler flags
CFLAGS_OPT = -O3 -fno-strict-aliasing
CFLAGS_DEBUG = -DNDEBUG
JCFLAGS = -g -nowarn
#Csc compiler flags
CSFLAGS_DEBUG =
else
# Basically the release setting so it builds the core in release mode
# but also remove optimization and add debug symbols
CFLAGS_OPT = -O0
CFLAGS_DEBUG = -g
JCFLAGS = -g
#Csc compiler flags
CSFLAGS_DEBUG =
endif
ifdef OSPL_OUTER_HOME
include $(OSPL_OUTER_HOME)/setup/mips.openwrt_linux-default.mak
else
include $(OSPL_HOME)/setup/mips.openwrt_linux-default.mak
endif
@@ -0,0 +1 @@
include $(OSPL_HOME)/setup/mips.linux_cross-common.mak
@@ -0,0 +1,27 @@
ifeq ($(FORCE_DEBUG_SYMBOLS), no)
# Compiler flags
CFLAGS_OPT = -O1 -fno-strict-aliasing
CFLAGS_DEBUG = -DNDEBUG
JCFLAGS = -g -nowarn
#Csc compiler flags
CSFLAGS_DEBUG =
else
# Basically the release setting so it builds the core in release mode
# but also remove optimization and add debug symbols
CFLAGS_OPT = -O0
CFLAGS_DEBUG = -g
JCFLAGS = -g
#Csc compiler flags
CSFLAGS_DEBUG =
endif
SPECIAL = RELEASE
ifdef OSPL_OUTER_HOME
include $(OSPL_OUTER_HOME)/setup/mipsel.openwrt_linux-default.mak
else
include $(OSPL_HOME)/setup/mipsel.openwrt_linux-default.mak
endif

0 comments on commit b6c57da

Please sign in to comment.