1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
# Oracle Linux DTrace.
# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.
$(objdir)/include/.dir.stamp:
mkdir -p $(objdir)/include
for d in /usr/include/${ARCH}-linux-gnu/asm /usr/include/asm; do \
if [ -d $$d ]; then \
ln -sf $$d $(objdir)/include; \
break; \
fi; \
done
ln -sf /usr/include/asm-generic $(objdir)/include
ln -sf /usr/include/linux $(objdir)/include
@touch $(objdir)/include/.dir.stamp
BPFLIBS += bpf_dlib
bpf_dlib_CPPFLAGS = -Ilibdtrace -Iinclude -I$(objdir)/include -idirafter /usr/include
bpf_dlib_TARGET = dlibs/bpf_dlib
bpf_dlib_DIR := $(current-dir)
bpf_dlib_SRCDEPS = $(objdir)/include/.dir.stamp $(objdir)/include/bpf_asm_helpers.h
bpf_dlib_SOURCES = \
agg_lqbin.c agg_qbin.c \
basename.S \
bvar_execargs.S \
cleanpath.S \
dirname.S \
get_agg.c \
get_bvar.c \
get_dvar.c \
index.S \
inet_ntoa.S \
inet_ntoa6.S \
link_ntop.S \
lltostr.S \
mutex_owned.S \
mutex_owner.S \
progenyof.S \
probe_error.c \
rindex.S \
rw_iswriter.S \
rw_read_held.S \
rw_write_held.S \
speculation.c \
strchr.S \
strcmp.S \
strjoin.S \
strlen.c \
strrchr.S \
strtok.S \
substr.S
bpf-check: $(objdir)/include/.dir.stamp
$(BPFC) $(BPFCPPFLAGS) $(bpf_dlib_CPPFLAGS) $(BPFCFLAGS) -S \
-o - bpf/get_bvar.c | \
awk '/dt_get_bvar:/ { \
getline; \
if(/stxdw/ && /%r6$$/) { \
print "ERROR: $(BPFC) is too old"; \
exit(1); \
} \
exit(0); \
}'
install::
mkdir -p $(INSTLIBDIR)/dtrace
$(call describe-install-target,$(INSTLIBDIR)/dtrace,bpf_dlib.o)
install -m 644 $(objdir)/dlibs/bpf_dlib.o $(INSTLIBDIR)/dtrace
|