[LITMUS^RT] [PATCH 1/2] Add module support in Makefile
Manohar Vanga
mvanga at mpi-sws.org
Tue Feb 4 03:20:26 CET 2014
This is a slightly hacky method of introducing modules support for
liblitmus. Then again, Makefile's tend to be hacky anyway. This
patch enables the development of LITMUS^RT tasks in their own folders
with a kernel-style Makefile.
Signed-off-by: Manohar Vanga <mvanga at mpi-sws.org>
---
Makefile | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Makefile b/Makefile
index e8003e8..0e6b87a 100644
--- a/Makefile
+++ b/Makefile
@@ -113,6 +113,12 @@ dump-config:
AR "${AR}" \
obj-all "${obj-all}"
+modules: liblitmus.a $(obj-m)
+
+.SECONDEXPANSION:
+$(obj-m): $$M/$$(obj-$$@)
+ $(CC) -o $M/$@ $(LDFLAGS) $M/$(obj-$@) $(LOADLIBS) $(LDLIBS) ${liblitmus-flags} ${lib-$@}
+
help:
@cat INSTALL
--
1.7.9.5
More information about the litmus-dev
mailing list