From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx> Organize the Makefiles a little: Move the definition of LIBTRACECMD_SHARED_VERSION and LIBTRACECMD_SHARED_SO to the top level Makefile. Move the exports for LIBTRACECMD_* right below their definitions. Move the LIBTRACECMD_* definitions above the LIBTRACEEVENT_* definitions, as LIBTRACECMD_* is the main code here. Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> --- Makefile | 13 ++++++++----- lib/trace-cmd/Makefile | 4 ---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 24b2b8f652f7..3e07be45f84e 100644 --- a/Makefile +++ b/Makefile @@ -215,16 +215,20 @@ export prefix bindir src obj kshark-dir LIBS = -ldl +LIBTRACECMD_DIR = $(obj)/lib/trace-cmd +LIBTRACECMD_STATIC = $(LIBTRACECMD_DIR)/libtracecmd.a +LIBTRACECMD_SHARED = $(LIBTRACECMD_DIR)/libtracecmd.so.$(LIBTRACECMD_VERSION) +LIBTRACECMD_SHARED_VERSION = $(shell echo $(LIBTRACECMD_SHARED) | sed -e 's/\(\.so\.[0-9]*\).*/\1/') +LIBTRACECMD_SHARED_SO = $(shell echo $(LIBTRACECMD_SHARED) | sed -e 's/\(\.so\).*/\1/') + +export LIBTRACECMD_STATIC LIBTRACECMD_SHARED +export LIBTRACECMD_SHARED_VERSION LIBTRACECMD_SHARED_SO LIBTRACEEVENT=libtraceevent LIBTRACEEVENT_DIR = $(obj)/lib/traceevent LIBTRACEEVENT_STATIC = $(LIBTRACEEVENT_DIR)/libtraceevent.a LIBTRACEEVENT_SHARED = $(LIBTRACEEVENT_DIR)/libtraceevent.so -LIBTRACECMD_DIR = $(obj)/lib/trace-cmd -LIBTRACECMD_STATIC = $(LIBTRACECMD_DIR)/libtracecmd.a -LIBTRACECMD_SHARED = $(LIBTRACECMD_DIR)/libtracecmd.so.$(LIBTRACECMD_VERSION) - LIBTRACEFS=libtracefs LIBTRACEFS_DIR = $(obj)/lib/tracefs LIBTRACEFS_STATIC = $(LIBTRACEFS_DIR)/libtracefs.a @@ -259,7 +263,6 @@ TRACE_LIBS = -L$(LIBTRACECMD_DIR) -ltracecmd \ export LIBS TRACE_LIBS export LIBTRACEEVENT_DIR LIBTRACECMD_DIR LIBTRACEFS_DIR -export LIBTRACECMD_STATIC LIBTRACECMD_SHARED export Q SILENT VERBOSE EXT # Include the utils diff --git a/lib/trace-cmd/Makefile b/lib/trace-cmd/Makefile index ec68831de610..cd66eaa8ea6c 100644 --- a/lib/trace-cmd/Makefile +++ b/lib/trace-cmd/Makefile @@ -40,10 +40,6 @@ $(LIBTRACECMD_STATIC): $(OBJS) LIBS = -L$(obj)/lib/traceevent -ltraceevent -LIBTRACECMD_SHARED_VERSION = $(shell echo $(LIBTRACECMD_SHARED) | sed -e 's/\(\.so\.[0-9]*\).*/\1/') - -LIBTRACECMD_SHARED_SO = $(shell echo $(LIBTRACECMD_SHARED) | sed -e 's/\(\.so\).*/\1/') - $(LIBTRACECMD_SHARED_VERSION): $(LIBTRACECMD_SHARED) @ln -sf $(<F) $@ -- 2.29.2