]> rtime.felk.cvut.cz Git - rtems-devel.git/commitdiff
Simple application which object file can be used to test dlopen.
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Sat, 5 Sep 2015 09:41:52 +0000 (11:41 +0200)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Sat, 5 Sep 2015 09:41:52 +0000 (11:41 +0200)
The object file before final linking has to be included
in appdl embedded tar file or has to be transferred over
network (tftp, nfs, etc) to the target filesystem.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
rtems-omk-template/appdl/examples/Makefile [new file with mode: 0644]
rtems-omk-template/appdl/examples/Makefile.omk [new file with mode: 0644]
rtems-omk-template/appdl/examples/appdl_print.c [new file with mode: 0644]

diff --git a/rtems-omk-template/appdl/examples/Makefile b/rtems-omk-template/appdl/examples/Makefile
new file mode 100644 (file)
index 0000000..76b56fd
--- /dev/null
@@ -0,0 +1,14 @@
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ;  while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" = `pwd`  ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+       @echo -e "\nThe Makefile.rules has not been found in this or parent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
diff --git a/rtems-omk-template/appdl/examples/Makefile.omk b/rtems-omk-template/appdl/examples/Makefile.omk
new file mode 100644 (file)
index 0000000..dc585c4
--- /dev/null
@@ -0,0 +1,13 @@
+default_CONFIG += CONFIG_OC_APP_DL_PRINT=x
+
+ifeq ($(CONFIG_OC_APP_DL_PRINT),y)
+
+test_PROGRAMS = appdl_print
+
+#lib_LIBRARIES = 
+
+#include_HEADERS = 
+
+appdl_print_SOURCES += appdl_print.c
+
+endif
diff --git a/rtems-omk-template/appdl/examples/appdl_print.c b/rtems-omk-template/appdl/examples/appdl_print.c
new file mode 100644 (file)
index 0000000..1b65160
--- /dev/null
@@ -0,0 +1,11 @@
+#include <stdio.h>
+
+int main(int argc, char *argv[])
+{
+  int i;
+  printf("%s: dynamicaly loaded code called\n", argv[0]);
+  for (i = 1; i < argc; i++) {
+    printf("%s: argument %i: %s\n", argv[0], i, argv[i]);
+  }
+  return 0;
+}