summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2016-10-19 07:50:28 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2016-10-31 13:46:41 -0500
commit73b776bd8cc603bdebab4b76b25a19fa9e2a5f39 (patch)
tree0773171d37a8c269e20fccd34b5ce753e8a750cb
parentc35cad29e87aa54fcc64a63b7bcfa8414127ac9c (diff)
downloadphosphor-inventory-manager-73b776bd8cc603bdebab4b76b25a19fa9e2a5f39.tar.gz
phosphor-inventory-manager-73b776bd8cc603bdebab4b76b25a19fa9e2a5f39.zip
Application stub and build rules
Create a basic autoconf setup. Change-Id: I3135aded1be79ca552b564b2575be7a20fad0285 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
-rw-r--r--Makefile.am4
-rw-r--r--README.md10
-rw-r--r--app.cpp25
-rwxr-xr-xbootstrap.sh18
-rw-r--r--configure.ac23
5 files changed, 80 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..3c1e3c8
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,4 @@
+sbin_PROGRAMS = phosphor-inventory
+
+phosphor_inventory_SOURCES = \
+ app.cpp
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..5318177
--- /dev/null
+++ b/README.md
@@ -0,0 +1,10 @@
+## To Build
+```
+To build this package, do the following steps:
+
+ 1. ./bootstrap.sh
+ 2. ./configure ${CONFIGURE_FLAGS}
+ 3. make
+
+To full clean the repository again run `./bootstrap.sh clean`.
+```
diff --git a/app.cpp b/app.cpp
new file mode 100644
index 0000000..bcef3eb
--- /dev/null
+++ b/app.cpp
@@ -0,0 +1,25 @@
+/**
+ * Copyright © 2016 IBM Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <cstdlib>
+
+int main(int argc, char *argv[])
+{
+ // TOOD
+
+ exit(EXIT_SUCCESS);
+}
+
+// vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
diff --git a/bootstrap.sh b/bootstrap.sh
new file mode 100755
index 0000000..50b75b7
--- /dev/null
+++ b/bootstrap.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+AUTOCONF_FILES="Makefile.in aclocal.m4 ar-lib autom4te.cache compile \
+ config.guess config.h.in config.sub configure depcomp install-sh \
+ ltmain.sh missing *libtool test-driver"
+
+case $1 in
+ clean)
+ test -f Makefile && make maintainer-clean
+ for file in ${AUTOCONF_FILES}; do
+ find -name "$file" | xargs -r rm -rf
+ done
+ exit 0
+ ;;
+esac
+
+autoreconf -i
+echo 'Run "./configure ${CONFIGURE_FLAGS} && make"'
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..4496633
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,23 @@
+# Initialization
+AC_PREREQ([2.69])
+AC_INIT([phosphor-inventory-manager], [1.0], [https://github.com/openbmc/phosphor-inventory-manager/issues])
+AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz])
+AM_SILENT_RULES([yes])
+
+# Checks for programs.
+AC_PROG_CXX
+AM_PROG_AR
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+
+# Checks for typedefs, structures, and compiler characteristics.
+AX_CXX_COMPILE_STDCXX_14([noext])
+AX_APPEND_COMPILE_FLAGS([-fpic -Wall -Werror], [CXXFLAGS])
+
+# Checks for library functions.
+LT_INIT # Removes 'unrecognized options: --with-libtool-sysroot'
+
+# Create configured output
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
OpenPOWER on IntegriCloud