[vlmc-devel] [PATCH] Initialized autotools build system.
Paweł Wegner
pawel.wegner95 at gmail.com
Thu Apr 28 18:07:34 CEST 2016
---
Makefile.am | 2 ++
configure.ac | 15 +++++++++++++++
src/ICloudStorage.cpp | 15 +++++++++++++++
src/ICloudStorage.h | 16 ++++++++++++++++
src/Makefile.am | 6 ++++++
test/Makefile.am | 5 +++++
test/main.cpp | 6 ++++++
7 files changed, 65 insertions(+)
create mode 100644 Makefile.am
create mode 100644 configure.ac
create mode 100644 src/ICloudStorage.cpp
create mode 100644 src/ICloudStorage.h
create mode 100644 src/Makefile.am
create mode 100644 test/Makefile.am
create mode 100644 test/main.cpp
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..a7d191e
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,2 @@
+ACLOCAL_AMFLAGS = -I m4
+SUBDIRS = src test
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..290d69f
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,15 @@
+AC_INIT([libcloudstorage], [1.0])
+AM_INIT_AUTOMAKE([foreign subdir-objects])
+AC_CONFIG_MACRO_DIRS([m4])
+LT_INIT
+
+AC_PROG_CC
+AC_PROG_CXX
+
+AC_CONFIG_FILES([
+ Makefile
+ src/Makefile
+ test/Makefile
+])
+
+AC_OUTPUT
diff --git a/src/ICloudStorage.cpp b/src/ICloudStorage.cpp
new file mode 100644
index 0000000..0cb7b46
--- /dev/null
+++ b/src/ICloudStorage.cpp
@@ -0,0 +1,15 @@
+#include "ICloudStorage.h"
+
+#include <cstdio>
+#include <vector>
+
+namespace cloudstorage {
+
+ICloudStorage::ICloudStorage() {
+ for (int t : std::vector<int>(5, 4)) printf("%d\n", t); // C++11 test
+ printf("ICloudStorage!\n");
+}
+
+ICloudStorage::~ICloudStorage() {}
+
+}; // namespace cloudstorage
diff --git a/src/ICloudStorage.h b/src/ICloudStorage.h
new file mode 100644
index 0000000..d31bd63
--- /dev/null
+++ b/src/ICloudStorage.h
@@ -0,0 +1,16 @@
+#ifndef ICLOUDSTORAGE_H
+#define ICLOUDSTORAGE_H
+
+namespace cloudstorage {
+
+class ICloudStorage {
+ public:
+ ICloudStorage();
+ virtual ~ICloudStorage();
+
+ private:
+};
+
+} // namespace cloudstorage
+
+#endif // ICLOUDSTORAGE_H
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..d5dd7ac
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,6 @@
+ACLOCAL_AMFLAGS = -I m4
+
+AM_CXXFLAGS = -std=c++11
+
+lib_LTLIBRARIES = libcloudstorage.la
+libcloudstorage_la_SOURCES = ICloudStorage.cpp
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644
index 0000000..3be1db5
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1,5 @@
+AM_LDFLAGS = $(top_srcdir)/src/libcloudstorage.la
+AM_CXXFLAGS = -I$(top_srcdir)/src -std=c++11
+
+bin_PROGRAMS = main
+main_SOURCES = main.cpp
diff --git a/test/main.cpp b/test/main.cpp
new file mode 100644
index 0000000..e75b175
--- /dev/null
+++ b/test/main.cpp
@@ -0,0 +1,6 @@
+#include <ICloudStorage.h>
+
+int main() {
+ cloudstorage::ICloudStorage obj;
+ return 0;
+}
--
2.7.4
More information about the Vlmc-devel
mailing list