@@ -135,7 +135,7 @@ MAKEOVERRIDES=
export srctree OUTPUT CC LD CFLAGS V
build := -f $(srctree)/build/Makefile.build dir=. obj
-TE_IN := $(OUTPUT)libtraceevent-in.o
+TE_IN := $(OUTPUT)src/libtraceevent-in.o
LIB_TARGET := $(addprefix $(OUTPUT),$(LIB_TARGET))
CMD_TARGETS = $(LIB_TARGET) $(PKG_CONFIG_FILE)
@@ -147,7 +147,7 @@ all: all_cmd plugins
all_cmd: $(CMD_TARGETS)
$(TE_IN): force
- $(Q)$(MAKE) $(build)=libtraceevent
+ $(Q)$(call descend,src,libtraceevent)
$(OUTPUT)$(LIBTRACEEVENT_SHARED): $(TE_IN)
$(Q)mkdir -p $(OUTPUT)$(bdir)
@@ -252,14 +252,14 @@ install_pkgconfig: $(PKG_CONFIG_FILE)
install_headers:
$(call QUIET_INSTALL, headers) \
- $(call do_install,event-parse.h,$(includedir_SQ),644); \
- $(call do_install,event-utils.h,$(includedir_SQ),644); \
- $(call do_install,trace-seq.h,$(includedir_SQ),644); \
- $(call do_install,kbuffer.h,$(includedir_SQ),644)
+ $(call do_install,src/event-parse.h,$(includedir_SQ),644); \
+ $(call do_install,src/event-utils.h,$(includedir_SQ),644); \
+ $(call do_install,src/trace-seq.h,$(includedir_SQ),644); \
+ $(call do_install,src/kbuffer.h,$(includedir_SQ),644)
install: install_lib
-clean: clean_plugins
+clean: clean_plugins clean_src
$(call QUIET_CLEAN, libtraceevent) \
$(RM) $(OUTPUT)*.o $(OUTPUT)*~ $(TARGETS) $(OUTPUT)*.a $(OUTPUT)*.so $(VERSION_FILES) $(OUTPUT).*.d $(OUTPUT).*.cmd; \
$(RM) TRACEEVENT-CFLAGS $(OUTPUT)tags $(OUTPUT)TAGS; \
@@ -310,6 +310,10 @@ PHONY += clean_plugins
clean_plugins:
$(call descend,plugins,clean)
+PHONY += clean_src
+clean_src:
+ $(call descend,src,clean)
+
force:
# Declare the contents of the .PHONY variable as phony. We keep that
@@ -93,7 +93,7 @@ CONFIG_FLAGS =
OBJ = $@
N =
-INCLUDES = -I. -I.. -I $(srctree)/include $(CONFIG_INCLUDES)
+INCLUDES = -I. -I.. -I../src -I $(srctree)/include $(CONFIG_INCLUDES)
# Set compile option CFLAGS
ifdef EXTRA_CFLAGS
similarity index 100%
rename from Build
rename to src/Build
new file mode 100644
@@ -0,0 +1,12 @@
+
+include ../scripts/Makefile.include
+
+build := -f $(srctree)/build/Makefile.build dir=. obj
+
+libtraceevent: $(libtraceevent-y)
+ $(Q)$(MAKE) $(build)=libtraceevent
+
+clean:
+ $(call QUIET_CLEAN, trace_src) \
+ $(RM) $(OUTPUT)*.o $(OUTPUT)*~ .*.d .*.cmd
+
similarity index 100%
rename from event-parse-api.c
rename to src/event-parse-api.c
similarity index 100%
rename from event-parse-local.h
rename to src/event-parse-local.h
similarity index 100%
rename from event-parse.c
rename to src/event-parse.c
similarity index 100%
rename from event-parse.h
rename to src/event-parse.h
similarity index 100%
rename from event-plugin.c
rename to src/event-plugin.c
similarity index 100%
rename from event-utils.h
rename to src/event-utils.h
similarity index 100%
rename from kbuffer-parse.c
rename to src/kbuffer-parse.c
similarity index 100%
rename from kbuffer.h
rename to src/kbuffer.h
similarity index 100%
rename from parse-filter.c
rename to src/parse-filter.c
similarity index 100%
rename from parse-utils.c
rename to src/parse-utils.c
similarity index 100%
rename from tep_strerror.c
rename to src/tep_strerror.c
similarity index 100%
rename from trace-seq.c
rename to src/trace-seq.c
similarity index 100%
rename from trace-seq.h
rename to src/trace-seq.h