94 lines
2.5 KiB
Diff
94 lines
2.5 KiB
Diff
diff -Naurp pcp-6.3.7.orig/src/pmdas/bpf/GNUmakefile pcp-6.3.7/src/pmdas/bpf/GNUmakefile
|
|
--- pcp-6.3.7.orig/src/pmdas/bpf/GNUmakefile 2025-03-27 17:01:59.000000000 +1100
|
|
+++ pcp-6.3.7/src/pmdas/bpf/GNUmakefile 2025-03-31 14:48:17.152726333 +1100
|
|
@@ -1,7 +1,6 @@
|
|
TOPDIR = ../../..
|
|
include $(TOPDIR)/src/include/builddefs
|
|
|
|
-ifeq "$(PMDA_BPF)" "true"
|
|
CFILES = bpf.c
|
|
CMDTARGET = pmdabpf$(EXECSUFFIX)
|
|
LIBTARGET = pmda_bpf.$(DSOSUFFIX)
|
|
@@ -27,12 +26,15 @@ MAN_DEST = $(PCP_MAN_DIR)/man$(MAN_SECTI
|
|
|
|
LDIRT = domain.h *.o $(IAM).log pmda$(IAM) pmda_$(IAM).$(DSOSUFFIX)
|
|
|
|
-default_pcp default: $(CMDTARGET) $(LIBTARGET) $(SUBDIRS)
|
|
- $(SUBDIRS_MAKERULE)
|
|
+default: build-me
|
|
|
|
include $(BUILDRULES)
|
|
|
|
-install_pcp install: default $(SUBDIRS)
|
|
+ifeq "$(PMDA_BPF)" "true"
|
|
+build-me: $(CMDTARGET) $(LIBTARGET) $(SUBDIRS)
|
|
+ $(SUBDIRS_MAKERULE)
|
|
+
|
|
+install: default $(SUBDIRS)
|
|
$(INSTALL) -m 755 -d $(PMDAADMDIR)
|
|
$(INSTALL) -m 755 -d $(PMDATMPDIR)
|
|
$(INSTALL) -m 755 -t $(PMDATMPDIR) Install Remove $(CMDTARGET) $(LIBTARGET) $(SCRIPTS) $(PMDAADMDIR)
|
|
@@ -43,6 +45,15 @@ install_pcp install: default $(SUBDIRS)
|
|
$(INSTALL) -m 644 -t $(PMDATMPDIR)/$(CONFIG) $(CONFIG) $(PMDACONFIG)/$(CONFIG)
|
|
@$(INSTALL_MAN)
|
|
$(SUBDIRS_MAKERULE)
|
|
+else
|
|
+build-me:
|
|
+install:
|
|
+ @$(INSTALL_MAN)
|
|
+endif
|
|
+
|
|
+default_pcp : default
|
|
+
|
|
+install_pcp : install
|
|
|
|
$(OBJECTS): domain.h
|
|
|
|
@@ -51,12 +62,6 @@ domain.h: ../../pmns/stdpmid
|
|
|
|
pmns:
|
|
$(LN_S) -f root_bpf pmns
|
|
-else
|
|
-default_pcp default:
|
|
-
|
|
-install_pcp install:
|
|
- @$(INSTALL_MAN)
|
|
-endif
|
|
|
|
check:: $(MAN_PAGES)
|
|
$(MANLINT) $^
|
|
@@ -64,5 +69,6 @@ check:: $(MAN_PAGES)
|
|
clean::
|
|
$(MAKE) -C modules/ clean
|
|
rm -f $(LDIRT)
|
|
+
|
|
debug:
|
|
@echo PMDA_BPF=$(PMDA_BPF)
|
|
diff -Naurp pcp-6.3.7.orig/src/pmdas/bpf/modules/GNUmakefile pcp-6.3.7/src/pmdas/bpf/modules/GNUmakefile
|
|
--- pcp-6.3.7.orig/src/pmdas/bpf/modules/GNUmakefile 2024-03-14 09:37:59.000000000 +1100
|
|
+++ pcp-6.3.7/src/pmdas/bpf/modules/GNUmakefile 2025-03-31 14:48:17.157726345 +1100
|
|
@@ -70,15 +70,21 @@ APPS_BPF = \
|
|
APPS_BPF_2 = \
|
|
netatop.bpf.c
|
|
|
|
-default_pcp default: $(PMDABPF_MODULES)
|
|
+default: build-me
|
|
|
|
include $(BUILDRULES)
|
|
|
|
+ifeq "$(PMDA_BPF)" "true"
|
|
+build-me: $(PMDABPF_MODULES)
|
|
+
|
|
install_pcp install: default
|
|
$(INSTALL) -m 755 -d $(MODULEDIR)
|
|
$(INSTALL) -m 755 -d $(MODULETMP)
|
|
$(INSTALL) -m 644 -t $(MODULETMP) $(PMDABPF_MODULES) $(MODULEDIR)
|
|
-
|
|
+else
|
|
+build-me:
|
|
+install:
|
|
+endif
|
|
|
|
# Use the clang pipeline to emit LLVM to LLD and emit BPF straight to an ELF .o.
|
|
# The GCC pipeline has parts of this but not completely, and in any case, likely
|