Blob Blame History Raw
diff -up trace-cmd-1.2.20120606git8266dff/Makefile.orig trace-cmd-1.2.20120606git8266dff/Makefile
--- trace-cmd-1.2.20120606git8266dff/Makefile.orig	2012-08-28 16:24:54.445210277 -0400
+++ trace-cmd-1.2.20120606git8266dff/Makefile	2012-08-28 16:37:52.705480585 -0400
@@ -13,6 +13,11 @@ FILE_VERSION = 6
 
 MAKEFLAGS += --no-print-directory
 
+# figure out what arch we are on and install to the right place
+ARCH = $(shell getconf LONG_BIT)
+LIBDIR_32 = lib
+LIBDIR_64 = lib64
+LIBDIR=$(LIBDIR_$(ARCH))
 # Makefiles suck: This macro sets a default value of $(2) for the
 # variable named by $(1), unless the variable has been set by
 # environment or command line. This is necessary for CC and AR
@@ -56,7 +61,7 @@ ifeq ($(prefix),$(HOME))
 plugin_dir = $(HOME)/.trace-cmd/plugins
 python_dir = $(HOME)/.trace-cmd/python
 else
-plugin_dir = $(prefix)/share/trace-cmd/plugins
+plugin_dir = $(prefix)/$(LIBDIR)/trace-cmd
 python_dir = $(prefix)/share/trace-cmd/python
 PLUGIN_DIR = -DPLUGIN_DIR="$(plugin_dir)"
 PYTHON_DIR = -DPYTHON_DIR="$(python_dir)"