summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2011-06-23 21:55:03 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2011-06-24 14:44:00 +0200
commite2e1b8debb889ddeaae669e5fcfedadbc2d383e4 (patch)
treea537f84de375700f79e111539ce44a39ad96541e
parent62f081828221741fb945927ae85c496c431c9f84 (diff)
downloadmxs-utils-e2e1b8debb889ddeaae669e5fcfedadbc2d383e4.tar.gz
mxs-utils-e2e1b8debb889ddeaae669e5fcfedadbc2d383e4.tar.xz
add autotools build-system
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--Makefile.am149
-rwxr-xr-xautogen.sh22
-rw-r--r--configure.ac62
3 files changed, 233 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..c9a2965
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,149 @@
+
+AM_CXXFLAGS = \
+ -D$(shell uname -s) \
+ -I${srcdir}/elftosb2 \
+ -I${srcdir}/keygen \
+ -I${srcdir}/sbtool \
+ -I${srcdir}/common
+
+lib_LTLIBRARIES = \
+ libelftosb.la
+
+libelftosb_la_SOURCES = \
+ common/AESKey.cpp \
+ common/Blob.cpp \
+ common/crc.cpp \
+ common/DataSource.cpp \
+ common/DataTarget.cpp \
+ common/ELFSourceFile.cpp \
+ common/EncoreBootImage.cpp \
+ common/EvalContext.cpp \
+ common/GHSSecInfo.cpp \
+ common/GlobMatcher.cpp \
+ common/HexValues.cpp \
+ common/Logging.cpp \
+ common/Operation.cpp \
+ common/OptionDictionary.cpp \
+ common/options.cpp \
+ common/OutputSection.cpp \
+ common/Random.cpp \
+ common/RijndaelCBCMAC.cpp \
+ common/rijndael.cpp \
+ common/SHA1.cpp \
+ common/SourceFile.cpp \
+ common/SRecordSourceFile.cpp \
+ common/stdafx.cpp \
+ common/StELFFile.cpp \
+ common/StExecutableImage.cpp \
+ common/StSRecordFile.cpp \
+ common/Value.cpp \
+ common/Version.cpp \
+ common/format_string.cpp \
+ common/ExcludesListMatcher.cpp \
+ common/SearchPath.cpp \
+ common/DataSourceImager.cpp \
+ common/IVTDataSource.cpp
+
+libelftosb_la_LDFLAGS = \
+ -Wl,-no-undefined
+
+bin_PROGRAMS = \
+ bin/elftosb \
+ bin/sbtool \
+ bin/keygen \
+ bin/encryptgpk
+
+bin_elftosb_LDADD = libelftosb.la
+bin_elftosb_SOURCES = \
+ elftosb2/BootImageGenerator.cpp \
+ elftosb2/ConversionController.cpp \
+ elftosb2/ElftosbAST.cpp \
+ elftosb2/elftosb.cpp \
+ elftosb2/elftosb_lexer.cpp \
+ elftosb2/ElftosbLexer.cpp \
+ elftosb2/elftosb_parser.tab.cpp \
+ elftosb2/EncoreBootImageGenerator.cpp
+
+bin_sbtool_LDADD = libelftosb.la
+bin_sbtool_SOURCES = \
+ sbtool/EncoreBootImageReader.cpp \
+ sbtool/sbtool.cpp
+
+bin_keygen_LDADD = libelftosb.la
+bin_keygen_SOURCES = \
+ keygen/keygen.cpp
+
+bin_encryptgpk_LDADD = libelftosb.la
+bin_encryptgpk_SOURCES = \
+ encryptgpk/encryptgpk.cpp
+
+noinst_HEADERS = \
+ common/ExcludesListMatcher.h \
+ common/format_string.h \
+ common/OptionDictionary.h \
+ common/EncoreBootImage.h \
+ common/Operation.h \
+ common/DataSourceImager.h \
+ common/Value.h \
+ common/Logging.h \
+ common/StExecutableImage.h \
+ common/int_size.h \
+ common/IVTDataSource.h \
+ common/rijndael.h \
+ common/GlobMatcher.h \
+ common/Version.h \
+ common/StringMatcher.h \
+ common/ELF.h \
+ common/GHSSecInfo.h \
+ common/smart_ptr.h \
+ common/SRecordSourceFile.h \
+ common/SHA1.h \
+ common/stdafx.h \
+ common/ELFSourceFile.h \
+ common/StSRecordFile.h \
+ common/DataTarget.h \
+ common/OutputSection.h \
+ common/SearchPath.h \
+ common/RijndaelCBCMAC.h \
+ common/Blob.h \
+ common/AESKey.h \
+ common/options.h \
+ common/OptionContext.h \
+ common/DataSource.h \
+ common/HexValues.h \
+ common/Random.h \
+ common/SourceFile.h \
+ common/BootImage.h \
+ common/EvalContext.h \
+ common/EndianUtilities.h \
+ common/StELFFile.h \
+ common/crc.h \
+ elftosb2/FlexLexer.h \
+ elftosb2/ElftosbLexer.h \
+ elftosb2/EncoreBootImageGenerator.h \
+ elftosb2/BootImageGenerator.h \
+ elftosb2/ConversionController.h \
+ elftosb2/ElftosbErrors.h \
+ elftosb2/ElftosbAST.h \
+ elftosb2/elftosb_parser.tab.hpp \
+ sbtool/EncoreBootImageReader.h
+
+EXTRA_DIST = \
+ elftosb2/Doxyfile \
+ keygen/Doxyfile \
+ sbtool/Doxyfile \
+ elftosb2/elftosb_lexer.l \
+ elftosb2/elftosb_parser.y \
+ bdfiles/basic_test_cmd.e \
+ bdfiles/complex.bd \
+ bdfiles/habtest.bd \
+ bdfiles/simple.e \
+ bdfiles/test_cmd.e \
+ COPYING \
+ README \
+ ReadMe.txt \
+ autogen.sh
+
+CLEANFILES = \
+ -r bin
+
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..647182a
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+#
+# usage:
+#
+# banner <target name>
+#
+banner() {
+ echo
+ TG=`echo $1 | sed -e "s,/.*/,,g"`
+ LINE=`echo $TG |sed -e "s/./-/g"`
+ echo $LINE
+ echo $TG
+ echo $LINE
+ echo
+}
+
+banner "autoreconf"
+
+autoreconf --force --install -Wall || exit $?
+
+banner "Finished"
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..590513f
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,62 @@
+AC_PREREQ(2.59)
+
+AC_INIT([mxs-utils], 0000.00.0, [bugs@pengutronix.de])
+AC_CONFIG_SRCDIR([elftosb2/elftosb.cpp])
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+
+AM_MAINTAINER_MODE
+AM_SILENT_RULES([yes])
+
+CXXFLAGS="${CXXFLAGS} -W -Wall"
+
+#
+# libtool library versioning stuff
+#
+# Library code modified: REVISION++
+# Interfaces changed/added/removed: CURRENT++ REVISION=0
+# Interfaces added: AGE++
+# Interfaces removed: AGE=0
+LT_CURRENT=0
+LT_REVISION=0
+LT_AGE=0
+AC_SUBST(LT_CURRENT)
+AC_SUBST(LT_REVISION)
+AC_SUBST(LT_AGE)
+LT_INIT()
+
+
+#
+# Checks for programs.
+#
+AC_PROG_CXX
+
+AM_INIT_AUTOMAKE([foreign no-exeext dist-bzip2])
+
+
+#
+# Debugging
+#
+AC_MSG_CHECKING([whether to enable debugging])
+AC_ARG_ENABLE(debug,
+ AS_HELP_STRING([--enable-debug], [enable debugging @<:@default=yes@:>@]),
+ [case "$enableval" in
+ y | yes) CONFIG_DEBUG=yes ;;
+ *) CONFIG_DEBUG=no ;;
+ esac],
+ [CONFIG_DEBUG=yes])
+AC_MSG_RESULT([${CONFIG_DEBUG}])
+if test "${CONFIG_DEBUG}" = "yes"; then
+ CXXFLAGS="${CXXFLAGS} -Werror -Wsign-compare -Wfloat-equal -Wformat-security -Wno-unknown-pragmas -g -O1"
+else
+ CXXFLAGS="${CXXFLAGS} -O2 -DNDEBUG"
+fi
+AC_SUBST(CONFIG_DEBUG)
+
+
+AC_CONFIG_FILES([
+ Makefile
+])
+
+AC_OUTPUT
+