summaryrefslogtreecommitdiff
path: root/schulung_tools/linking/helloat
diff options
context:
space:
mode:
Diffstat (limited to 'schulung_tools/linking/helloat')
-rw-r--r--schulung_tools/linking/helloat/.gitignore15
-rw-r--r--schulung_tools/linking/helloat/AUTHORS0
-rw-r--r--schulung_tools/linking/helloat/ChangeLog0
-rw-r--r--schulung_tools/linking/helloat/Makefile.am20
-rw-r--r--schulung_tools/linking/helloat/NEWS0
-rw-r--r--schulung_tools/linking/helloat/README4
-rwxr-xr-xschulung_tools/linking/helloat/autogen.sh2
-rw-r--r--schulung_tools/linking/helloat/configure.ac25
-rw-r--r--schulung_tools/linking/helloat/func1.c6
-rw-r--r--schulung_tools/linking/helloat/func2.c6
-rw-r--r--schulung_tools/linking/helloat/hello.c12
11 files changed, 90 insertions, 0 deletions
diff --git a/schulung_tools/linking/helloat/.gitignore b/schulung_tools/linking/helloat/.gitignore
new file mode 100644
index 0000000..9984288
--- /dev/null
+++ b/schulung_tools/linking/helloat/.gitignore
@@ -0,0 +1,15 @@
+Makefile.in
+aclocal.m4
+autom4te.cache/
+compile
+config.guess
+config.h.in
+config.h.in~
+config.log
+config.status
+config.sub
+configure
+depcomp
+install-sh
+ltmain.sh
+missing
diff --git a/schulung_tools/linking/helloat/AUTHORS b/schulung_tools/linking/helloat/AUTHORS
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/schulung_tools/linking/helloat/AUTHORS
diff --git a/schulung_tools/linking/helloat/ChangeLog b/schulung_tools/linking/helloat/ChangeLog
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/schulung_tools/linking/helloat/ChangeLog
diff --git a/schulung_tools/linking/helloat/Makefile.am b/schulung_tools/linking/helloat/Makefile.am
new file mode 100644
index 0000000..6dccd03
--- /dev/null
+++ b/schulung_tools/linking/helloat/Makefile.am
@@ -0,0 +1,20 @@
+bin_PROGRAMS = hello hello2
+
+hello_SOURCES = hello.c
+hello_LDFLAGS = -lfunc
+hello2_SOURCES = hello.c
+hello2_LDFLAGS = -static -lfunc
+
+lib_LTLIBRARIES = libfunc.la
+# 1) If the library source code has changed at all since the last update, then
+# increment revision ("c:r:a" becomes "c:r+1:a").
+# 2) If any interfaces have been added, removed, or changed since the last
+# update, increment current, and set revision to 0.
+# 3) If any interfaces have been added since the last public release,
+# then increment age.
+# 4) If any interfaces have been removed or changed since the last public
+# release, then set age to 0.
+libfunc_la_LDFLAGS = -release @PACKAGE_VERSION@ -version-info 0:0:0
+libfunc_la_SOURCES = func1.c func2.c
+
+ACLOCAL_AMFLAGS = '-I m4'
diff --git a/schulung_tools/linking/helloat/NEWS b/schulung_tools/linking/helloat/NEWS
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/schulung_tools/linking/helloat/NEWS
diff --git a/schulung_tools/linking/helloat/README b/schulung_tools/linking/helloat/README
new file mode 100644
index 0000000..14ffe6a
--- /dev/null
+++ b/schulung_tools/linking/helloat/README
@@ -0,0 +1,4 @@
+./autogen.sh
+./configure --prefix=/usr
+make
+make install DESTDIR=/tmp/test
diff --git a/schulung_tools/linking/helloat/autogen.sh b/schulung_tools/linking/helloat/autogen.sh
new file mode 100755
index 0000000..27fbc8e
--- /dev/null
+++ b/schulung_tools/linking/helloat/autogen.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+autoreconf -sif
diff --git a/schulung_tools/linking/helloat/configure.ac b/schulung_tools/linking/helloat/configure.ac
new file mode 100644
index 0000000..b412589
--- /dev/null
+++ b/schulung_tools/linking/helloat/configure.ac
@@ -0,0 +1,25 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT([hello], [1.0], [manut@linutronix.de])
+AC_CONFIG_SRCDIR([func1.c])
+AC_CONFIG_HEADERS([config.h])
+
+AM_INIT_AUTOMAKE
+LT_INIT
+
+# Checks for programs.
+AC_PROG_CC
+
+
+# Checks for libraries.
+
+# Checks for header files.
+
+# Checks for typedefs, structures, and compiler characteristics.
+
+# Checks for library functions.
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/schulung_tools/linking/helloat/func1.c b/schulung_tools/linking/helloat/func1.c
new file mode 100644
index 0000000..ab006bd
--- /dev/null
+++ b/schulung_tools/linking/helloat/func1.c
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+void func1(void)
+{
+ printf("Hello from %s!\n", __func__);
+}
diff --git a/schulung_tools/linking/helloat/func2.c b/schulung_tools/linking/helloat/func2.c
new file mode 100644
index 0000000..9dc05ab
--- /dev/null
+++ b/schulung_tools/linking/helloat/func2.c
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+void func2(void)
+{
+ printf("Hello from %s!\n", __func__);
+}
diff --git a/schulung_tools/linking/helloat/hello.c b/schulung_tools/linking/helloat/hello.c
new file mode 100644
index 0000000..82b8d53
--- /dev/null
+++ b/schulung_tools/linking/helloat/hello.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+
+void func1(void);
+void func2(void);
+
+int main(void)
+{
+ func1();
+ printf("Hello, world!\n");
+ func2();
+ return 0;
+}