X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=Makefile;h=0a27cbed46bd67596aaadc105bf04a26889aca90;hb=1014647e40020a67da79db6732168b7c7d85dbe0;hp=5a25a799b2ff93be26e63f2b38134cd639bedcba;hpb=30ea2fa93314e5b6ce3f58beaffe37f04ba76ac8;p=oota-llvm.git diff --git a/Makefile b/Makefile index 5a25a799b2f..0a27cbed46b 100644 --- a/Makefile +++ b/Makefile @@ -6,26 +6,38 @@ # the University of Illinois Open Source License. See LICENSE.TXT for details. # #===------------------------------------------------------------------------===# -LEVEL = . -DIRS = lib/System lib/Support utils lib -include $(LEVEL)/Makefile.common +LEVEL := . +DIRS := lib/System lib/Support utils lib/VMCore lib tools runtime docs +OPTIONAL_DIRS := examples projects +EXTRA_DIST := test llvm.spec include win32 Xcode + +include $(LEVEL)/Makefile.config + +# llvm-gcc4 doesn't need runtime libs. +ifeq ($(LLVMGCC_MAJVERS),4) + DIRS := $(filter-out runtime, $(DIRS)) +endif + +ifeq ($(MAKECMDGOALS),libs-only) + DIRS := $(filter-out tools runtime docs, $(DIRS)) + OPTIONAL_DIRS := +endif ifeq ($(MAKECMDGOALS),tools-only) - DIRS += tools -else - ifneq ($(MAKECMDGOALS),libs-only) - DIRS += tools - ifneq ($(LLVMGCC_MAJVERS),4) - DIRS += runtime - else - $(warning Skipping runtime libraries, llvm-gcc 4 detected.) - endif - DIRS += docs - endif - OPTIONAL_DIRS = examples projects + DIRS := $(filter-out runtime docs, $(DIRS)) + OPTIONAL_DIRS := endif -EXTRA_DIST := test llvm.spec include + +# Don't install utils, examples, or projects they are only used to +# build LLVM. +ifeq ($(MAKECMDGOALS),install) + DIRS := $(filter-out utils, $(DIRS)) + OPTIONAL_DIRS := +endif + +# Include the main makefile machinery. +include $(LLVM_SRC_ROOT)/Makefile.rules # Specify options to pass to configure script when we're # running the dist-check target @@ -85,3 +97,13 @@ ifeq ($(BuildMode),Debug) $(Echo) '*****' make an optimized build. endif +check-llvm2cpp: + $(MAKE) check TESTSUITE=Feature RUNLLVM2CPP=1 + +srpm: $(LLVM_OBJ_ROOT)/llvm.spec + rpmbuild -bs $(LLVM_OBJ_ROOT)/llvm.spec + +rpm: $(LLVM_OBJ_ROOT)/llvm.spec + rpmbuild -bb --target $(TARGET_TRIPLE) $(LLVM_OBJ_ROOT)/llvm.spec + +.PHONY: srpm rpm