summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhunt <hunt>2005-06-01 06:10:35 +0000
committerhunt <hunt>2005-06-01 06:10:35 +0000
commit1f6906212fe1fb43f7df19fa6d2ab018acd89436 (patch)
tree6e75634178548a45bb3364cbf3ec99477859f18a
parent55a163fc934622ec2b94551b8cd0e57a33b1a905 (diff)
downloadsystemtap-steved-1f6906212fe1fb43f7df19fa6d2ab018acd89436.tar.gz
systemtap-steved-1f6906212fe1fb43f7df19fa6d2ab018acd89436.tar.xz
systemtap-steved-1f6906212fe1fb43f7df19fa6d2ab018acd89436.zip
Simplify Makefiles.
-rw-r--r--runtime/probes/scf/Makefile15
-rw-r--r--runtime/probes/shellsnoop/Makefile16
-rw-r--r--runtime/probes/tasklet/Makefile18
-rw-r--r--runtime/probes/test4/Makefile16
-rw-r--r--runtime/probes/where_func/Makefile16
5 files changed, 36 insertions, 45 deletions
diff --git a/runtime/probes/scf/Makefile b/runtime/probes/scf/Makefile
index 0a456a00..3f80332b 100644
--- a/runtime/probes/scf/Makefile
+++ b/runtime/probes/scf/Makefile
@@ -1,22 +1,21 @@
# Makefile
PWD := $(shell pwd)
+RT := $(PWD)/../..
KVERSION := $(shell uname -r)
KDIR := /lib/modules/$(KVERSION)/build include
-KALLSYMS_LOOKUP_NAME := $(firstword $(shell grep " kallsyms_lookup_name" /boot/System.map-$(KVERSION)))
-KALLSYMS_LOOKUP := $(firstword $(shell grep " kallsyms_lookup$$" /boot/System.map-$(KVERSION)))
-KTA := $(firstword $(shell grep "__kernel_text_address" /boot/System.map-$(KVERSION)))
+KALLSYMS_LOOKUP_NAME := 0x$(firstword $(shell grep " kallsyms_lookup_name" /boot/System.map-$(KVERSION)))
+KALLSYMS_LOOKUP := 0x$(firstword $(shell grep " kallsyms_lookup$$" /boot/System.map-$(KVERSION)))
+KTA := 0x$(firstword $(shell grep "__kernel_text_address" /boot/System.map-$(KVERSION)))
-CFLAGS += -I $(STP_RUNTIME) -I $(STP_RUNTIME)/relayfs -D KALLSYMS_LOOKUP_NAME=$(KALLSYMS_LOOKUP_NAME) -D KALLSYMS_LOOKUP=$(KALLSYMS_LOOKUP) -D KTA=$(KTA)
+EXTRA_CFLAGS := -I $(RT) -I $(RT)/relayfs -D KALLSYMS_LOOKUP_NAME=$(KALLSYMS_LOOKUP_NAME) -D KALLSYMS_LOOKUP=$(KALLSYMS_LOOKUP) -DKTA=$(KTA)
obj-m := scf.o
+
default:
- $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules \
- KALLSYMS_LOOKUP_NAME=0x$(KALLSYMS_LOOKUP_NAME) \
- KALLSYMS_LOOKUP=0x$(KALLSYMS_LOOKUP) KTA=0x$(KTA) \
- STP_RUNTIME=$(PWD)/../..
+ $(MAKE) V=1 -C $(KDIR) M=$(PWD) RT=$(RT) modules
clean:
/bin/rm -rf *.o *.ko *~ *.mod.c .*.cmd .tmp_versions
diff --git a/runtime/probes/shellsnoop/Makefile b/runtime/probes/shellsnoop/Makefile
index a9db209d..74e35596 100644
--- a/runtime/probes/shellsnoop/Makefile
+++ b/runtime/probes/shellsnoop/Makefile
@@ -1,23 +1,21 @@
# Makefile
PWD := $(shell pwd)
+RT := $(PWD)/../..
KVERSION := $(shell uname -r)
KDIR := /lib/modules/$(KVERSION)/build include
-KALLSYMS_LOOKUP_NAME := $(firstword $(shell grep " kallsyms_lookup_name" /boot/System.map-$(KVERSION)))
-KALLSYMS_LOOKUP := $(firstword $(shell grep " kallsyms_lookup$$" /boot/System.map-$(KVERSION)))
-KTA := $(firstword $(shell grep "__kernel_text_address" /boot/System.map-$(KVERSION)))
+KALLSYMS_LOOKUP_NAME := 0x$(firstword $(shell grep " kallsyms_lookup_name" /boot/System.map-$(KVERSION)))
+KALLSYMS_LOOKUP := 0x$(firstword $(shell grep " kallsyms_lookup$$" /boot/System.map-$(KVERSION)))
+KTA := 0x$(firstword $(shell grep "__kernel_text_address" /boot/System.map-$(KVERSION)))
-CFLAGS += -I $(STP_RUNTIME) -I $(STP_RUNTIME)/relayfs -D KALLSYMS_LOOKUP_NAME=$(KALLSYMS_LOOKUP_NAME) \
- -D KALLSYMS_LOOKUP=$(KALLSYMS_LOOKUP)
+EXTRA_CFLAGS := -I $(RT) -I $(RT)/relayfs -D KALLSYMS_LOOKUP_NAME=$(KALLSYMS_LOOKUP_NAME) -D KALLSYMS_LOOKUP=$(KALLSYMS_LOOKUP) -DKTA=$(KTA)
obj-m := shellsnoop.o
+
default:
- $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules \
- KALLSYMS_LOOKUP_NAME=0x$(KALLSYMS_LOOKUP_NAME) \
- KALLSYMS_LOOKUP=0x$(KALLSYMS_LOOKUP) KTA=0x$(KTA)\
- STP_RUNTIME=$(PWD)/../..
+ $(MAKE) V=1 -C $(KDIR) M=$(PWD) RT=$(RT) modules
clean:
/bin/rm -rf *.o *.ko *~ *.mod.c .*.cmd .tmp_versions
diff --git a/runtime/probes/tasklet/Makefile b/runtime/probes/tasklet/Makefile
index ceb8d4a9..a15e643f 100644
--- a/runtime/probes/tasklet/Makefile
+++ b/runtime/probes/tasklet/Makefile
@@ -1,23 +1,21 @@
# Makefile
PWD := $(shell pwd)
+RT := $(PWD)/../..
KVERSION := $(shell uname -r)
KDIR := /lib/modules/$(KVERSION)/build include
-KALLSYMS_LOOKUP_NAME := $(firstword $(shell grep " kallsyms_lookup_name" /boot/System.map-$(KVERSION)))
-KALLSYMS_LOOKUP := $(firstword $(shell grep " kallsyms_lookup$$" /boot/System.map-$(KVERSION)))
-KTA := $(firstword $(shell grep "__kernel_text_address" /boot/System.map-$(KVERSION)))
+KALLSYMS_LOOKUP_NAME := 0x$(firstword $(shell grep " kallsyms_lookup_name" /boot/System.map-$(KVERSION)))
+KALLSYMS_LOOKUP := 0x$(firstword $(shell grep " kallsyms_lookup$$" /boot/System.map-$(KVERSION)))
+KTA := 0x$(firstword $(shell grep "__kernel_text_address" /boot/System.map-$(KVERSION)))
-CFLAGS += -I $(STP_RUNTIME) -I $(STP_RUNTIME)/relayfs -D KALLSYMS_LOOKUP_NAME=$(KALLSYMS_LOOKUP_NAME) \
- -D KALLSYMS_LOOKUP=$(KALLSYMS_LOOKUP)
+EXTRA_CFLAGS := -I $(RT) -I $(RT)/relayfs -D KALLSYMS_LOOKUP_NAME=$(KALLSYMS_LOOKUP_NAME) -D KALLSYMS_LOOKUP=$(KALLSYMS_LOOKUP)
+
+obj-m := tasklet.o
-obj-m := stp_tasklet.o
default:
- $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules \
- KALLSYMS_LOOKUP_NAME=0x$(KALLSYMS_LOOKUP_NAME) \
- KALLSYMS_LOOKUP=0x$(KALLSYMS_LOOKUP) KTA=0x$(KTA)\
- STP_RUNTIME=$(PWD)/../..
+ $(MAKE) V=1 -C $(KDIR) M=$(PWD) RT=$(RT) modules
clean:
/bin/rm -rf *.o *.ko *~ *.mod.c .*.cmd .tmp_versions
diff --git a/runtime/probes/test4/Makefile b/runtime/probes/test4/Makefile
index 8b973baa..60afe8ab 100644
--- a/runtime/probes/test4/Makefile
+++ b/runtime/probes/test4/Makefile
@@ -1,23 +1,21 @@
# Makefile
PWD := $(shell pwd)
+RT := $(PWD)/../..
KVERSION := $(shell uname -r)
KDIR := /lib/modules/$(KVERSION)/build include
-KALLSYMS_LOOKUP_NAME := $(firstword $(shell grep " kallsyms_lookup_name" /boot/System.map-$(KVERSION)))
-KALLSYMS_LOOKUP := $(firstword $(shell grep " kallsyms_lookup$$" /boot/System.map-$(KVERSION)))
-KTA := $(firstword $(shell grep "__kernel_text_address" /boot/System.map-$(KVERSION)))
+KALLSYMS_LOOKUP_NAME := 0x$(firstword $(shell grep " kallsyms_lookup_name" /boot/System.map-$(KVERSION)))
+KALLSYMS_LOOKUP := 0x$(firstword $(shell grep " kallsyms_lookup$$" /boot/System.map-$(KVERSION)))
+KTA := 0x$(firstword $(shell grep "__kernel_text_address" /boot/System.map-$(KVERSION)))
-CFLAGS += -I $(STP_RUNTIME) -I $(STP_RUNTIME)/relayfs -D KALLSYMS_LOOKUP_NAME=$(KALLSYMS_LOOKUP_NAME) \
- -D KALLSYMS_LOOKUP=$(KALLSYMS_LOOKUP)
+EXTRA_CFLAGS := -I $(RT) -I $(RT)/relayfs -D KALLSYMS_LOOKUP_NAME=$(KALLSYMS_LOOKUP_NAME) -D KALLSYMS_LOOKUP=$(KALLSYMS_LOOKUP) -DKTA=$(KTA)
obj-m := test4.o
+
default:
- $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules \
- KALLSYMS_LOOKUP_NAME=0x$(KALLSYMS_LOOKUP_NAME) \
- KALLSYMS_LOOKUP=0x$(KALLSYMS_LOOKUP) KTA=0x$(KTA)\
- STP_RUNTIME=$(PWD)/../..
+ $(MAKE) V=1 -C $(KDIR) M=$(PWD) RT=$(RT) modules
clean:
/bin/rm -rf *.o *.ko *~ *.mod.c .*.cmd .tmp_versions
diff --git a/runtime/probes/where_func/Makefile b/runtime/probes/where_func/Makefile
index 30a3a41f..c2c7d6bd 100644
--- a/runtime/probes/where_func/Makefile
+++ b/runtime/probes/where_func/Makefile
@@ -1,23 +1,21 @@
# Makefile
PWD := $(shell pwd)
+RT := $(PWD)/../..
KVERSION := $(shell uname -r)
KDIR := /lib/modules/$(KVERSION)/build include
-KALLSYMS_LOOKUP_NAME := $(firstword $(shell grep " kallsyms_lookup_name" /boot/System.map-$(KVERSION)))
-KALLSYMS_LOOKUP := $(firstword $(shell grep " kallsyms_lookup$$" /boot/System.map-$(KVERSION)))
-KTA := $(firstword $(shell grep "__kernel_text_address" /boot/System.map-$(KVERSION)))
+KALLSYMS_LOOKUP_NAME := 0x$(firstword $(shell grep " kallsyms_lookup_name" /boot/System.map-$(KVERSION)))
+KALLSYMS_LOOKUP := 0x$(firstword $(shell grep " kallsyms_lookup$$" /boot/System.map-$(KVERSION)))
+KTA := 0x$(firstword $(shell grep "__kernel_text_address" /boot/System.map-$(KVERSION)))
-CFLAGS += -I $(STP_RUNTIME) -I $(STP_RUNTIME)/relayfs -D KALLSYMS_LOOKUP_NAME=$(KALLSYMS_LOOKUP_NAME) \
- -D KALLSYMS_LOOKUP=$(KALLSYMS_LOOKUP)
+EXTRA_CFLAGS := -I $(RT) -I $(RT)/relayfs -D KALLSYMS_LOOKUP_NAME=$(KALLSYMS_LOOKUP_NAME) -D KALLSYMS_LOOKUP=$(KALLSYMS_LOOKUP) -DKTA=$(KTA)
obj-m := kprobe_where_funct.o
+
default:
- $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules \
- KALLSYMS_LOOKUP_NAME=0x$(KALLSYMS_LOOKUP_NAME) \
- KALLSYMS_LOOKUP=0x$(KALLSYMS_LOOKUP) KTA=0x$(KTA)\
- STP_RUNTIME=$(PWD)/../..
+ $(MAKE) V=1 -C $(KDIR) M=$(PWD) RT=$(RT) modules
clean:
/bin/rm -rf *.o *.ko *~ *.mod.c .*.cmd .tmp_versions