01474dc706
Use tools/build/ makefiles to build rtla, inheriting the benefits of it. For example, having a proper way to handle dependencies. rtla is built using perf infra-structure when building inside the kernel tree. At this point, rtla diverges from perf in two points: Documentation and tarball generation/build. At the documentation level, rtla is one step ahead, placing the documentation at Documentation/tools/rtla/, using the same build tools as kernel documentation. The idea is to move perf documentation to the same scheme and then share the same makefiles. rtla has a tarball target that the (old) RHEL8 uses. The tarball was kept using a simple standalone makefile for compatibility. The standalone makefile shares most of the code, e.g., flags, with regular buildings. The tarball method was set as deprecated. If necessary, we can make a rtla tarball like perf, which includes the entire tools/build. But this would also require changes in the user side (the directory structure changes, and probably the deps to build the package). Inspired on perf and objtool. Link: https://lkml.kernel.org/r/57563abf2715d22515c0c54a87cff3849eca5d52.1710519524.git.bristot@kernel.org Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Josh Poimboeuf <jpoimboe@kernel.org> Cc: John Kacur <jkacur@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
27 lines
691 B
Makefile
27 lines
691 B
Makefile
# 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)
|