From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Subject: [PATCH 4/6] libtracefs: Move source files to new src/ directory
Date: Tue, 08 Dec 2020 16:54:08 -0500 [thread overview]
Message-ID: <20201208215504.757940690@goodmis.org> (raw)
In-Reply-To: 20201208215404.135186972@goodmis.org
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
In cleaning up the directory structure, move the C files into their own
"src/" directory.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
Makefile | 28 ++++----------------
tracefs-events.c => src/tracefs-events.c | 0
tracefs-instance.c => src/tracefs-instance.c | 0
tracefs-utils.c => src/tracefs-utils.c | 0
4 files changed, 5 insertions(+), 23 deletions(-)
rename tracefs-events.c => src/tracefs-events.c (100%)
rename tracefs-instance.c => src/tracefs-instance.c (100%)
rename tracefs-utils.c => src/tracefs-utils.c (100%)
diff --git a/Makefile b/Makefile
index 5a250eeb03b1..f6b6a9ede5c0 100644
--- a/Makefile
+++ b/Makefile
@@ -267,35 +267,17 @@ all: $(DEFAULT_TARGET)
$(bdir):
@mkdir -p $(bdir)
-$(OBJS): | $(bdir)
-$(DEPS): | $(bdir)
-
LIBS = -L$(obj)/lib/traceevent -ltraceevent
-$(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) $< > $@
+$(LIBTRACEFS_STATIC): force
+ $(Q)$(MAKE) -C $(src)/src $@
-$(OBJS): $(bdir)/%.o : $(bdir)/.%.d
-
-dep_includes := $(wildcard $(DEPS))
-
-ifneq ($(dep_includes),)
- include $(dep_includes)
-endif
+$(bdir)/libtracefs.so.$(TRACEFS_VERSION): force
+ $(Q)$(MAKE) -C $(src)/src $@
clean:
$(MAKE) -C $(src)/utest clean
+ $(MAKE) -C $(src)/src clean
$(RM) $(TARGETS) $(bdir)/*.a $(bdir)/*.so $(bdir)/*.o $(bdir)/.*.d
$(RM) $(PKG_CONFIG_FILE)
diff --git a/tracefs-events.c b/src/tracefs-events.c
similarity index 100%
rename from tracefs-events.c
rename to src/tracefs-events.c
diff --git a/tracefs-instance.c b/src/tracefs-instance.c
similarity index 100%
rename from tracefs-instance.c
rename to src/tracefs-instance.c
diff --git a/tracefs-utils.c b/src/tracefs-utils.c
similarity index 100%
rename from tracefs-utils.c
rename to src/tracefs-utils.c
--
2.28.0
next prev parent reply other threads:[~2020-12-08 21:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-08 21:54 [PATCH 0/6] libtracefs: Clean up of the source directory Steven Rostedt
2020-12-08 21:54 ` [PATCH 1/6] libtracefs: Move features.mk into scripts directory Steven Rostedt
2020-12-08 21:54 ` [PATCH 2/6] libtracefs: Remove LIBTRACEFS_DIR as it is the same as bdir Steven Rostedt
2020-12-08 21:54 ` [PATCH 3/6] libtracefs: Use LIBTRACEFS_STATIC/SHARED instead of open coding them Steven Rostedt
2020-12-08 21:54 ` Steven Rostedt [this message]
2020-12-08 21:54 ` [PATCH 5/6] libtracefs: Use pkg-config to find libtraceevent Steven Rostedt
2020-12-08 21:54 ` [PATCH 6/6] libtracefs: Have make clean remove the .so.X file Steven Rostedt
2020-12-09 14:49 ` [PATCH 0/6] libtracefs: Clean up of the source directory Tzvetomir Stoyanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201208215504.757940690@goodmis.org \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).