diff options
Diffstat (limited to 'examples/hello_libdeps/libs')
-rw-r--r-- | examples/hello_libdeps/libs/libbar/Makefile | 9 | ||||
-rw-r--r-- | examples/hello_libdeps/libs/libbar/bar.c | 8 | ||||
-rw-r--r-- | examples/hello_libdeps/libs/libbar/bar.h | 6 | ||||
-rw-r--r-- | examples/hello_libdeps/libs/libbaz/Makefile | 10 | ||||
-rw-r--r-- | examples/hello_libdeps/libs/libbaz/baz.c | 8 | ||||
-rw-r--r-- | examples/hello_libdeps/libs/libbaz/include/baz.h | 6 | ||||
-rw-r--r-- | examples/hello_libdeps/libs/libbaz/linkme.mk | 5 | ||||
-rw-r--r-- | examples/hello_libdeps/libs/libfoo/Makefile | 9 | ||||
-rw-r--r-- | examples/hello_libdeps/libs/libfoo/foo.c | 8 | ||||
-rw-r--r-- | examples/hello_libdeps/libs/libfoo/foo.h | 6 | ||||
-rw-r--r-- | examples/hello_libdeps/libs/libfoo/linkme.mk | 1 | ||||
-rw-r--r-- | examples/hello_libdeps/libs/libfooqux/Makefile | 9 | ||||
-rw-r--r-- | examples/hello_libdeps/libs/libfooqux/fooqux.c | 9 | ||||
-rw-r--r-- | examples/hello_libdeps/libs/libfooqux/fooqux.h | 8 |
14 files changed, 102 insertions, 0 deletions
diff --git a/examples/hello_libdeps/libs/libbar/Makefile b/examples/hello_libdeps/libs/libbar/Makefile new file mode 100644 index 0000000..6514a70 --- /dev/null +++ b/examples/hello_libdeps/libs/libbar/Makefile @@ -0,0 +1,9 @@ +LIB = bar +INCS = bar.h + +SHLIB_MAJOR = 0 +SHLIB_MINOR = 0 + +WARNS = 4 + +.include <mkc.mk> diff --git a/examples/hello_libdeps/libs/libbar/bar.c b/examples/hello_libdeps/libs/libbar/bar.c new file mode 100644 index 0000000..b8015fc --- /dev/null +++ b/examples/hello_libdeps/libs/libbar/bar.c @@ -0,0 +1,8 @@ +#include "bar.h" + +#include <stdio.h> + +void bar (void) +{ + puts ("I am bar"); +} diff --git a/examples/hello_libdeps/libs/libbar/bar.h b/examples/hello_libdeps/libs/libbar/bar.h new file mode 100644 index 0000000..e1d9f28 --- /dev/null +++ b/examples/hello_libdeps/libs/libbar/bar.h @@ -0,0 +1,6 @@ +#ifndef _BAR_H_ +#define _BAR_H_ + +void bar (void); + +#endif // _BAR_H_ diff --git a/examples/hello_libdeps/libs/libbaz/Makefile b/examples/hello_libdeps/libs/libbaz/Makefile new file mode 100644 index 0000000..fb96ef1 --- /dev/null +++ b/examples/hello_libdeps/libs/libbaz/Makefile @@ -0,0 +1,10 @@ +LIB = bazbaz # LIB name is not equal to ${.CURDIR:T}! +SRCS = baz.c +INCS = baz.h +INCSSRCDIR = include + +CPPFLAGS += ${INCSSRCDIR} + +WARNS = 4 + +.include <mkc.mk> diff --git a/examples/hello_libdeps/libs/libbaz/baz.c b/examples/hello_libdeps/libs/libbaz/baz.c new file mode 100644 index 0000000..e9000dc --- /dev/null +++ b/examples/hello_libdeps/libs/libbaz/baz.c @@ -0,0 +1,8 @@ +#include "baz.h" + +#include <stdio.h> + +void baz (void) +{ + puts ("I am baz"); +} diff --git a/examples/hello_libdeps/libs/libbaz/include/baz.h b/examples/hello_libdeps/libs/libbaz/include/baz.h new file mode 100644 index 0000000..3a8879c --- /dev/null +++ b/examples/hello_libdeps/libs/libbaz/include/baz.h @@ -0,0 +1,6 @@ +#ifndef _BAZ_H_ +#define _BAZ_H_ + +void baz (void); + +#endif // _BAZ_H_ diff --git a/examples/hello_libdeps/libs/libbaz/linkme.mk b/examples/hello_libdeps/libs/libbaz/linkme.mk new file mode 100644 index 0000000..8127ebd --- /dev/null +++ b/examples/hello_libdeps/libs/libbaz/linkme.mk @@ -0,0 +1,5 @@ +PATH.baz := ${.PARSEDIR:tA} + +DPINCDIRS += ${PATH.baz}/include # non-default dir for headers +DPLIBDIRS += ${OBJDIR_libs_libbaz} +DPLDADD += bazbaz # non-default library name diff --git a/examples/hello_libdeps/libs/libfoo/Makefile b/examples/hello_libdeps/libs/libfoo/Makefile new file mode 100644 index 0000000..747a9e6 --- /dev/null +++ b/examples/hello_libdeps/libs/libfoo/Makefile @@ -0,0 +1,9 @@ +LIB = foo +INCS = foo.h + +SHLIB_MAJOR = 0 +SHLIB_MINOR = 0 + +WARNS = 4 + +.include <mkc.mk> diff --git a/examples/hello_libdeps/libs/libfoo/foo.c b/examples/hello_libdeps/libs/libfoo/foo.c new file mode 100644 index 0000000..fa86b30 --- /dev/null +++ b/examples/hello_libdeps/libs/libfoo/foo.c @@ -0,0 +1,8 @@ +#include "foo.h" + +#include <stdio.h> + +void foo (void) +{ + puts ("I am foo"); +} diff --git a/examples/hello_libdeps/libs/libfoo/foo.h b/examples/hello_libdeps/libs/libfoo/foo.h new file mode 100644 index 0000000..a5bf6dd --- /dev/null +++ b/examples/hello_libdeps/libs/libfoo/foo.h @@ -0,0 +1,6 @@ +#ifndef _FOO_H_ +#define _FOO_H_ + +void foo (void); + +#endif // _FOO_H_ diff --git a/examples/hello_libdeps/libs/libfoo/linkme.mk b/examples/hello_libdeps/libs/libfoo/linkme.mk new file mode 100644 index 0000000..25e2e05 --- /dev/null +++ b/examples/hello_libdeps/libs/libfoo/linkme.mk @@ -0,0 +1 @@ +# empty linkme.mk is useless, this is a part of regression tests diff --git a/examples/hello_libdeps/libs/libfooqux/Makefile b/examples/hello_libdeps/libs/libfooqux/Makefile new file mode 100644 index 0000000..9157963 --- /dev/null +++ b/examples/hello_libdeps/libs/libfooqux/Makefile @@ -0,0 +1,9 @@ +LIB = fooqux +INCS = fooqux.h + +SHLIB_MAJOR = 0 +SHLIB_MINOR = 0 + +WARNS = 4 + +.include <mkc.mk> diff --git a/examples/hello_libdeps/libs/libfooqux/fooqux.c b/examples/hello_libdeps/libs/libfooqux/fooqux.c new file mode 100644 index 0000000..27d5225 --- /dev/null +++ b/examples/hello_libdeps/libs/libfooqux/fooqux.c @@ -0,0 +1,9 @@ +#include "fooqux.h" + +#include <stdio.h> + +void fooqux (void) +{ + foo (); + puts (" and qux"); +} diff --git a/examples/hello_libdeps/libs/libfooqux/fooqux.h b/examples/hello_libdeps/libs/libfooqux/fooqux.h new file mode 100644 index 0000000..0c4f973 --- /dev/null +++ b/examples/hello_libdeps/libs/libfooqux/fooqux.h @@ -0,0 +1,8 @@ +#ifndef _FOOQUX_H_ +#define _FOOQUX_H_ + +#include "foo.h" + +void fooqux (void); + +#endif // _FOOQUX_H_ |