summaryrefslogtreecommitdiff
path: root/schulung_tools/linking/helloat/Makefile.am
diff options
context:
space:
mode:
authorManuel Traut <manut@linutronix.de>2019-01-09 16:42:49 +0100
committerJohn Ogness <john.ogness@linutronix.de>2019-01-28 17:25:56 +0106
commitb990733af9d6a07c2130daeb5fd39c75f6804441 (patch)
tree6c5f6486948ab3c1a9ec1a0db6d045d6bb1543c4 /schulung_tools/linking/helloat/Makefile.am
parent6f5bc54bec1449b1713504950cce078b0dac47c1 (diff)
add examples for dynamic linking / loading
one example by doing it manually with an ugly Makefile, another one by using autotools. Signed-off-by: Manuel Traut <manut@linutronix.de>
Diffstat (limited to 'schulung_tools/linking/helloat/Makefile.am')
-rw-r--r--schulung_tools/linking/helloat/Makefile.am20
1 files changed, 20 insertions, 0 deletions
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'