* [PATCH] libtracefs: Add Makefile to the src directory
@ 2020-12-09 23:14 Steven Rostedt
0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2020-12-09 23:14 UTC (permalink / raw)
To: Linux Trace Devel
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
It appears that I forgot to 'git add src/Makefile' when committing
commit 45b174f478 ("libtracefs: Move source files to new src/ directory")
And this will not build without it!
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
src/Makefile | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 src/Makefile
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..1dbbf64
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,38 @@
+
+include $(src)/scripts/utils.mk
+
+OBJS =
+OBJS += tracefs-utils.o
+OBJS += tracefs-instance.o
+OBJS += tracefs-events.o
+
+OBJS := $(OBJS:%.o=$(bdir)/%.o)
+DEPS := $(OBJS:$(bdir)/%.o=$(bdir)/.%.d)
+
+$(LIBTRACEFS_STATIC): $(OBJS)
+ $(Q)$(call do_build_static_lib)
+
+$(LIBTRACEFS_SHARED): $(OBJS)
+ $(Q)$(call do_compile_shared_library)
+ @ln -sf $(@F) $(bdir)/libtracefs.so
+ @ln -sf $(@F) $(bdir)/libtracefs.so.$(TFS_VERSION)
+
+$(bdir)/%.o: %.c
+ $(Q)$(call do_fpic_compile)
+
+$(DEPS): $(bdir)/.%.d: %.c
+ $(Q)$(CC) -M -MT $(bdir)/$*.o $(CPPFLAGS) $(CFLAGS) $< > $@
+
+$(OBJS): $(bdir)/%.o : $(bdir)/.%.d
+
+$(OBJS): | $(bdir)
+$(DEPS): | $(bdir)
+
+clean:
+ $(RM) $(OBJS)
+
+dep_includes := $(wildcard $(DEPS))
+
+ifneq ($(dep_includes),)
+ include $(dep_includes)
+endif
--
2.25.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-09 23:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09 23:14 [PATCH] libtracefs: Add Makefile to the src directory Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).