summaryrefslogtreecommitdiff
path: root/examples/tools2/libs/foo
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tools2/libs/foo')
-rw-r--r--examples/tools2/libs/foo/Makefile7
-rw-r--r--examples/tools2/libs/foo/foo.c6
-rw-r--r--examples/tools2/libs/foo/foo.h1
-rw-r--r--examples/tools2/libs/foo/linkme.mk5
4 files changed, 19 insertions, 0 deletions
diff --git a/examples/tools2/libs/foo/Makefile b/examples/tools2/libs/foo/Makefile
new file mode 100644
index 0000000..0003bee
--- /dev/null
+++ b/examples/tools2/libs/foo/Makefile
@@ -0,0 +1,7 @@
+LIB = foo
+SRCS = foo.c
+INCS = foo.h
+
+WARNS = 4
+
+.include <mkc.lib.mk>
diff --git a/examples/tools2/libs/foo/foo.c b/examples/tools2/libs/foo/foo.c
new file mode 100644
index 0000000..1d47523
--- /dev/null
+++ b/examples/tools2/libs/foo/foo.c
@@ -0,0 +1,6 @@
+#include "foo.h"
+
+const char *get_msg1 (void)
+{
+ return "This is a message #";
+}
diff --git a/examples/tools2/libs/foo/foo.h b/examples/tools2/libs/foo/foo.h
new file mode 100644
index 0000000..489e95b
--- /dev/null
+++ b/examples/tools2/libs/foo/foo.h
@@ -0,0 +1 @@
+const char *get_msg1 (void);
diff --git a/examples/tools2/libs/foo/linkme.mk b/examples/tools2/libs/foo/linkme.mk
new file mode 100644
index 0000000..ad42ee4
--- /dev/null
+++ b/examples/tools2/libs/foo/linkme.mk
@@ -0,0 +1,5 @@
+PATH.foo := ${.PARSEDIR}
+
+CPPFLAGS += -I${PATH.foo}
+DPLIBDIRS += libs/${PATH.foo:T}
+LDADD += -lfoo