Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

*~
*.a
*.o
*.log
*.trs
*.out
*.gcno
*.gcda
*.pc
*.generated
*.sublime-project

.cproject
.project
.settings/
.deps/

ci-*

generated/
autom4te.cache/
aclocal.m4
compile
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
depcomp
install-sh
libtool
ltmain.sh
missing
stamp-h1
test-driver
Makefile
Makefile.in

build/
9 changes: 0 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ if test -z "$SHA1SUM_TOOL";
then AC_MSG_WARN([sha1sum not found - install it with apt-get install or via the systems package manager])
fi

# From https://nerdland.net/2009/07/detecting-c-libraries-with-autotools
AC_CHECK_LIB([gtest_main], [main],
[HAVE_GTEST=1] [GTEST_LIBS="$TEST_LIBS -lgtest -lpthread -lgtest_main"],
AC_MSG_WARN([libgtest is not installed.]))

if test -z "$HAVE_GTEST";
then PKG_CHECK_MODULES([GTEST], [gtest-1.6.0], [HAVE_GTEST_PKG=1])
fi

AC_CONFIG_HEADERS([config.h])
AC_PROG_CXX
LT_INIT([static])
Expand Down
24 changes: 24 additions & 0 deletions topbuild.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

[project]
id = padtec.proj.CStructGen

[resources]
[[padtec.fw.rsc.toolchain.gnu.x86_64.1]]
type = toolchain

[[padtec.fw.rsc.toolchain.padlinux]]
type = toolchain

# target debug-test is not working
[build]
type = shell
targets = release,

[install]
output = build/dist
bin = bin/*,

[components]

[[padtec.fw.rsc.build.cmake.common]]
version = 1.0.3
46 changes: 46 additions & 0 deletions topbuild/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash
HERE=$(dirname "$(readlink "$1" -f)")
BUILD_TARGET=$1
SRC_DIR=${HERE}/../${PROGNAME}
OUTPUT_DIR=$HERE/../build/dist/$BUILD_TARGET
BUILD_DIR=$HERE/../build/$TOPBUILD_RESOURCES_TOOLCHAIN_NAME/$BUILD_TARGET
TOOLCHAIN_BIN_PREFIX=${TOPBUILD_REFS_TOOLCHAIN}/bin/${TOPBUILD_RESOURCES_TOOLCHAIN_PREFIX}

AUTOMAKE_OUTPUT_DIR=${HERE}/../automake/build/dist/$BUILD_TARGET

if [ -z "${BUILD_TARGET}" ]; then
echo "No target specified"
exit 0
fi

if [ -z "$PKG_CONFIG_PATH" ]; then
echo "No PKG_CONFIG_PATH specified!"
#exit 0
fi

export CC=${CC:=${TOOLCHAIN_BIN_PREFIX}gcc}
export CXX=${CXX:=${TOOLCHAIN_BIN_PREFIX}g++}
export AR=${AR:=${TOOLCHAIN_BIN_PREFIX}ar}
export LDFLAGS+=" -L${TOPBUILD_REFS_TOOLCHAIN}/../../lib"
export CPPFLAGS+=" -I${TOPBUILD_REFS_TOOLCHAIN}/include"
export PATH=${TOPBUILD_REFS_TOOLCHAIN}/bin:$PATH

export CPQD_VERSION_CONTROL=0.0.0
export CPQD_VERSION_BRANCH_COMP=master

if [ "${BUILD_TARGET}" == "release" ]; then
if [ "${TOPBUILD_RESOURCES_TOOLCHAIN_NAME}" == "padtec.fw.rsc.toolchain.gnu.x86_64.1" ] ||
[ "${TOPBUILD_RESOURCES_TOOLCHAIN_NAME}" == "padtec.fw.rsc.toolchain.padlinux" ]; then
cd ..

mkdir -p ${OUTPUT_DIR}

if [ "${TOPBUILD_RESOURCES_TOOLCHAIN_NAME}" == "padtec.fw.rsc.toolchain.padlinux" ]; then
HOST_FLAG="--host=i586-padtec-linux"
fi

./autogen.sh --prefix=${OUTPUT_DIR} ${HOST_FLAG}

make install
fi
fi
7 changes: 7 additions & 0 deletions topbuild/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

HERE=$(dirname "$(readlink "$0" -f)")
cd ..
rm -rf build
make clean
#${TOPBUILD_REFS_RESOURCES}/padtec.fw.rsc.build.cmake.common/scripts/clean.py $0 $*
22 changes: 22 additions & 0 deletions topbuild/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh
set -e

ID=$TOPBUILD_COMPONENT_ID
ROOT=$TOPBUILD_COMPONENT_ROOT
TARGET=$TOPBUILD_COMPONENT_TARGET
DIST=$ROOT/build/dist/$TARGET

if [ ! -d "$DIST" ]; then
echo -e "\t---"
echo -e "\tComponent $ID has to be built."
echo -e "\t---"
exit 1
fi

# Prepares dest dir
DEST=$TOPBUILD_COMPONENT_INSTALL_PATH/opt/padtec
DEST_BIN=$DEST/bin
DEST_LIB=$DEST/lib
DEST_ETC=$DEST/etc/$ID
DEST_PKGS=$DEST/pkgs/$ID
install -d $DEST $DEST_BIN