[llvm-branch-commits] [cfe-branch] r121031 - /cfe/branches/Apple/lemur-IB/Makefile
Daniel Dunbar
daniel at zuster.org
Mon Dec 6 11:48:25 PST 2010
Author: ddunbar
Date: Mon Dec 6 13:48:25 2010
New Revision: 121031
URL: http://llvm.org/viewvc/llvm-project?rev=121031&view=rev
Log:
Tweak Makefiles to allow building with VS9 or VS10, and move back to VS9 as the default.
Modified:
cfe/branches/Apple/lemur-IB/Makefile
Modified: cfe/branches/Apple/lemur-IB/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/lemur-IB/Makefile?rev=121031&r1=121030&r2=121031&view=diff
==============================================================================
--- cfe/branches/Apple/lemur-IB/Makefile (original)
+++ cfe/branches/Apple/lemur-IB/Makefile Mon Dec 6 13:48:25 2010
@@ -12,10 +12,40 @@
CMAKE := cmake
endif
+# Default to using VS 9 2008.
+VS_VERSION := 9
+
+# Determine the build information for the VS_VERSION.
+ifeq ($(VS_VERSION),9)
+
+VSVARS := $(VS90COMNTOOLS)\vsvars32.bat
+VCBUILD := $(VS90COMNTOOLS)\..\..\VC\VCPackages\vcbuild
+GENERATOR_NAME := Visual Studio 9 2008
+JOBS := $(NUMBER_OF_PROCESSORS)
+BUILD_COMMAND := "$(VCBUILD)"
+PARALLEL_ARGS := /M$(JOBS)
+TARGET := "Release|Win32"
+PROJ_EXT := vcproj
+
+else ifeq ($(VS_VERSION),10)
+
VSVARS := $(VS100COMNTOOLS)\vsvars32.bat
MSBUILD := C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
+GENERATOR_NAME := Visual Studio 10
+# FIXME: Parallel builds are borked in VS10?
JOBS := 1
+BUILD_COMMAND := "$(MSBUILD)"
+PARALLEL_BUILD_ARGS := /maxcpucount:$(JOBS)
+TARGET := /p:Configuration=Release /p:Platform=Win32
+PROJ_EXT := vcxproj
+
+else
+
+$(error Invalid VS_VERSION: $(VS_VERSION))
+
+endif
+# Determine the build target.
ifeq ($(ENABLE_TESTS),1)
BUILD_TARGET := test
else
@@ -43,8 +73,6 @@
# Override CMake default libraries list, which is much larger than we need.
CXXLIBS := kernel32.lib user32.lib advapi32.lib
-TARGET := /p:Configuration=Release /p:Platform=Win32
-
all:: help
help:
@@ -76,16 +104,16 @@
"-DLLVM_INCLUDE_TESTS:=OFF" \
"-DLLVM_BUILD_EXAMPLES:=OFF" \
"-DLLVM_BUILD_TESTS:=OFF" \
- -G "Visual Studio 10" \
+ -G "$(GENERATOR_NAME)" \
"$(SRCROOT)\src"
# FIXME: Only build clang.
build: configure
- "$(MSBUILD)" /maxcpucount:$(JOBS) "$(OBJROOT)"\LLVM.sln $(TARGET)
- "$(MSBUILD)" /maxcpucount:$(JOBS) "$(OBJROOT)"\INSTALL.vcxproj $(TARGET)
+ $(BUILD_COMMAND) $(PARALLEL_BUILD_ARGS) "$(OBJROOT)"\LLVM.sln $(TARGET)
+ $(BUILD_COMMAND) $(PARALLEL_BUILD_ARGS) "$(OBJROOT)"\INSTALL.$(PROJ_EXT) $(TARGET)
test: build
- "$(MSBUILD)" "$(OBJROOT)"\tools\clang\test\clang-test.vcxproj $(TARGET)
+ $(BUILD_COMMAND) "$(OBJROOT)"\tools\clang\test\clang-test.$(PROJ_EXT) $(TARGET)
install: $(BUILD_TARGET)
"$(CMAKE)" -E make_directory "$(BINDEST)"
More information about the llvm-branch-commits
mailing list