From bc4511c0744586572e31168154fc2d6a009298ac Mon Sep 17 00:00:00 2001 From: John Criswell Date: Sat, 6 Sep 2003 15:03:24 +0000 Subject: [PATCH] Checkin of autoconf-style object root. Modified Makefiles to use the new Makefile setup in LLVM. llvm-svn: 8380 --- llvm/projects/ModuleMaker/Makefile.common | 21 +++++++++++++++++---- llvm/projects/sample/Makefile | 2 +- llvm/projects/sample/Makefile.common | 21 +++++++++++++++++---- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/llvm/projects/ModuleMaker/Makefile.common b/llvm/projects/ModuleMaker/Makefile.common index 9b34d8752726..b90ad9f92649 100644 --- a/llvm/projects/ModuleMaker/Makefile.common +++ b/llvm/projects/ModuleMaker/Makefile.common @@ -1,10 +1,23 @@ # -# Set this variable to the top of the LLVM source tree. +# Configure the location of the LLVM object root. We know it is two +# directories up. The source tree location we do not know; let the LLVM +# Makefiles find it for us. # -LLVM_SRC_ROOT = $(LEVEL)/../.. +LLVM_OBJ_ROOT=$(LEVEL)/../.. # -# Include LLVM's Master Makefile. +# Grab the LLVM configuration file. # -include $(LLVM_SRC_ROOT)/Makefile.common +include $(LEVEL)/../../Makefile.config + +# +# Reconfigure the source directories +# +BUILD_SRC_ROOT:=$(LLVM_SRC_ROOT)/projects/ModuleMaker +BUILD_SRC_DIR := $(subst //,/,$(BUILD_SRC_ROOT)/$(patsubst $(BUILD_OBJ_ROOT)%,%,$(BUILD_OBJ_DIR))) + +# +# Include LLVM's build rules. +# +include $(LLVM_SRC_ROOT)/Makefile.rules diff --git a/llvm/projects/sample/Makefile b/llvm/projects/sample/Makefile index 7b25c355350e..1fe32c795e9d 100644 --- a/llvm/projects/sample/Makefile +++ b/llvm/projects/sample/Makefile @@ -10,7 +10,7 @@ LEVEL = . # # Directories that needs to be built. # -#DIRS = lib tools +DIRS = lib tools # # Include the Master Makefile that knows how to build all. diff --git a/llvm/projects/sample/Makefile.common b/llvm/projects/sample/Makefile.common index 9b34d8752726..7fa7185ddd7f 100644 --- a/llvm/projects/sample/Makefile.common +++ b/llvm/projects/sample/Makefile.common @@ -1,10 +1,23 @@ # -# Set this variable to the top of the LLVM source tree. +# Configure the location of the LLVM object root. We know it is two +# directories up. The source tree location we do not know; let the LLVM +# Makefiles find it for us. # -LLVM_SRC_ROOT = $(LEVEL)/../.. +LLVM_OBJ_ROOT=$(LEVEL)/../.. # -# Include LLVM's Master Makefile. +# Grab the LLVM configuration file. # -include $(LLVM_SRC_ROOT)/Makefile.common +include $(LEVEL)/../../Makefile.config + +# +# Reconfigure the source directories +# +BUILD_SRC_ROOT:=$(LLVM_SRC_ROOT)/projects/sample +BUILD_SRC_DIR := $(subst //,/,$(BUILD_SRC_ROOT)/$(patsubst $(BUILD_OBJ_ROOT)%,%,$(BUILD_OBJ_DIR))) + +# +# Include LLVM's build rules. +# +include $(LLVM_SRC_ROOT)/Makefile.rules