From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx> In cleaning up the directory structure, move the C files into their own "src/" directory. Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> --- 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