diff options
Diffstat (limited to 'examples/tools2/libs')
-rw-r--r-- | examples/tools2/libs/bar/Makefile | 7 | ||||
-rw-r--r-- | examples/tools2/libs/bar/bar.c | 6 | ||||
-rw-r--r-- | examples/tools2/libs/bar/bar.h | 1 | ||||
-rw-r--r-- | examples/tools2/libs/bar/linkme.mk | 5 | ||||
-rw-r--r-- | examples/tools2/libs/foo/Makefile | 7 | ||||
-rw-r--r-- | examples/tools2/libs/foo/foo.c | 6 | ||||
-rw-r--r-- | examples/tools2/libs/foo/foo.h | 1 | ||||
-rw-r--r-- | examples/tools2/libs/foo/linkme.mk | 5 | ||||
-rw-r--r-- | examples/tools2/libs/qux/Makefile | 16 | ||||
-rw-r--r-- | examples/tools2/libs/qux/linkme.mk | 5 | ||||
-rw-r--r-- | examples/tools2/libs/qux/qux.c | 6 | ||||
-rw-r--r-- | examples/tools2/libs/qux/qux.h.in | 4 |
12 files changed, 69 insertions, 0 deletions
diff --git a/examples/tools2/libs/bar/Makefile b/examples/tools2/libs/bar/Makefile new file mode 100644 index 0000000..4022796 --- /dev/null +++ b/examples/tools2/libs/bar/Makefile @@ -0,0 +1,7 @@ +LIB = bar +SRCS = bar.c +INCS = bar.h + +WARNS = 4 + +.include <mkc.lib.mk> diff --git a/examples/tools2/libs/bar/bar.c b/examples/tools2/libs/bar/bar.c new file mode 100644 index 0000000..8580fe7 --- /dev/null +++ b/examples/tools2/libs/bar/bar.c @@ -0,0 +1,6 @@ +#include "bar.h" + +const char *get_msg2 (void) +{ + return "Message #"; +} diff --git a/examples/tools2/libs/bar/bar.h b/examples/tools2/libs/bar/bar.h new file mode 100644 index 0000000..a434759 --- /dev/null +++ b/examples/tools2/libs/bar/bar.h @@ -0,0 +1 @@ +const char *get_msg2 (void); diff --git a/examples/tools2/libs/bar/linkme.mk b/examples/tools2/libs/bar/linkme.mk new file mode 100644 index 0000000..4eea0a9 --- /dev/null +++ b/examples/tools2/libs/bar/linkme.mk @@ -0,0 +1,5 @@ +PATH.bar := ${.PARSEDIR} + +CPPFLAGS += -I${PATH.bar} +DPLIBDIRS += libs/${PATH.bar:T} +LDADD += -lbar 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 diff --git a/examples/tools2/libs/qux/Makefile b/examples/tools2/libs/qux/Makefile new file mode 100644 index 0000000..345f614 --- /dev/null +++ b/examples/tools2/libs/qux/Makefile @@ -0,0 +1,16 @@ +LIB = qux +SRCS = qux.c +INCS = qux.h + +MKC_CHECK_SIZEOF = int + +.include <mkc.configure.mk> + +INFILES = ${INCS} +INTEXTS_REPLS = int_size ${SIZEOF.int:U4} + +qux.o: qux.h + +WARNS = 4 + +.include <mkc.lib.mk> diff --git a/examples/tools2/libs/qux/linkme.mk b/examples/tools2/libs/qux/linkme.mk new file mode 100644 index 0000000..82f5dd6 --- /dev/null +++ b/examples/tools2/libs/qux/linkme.mk @@ -0,0 +1,5 @@ +PATH.qux := ${.PARSEDIR} + +CPPFLAGS += -I${OBJDIR_libs_qux} +DPLIBDIRS += libs/${PATH.qux:T} +LDADD += -lqux diff --git a/examples/tools2/libs/qux/qux.c b/examples/tools2/libs/qux/qux.c new file mode 100644 index 0000000..78786db --- /dev/null +++ b/examples/tools2/libs/qux/qux.c @@ -0,0 +1,6 @@ +#include "qux.h" + +int get_int_size (void) +{ + return INT_SIZE; +} diff --git a/examples/tools2/libs/qux/qux.h.in b/examples/tools2/libs/qux/qux.h.in new file mode 100644 index 0000000..0a41ce1 --- /dev/null +++ b/examples/tools2/libs/qux/qux.h.in @@ -0,0 +1,4 @@ + +#define INT_SIZE @int_size@ + +int get_int_size (void); |