tools/testing/shared/shared.mk
Source file repositories/reference/linux-study-clean/tools/testing/shared/shared.mk
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/shared/shared.mk- Extension
.mk- Size
- 2315 bytes
- Lines
- 80
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: build/configuration rule
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
# SPDX-License-Identifier: GPL-2.0
include ../../scripts/Makefile.arch
CFLAGS += -I../shared -I. -I../../include -I../../arch/$(SRCARCH)/include \
-I../../../lib -g -Og -Wall \
-D_LGPL_SOURCE -fsanitize=address -fsanitize=undefined
CFLAGS += $(EXTRA_CFLAGS)
LDFLAGS += -fsanitize=address -fsanitize=undefined
LDLIBS += -lpthread -lurcu
LIBS := slab.o find_bit.o bitmap.o hweight.o vsprintf.o
SHARED_OFILES = xarray-shared.o radix-tree.o idr.o linux.o $(LIBS)
SHARED_DEPS = Makefile ../shared/shared.mk ../shared/*.h generated/map-shift.h \
generated/bit-length.h generated/autoconf.h \
../../include/linux/*.h \
../../include/asm/*.h \
../../arch/$(SRCARCH)/include/asm/*.h \
../../../include/linux/xarray.h \
../../../include/linux/maple_tree.h \
../../../include/linux/radix-tree.h \
../../../lib/radix-tree.h \
../../../include/linux/idr.h \
../../../lib/maple_tree.c \
../../../lib/test_maple_tree.c
ifndef SHIFT
SHIFT=3
endif
ifeq ($(BUILD), 32)
CFLAGS += -m32
LDFLAGS += -m32
LONG_BIT := 32
endif
ifndef LONG_BIT
LONG_BIT := $(shell getconf LONG_BIT)
endif
%.o: ../shared/%.c
$(CC) -c $(CFLAGS) $< -o $@
vpath %.c ../../lib
$(SHARED_OFILES): $(SHARED_DEPS)
radix-tree.c: ../../../lib/radix-tree.c
sed -e 's/^static //' -e 's/__always_inline //' -e 's/inline //' < $< > $@
idr.c: ../../../lib/idr.c
sed -e 's/^static //' -e 's/__always_inline //' -e 's/inline //' < $< > $@
xarray-shared.o: ../shared/xarray-shared.c ../../../lib/xarray.c \
../../../lib/test_xarray.c
maple-shared.o: ../shared/maple-shared.c ../../../lib/maple_tree.c \
../../../lib/test_maple_tree.c
generated/autoconf.h:
@mkdir -p generated
cp ../shared/autoconf.h generated/autoconf.h
generated/map-shift.h:
@mkdir -p generated
@if ! grep -qws $(SHIFT) generated/map-shift.h; then \
echo "Generating $@"; \
echo "#define XA_CHUNK_SHIFT $(SHIFT)" > \
generated/map-shift.h; \
fi
Annotation
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.