tools/rtla: Use tools/build makefiles to build rtla
[linux-2.6-microblaze.git] / tools / tracing / rtla / Makefile.standalone
diff --git a/tools/tracing/rtla/Makefile.standalone b/tools/tracing/rtla/Makefile.standalone
new file mode 100644 (file)
index 0000000..86d07cb
--- /dev/null
@@ -0,0 +1,26 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+VERSION                := $(shell cat VERSION)
+CFLAGS         += $$($(PKG_CONFIG) --cflags libtracefs)
+EXTLIBS                += $$($(PKG_CONFIG) --libs libtracefs)
+
+rtla:
+
+include Makefile.rtla
+
+SRC            := $(wildcard src/*.c)
+HDR            := $(wildcard src/*.h)
+OBJ            := $(SRC:.c=.o)
+DOCSRC         := Documentation/
+
+rtla: $(OBJ)
+       $(CC) -o rtla $(LDFLAGS) $(OBJ) $(LIBS) $(EXTLIBS)
+       $(info This is a deprecated method to compile RTLA, please compile from Linux kernel source)
+
+.PHONY: clean tarball
+clean: doc_clean
+       @test ! -f rtla || rm rtla
+       @test ! -f rtla-static || rm rtla-static
+       @test ! -f src/rtla.o || rm src/rtla.o
+       @test ! -f $(TARBALL) || rm -f $(TARBALL)
+       @rm -rf *~ $(OBJ) *.tar.$(CEXT)