X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=Makefile.common;h=20a991c4cb9322034b7f961a5fca1b6d576932e0;hb=1c28b42310b183a141fa3b40d07a6cfbdb97ee02;hp=5770ada82720a19a418d39343e666e22629bdab9;hpb=f8d630a0fa5dfdbf64ab875372fe83a3742926dc;p=oota-llvm.git diff --git a/Makefile.common b/Makefile.common index 5770ada8272..20a991c4cb9 100644 --- a/Makefile.common +++ b/Makefile.common @@ -5,7 +5,8 @@ # These are platform dependant, so this is the file used to specify these # system dependant operations. # -# The following functionality may be set by setting incoming variables: +# The following functionality can be set by setting incoming variables. +# The variable $(LEVEL) *must* be set: # # 1. LEVEL - The level of the current subdirectory from the top of the # MagicStats view. This level should be expressed as a path, for @@ -22,6 +23,10 @@ # #===-----------------------------------------------------------------------==== +# Configuration file to set paths specific to local installation of LLVM +# +include $(LEVEL)/Makefile.config + # These are options that can either be enabled here, or can be enabled on the # make command line (ie, make ENABLE_PROFILING=1) # @@ -41,10 +46,6 @@ # #ENABLE_OPTIMIZED = 1 -# If you do not want to build into /shared, uncomment this -# -#BUILD_ROOT = . - ifdef SHARED_LIBRARY # if SHARED_LIBRARY is specified, the default is to build the dynamic lib dynamic :: @@ -61,13 +62,12 @@ install :: # /shared directory by default because it is guaranteed to be local to the # current machine. # -ifdef BUILD_ROOT -BUILD_ROOT_TOP := $(LEVEL) +ifeq ($(LLVM_OBJ_DIR),.) +BUILD_ROOT = $(LLVM_OBJ_DIR) +BUILD_ROOT_TOP = $(LEVEL) else -LOGIN_NAME := $(shell whoami) -CUR_DIRECTORY := $(shell pwd) -BUILD_ROOT := /shared/$(LOGIN_NAME)$(patsubst $(HOME)%,%,$(CUR_DIRECTORY)) +BUILD_ROOT := $(LLVM_OBJ_DIR)$(patsubst $(HOME)%,%,$(shell pwd)) # Calculate the BUILD_ROOT_TOP variable, which is the top of the llvm/ tree. # Note that although this is just equal to $(BUILD_ROOT)/$(LEVEL), we cannot use @@ -76,22 +76,20 @@ BUILD_ROOT := /shared/$(LOGIN_NAME)$(patsubst $(HOME)%,%,$(CUR_DIRECTORY)) # the directory to eliminate the ../'s # TOP_DIRECTORY := $(shell cd $(LEVEL); pwd) -BUILD_ROOT_TOP := /shared/$(LOGIN_NAME)$(patsubst $(HOME)%,%,$(TOP_DIRECTORY)) +BUILD_ROOT_TOP := $(LLVM_OBJ_DIR)$(patsubst $(HOME)%,%,$(TOP_DIRECTORY)) endif #-------------------------------------------------------------------- -# Installation configuration options... +# Variables derived from configuration options... #-------------------------------------------------------------------- #BinInstDir=/usr/local/bin #LibInstDir=/usrl/local/lib/xxx #DocInstDir=/usr/doc/xxx -BURG = /home/vadve/vadve/Research/DynOpt/Burg/burg BURG_OPTS = -I - -PURIFY = /usr/dcs/applications/purify/bin/purify -cache-dir="$(BUILD_ROOT_TOP)/../purifycache" -chain-length="30" -messages=all +PURIFY := $(PURIFY) -cache-dir="$(BUILD_ROOT_TOP)/../purifycache" -chain-length="30" -messages=all # Shorthand for commonly accessed directories LIBDEBUG := $(BUILD_ROOT_TOP)/lib/Debug