]> xenbits.xensource.com Git - xentesttools/bootstrap.git/commitdiff
Makefile: build perf and oprofile (also add cpupower)
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 15 Jun 2012 15:48:04 +0000 (11:48 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 20 Jun 2012 17:46:35 +0000 (13:46 -0400)
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Conflicts:

root_image/Makefile

root_image/Makefile

index 40701af4e30fc1af8d32dfabbf10d73ccea787a5..30a41bede8fbc8f1855456b6255da3b0c93d37a0 100644 (file)
@@ -41,7 +41,7 @@ FC12_RPM = 1
 endif
 
 NCPUS := $(shell grep processor /proc/cpuinfo | wc -l)
-TOP = ../
+TOP = $(shell pwd)/../
 include $(TOP)/sources.mk
 LINUX_DST = $(TOP)/linux-build
 LINUX_SRC = $(dir $(CURDIR))linux
@@ -189,7 +189,7 @@ distdir:
 # It does not include the Linux drivers/modules found in the modulespace target
 .PHONY:        root_image-userspace-install netperf-install
 
-#root_image-userspace-install: $(USERSPACE_INSTALL) add-libs add-bins add-debug-bins tools-install wget-install vim-install rsync-install openssh-install xtt-tools-install netperf-install lvm2-install plymouth-install pciutils-install iscsi-install bridge-utils-install xend-install nfs-install fio-install directfb-install irqbalance-install pm-utils-install cpufrequtils-install kexec-tools-install
+#root_image-userspace-install: $(USERSPACE_INSTALL) add-libs add-bins add-debug-bins tools-install wget-install vim-install rsync-install openssh-install xtt-tools-install netperf-install lvm2-install plymouth-install pciutils-install iscsi-install bridge-utils-install xend-install nfs-install fio-install directfb-install irqbalance-install pm-utils-install cpufrequtils-install kexec-tools-install perf-install oprofile-install
 
 root_image-userspace-install: $(USERSPACE_INSTALL) add-libs add-bins  tools-install netperf-install
        rm -rf userspace/man
@@ -808,6 +808,36 @@ xen-4.2-depend:
        $(call RPM_TO_USERSPACE,*libldap*.so*,$(RPM_DIR)/openldap)
        $(call RPM_TO_USERSPACE,*libgthread*.so*,$(RPM_DIR)/glib2)
 
+.PHONY: power-depend
+power-depend:
+
+.PHONY: perf-depend
+perf-depend:
+       $(call RPM_TO_USERSPACE,*libelf*.so*,$(RPM_DIR)/elfutils-libelf)
+       $(call RPM_TO_USERSPACE,*libdw*.so*,$(RPM_DIR)/elfutils-libs)
+       $(call RPM_TO_USERSPACE,*libnewt*.so*,$(RPM_DIR)/newt)
+       $(call RPM_TO_USERSPACE,*libslang*.so*,$(RPM_DIR)/slang)
+       $(call RPM_TO_USERSPACE,*libnewt*.so*,$(RPM_DIR)/newt)
+       $(call RPM_TO_USERSPACE,./usr/bin/less,$(RPM_DIR)/less)
+       $(call RPM_TO_USERSPACE,./usr/bin/expand,$(RPM_DIR)/coreutils)
+
+.PHONY: perf-install
+perf-install: perf-depend
+       $(MAKE) -j$$(($(NCPUS) * 2)) $(MFLAGS) V=1 NO_GTK2=1 DESTDIR=$(shell pwd)/userspace/ -C $(LINUX_SRC)/tools O=$(LINUX_DST) perf_install
+
+.PHONY: power-install
+power-install: power-depend
+       $(MAKE) $(MFLAGS) V=1 DESTDIR=$(shell pwd)/userspace/ -C $(LINUX_SRC)/tools O=$(LINUX_DST) cpupower_install
+ifeq ($(RPM_ARCH), x86_64)
+       (cd userspace/usr$(LIBSDIR); ln -fs  ../lib/libcpupower.so.0)
+endif
+
+.PHONY: oprofile-install
+oprofile-install:
+       if ! [ -e oprofile/config.h ]; then (cd oprofile; ./autogen.sh;./configure --prefix=/usr); fi
+       $(MAKE) $(MFLAGS) -j$$(($(NCPUS) * 2)) -C oprofile
+       $(MAKE) $(MFLAGS) -j$$(($(NCPUS) * 2)) -C oprofile prefix=$(CURDIR)/userspace install
+
 XEN_SRC = $(dir $(CURDIR))xen
 XEN_DISTDIR = $(dir $(CURDIR))xen/dist/install