head	1.4;
access;
symbols;
locks; strict;
comment	@# @;


1.4
date	2010.10.11.17.22.16;	author dim;	state dead;
branches;
next	1.3;

1.3
date	2010.09.20.16.43.17;	author dim;	state Exp;
branches;
next	1.2;

1.2
date	2010.07.20.17.16.57;	author ed;	state Exp;
branches;
next	1.1;

1.1
date	2010.06.09.17.59.52;	author rdivacky;	state Exp;
branches;
next	;


desc
@@


1.4
log
@SVN rev 213695 on 2010-10-11 17:22:16Z by dim

Remove more unneeded files and directories from contrib/llvm.  This
still allows us to build tblgen and clang, and further reduces the
footprint in the tree.

Approved by:	rpaulo (mentor)
@
text
@# LLVM LOCAL file build machinery
# LLVM Compiler Makefile for use by buildit.  
#
# This makefile is intended only for use with B&I buildit. For "normal" builds
# use the conventional top-level makefile.
#
# You can specify TARGETS=ppc (or i386) on the buildit command line to limit the
# build to just one target. The default is for ppc and i386. The compiler
# targetted at this host gets built anyway, but not installed unless it's listed
# in TARGETS.

# Include the set of standard Apple makefile definitions.
ifndef CoreOSMakefiles
CoreOSMakefiles = $(MAKEFILEPATH)/CoreOS
endif
include $(CoreOSMakefiles)/Standard/Standard.make

# Enable Apple extensions to (gnu)make.
USE_APPLE_PB_SUPPORT = all

RC_ARCHS := ppc i386
HOSTS = $(RC_ARCHS)
targets = echo $(RC_ARCHS)
TARGETS := $(shell $(targets))

SRCROOT = .

SRC = $(shell cd $(SRCROOT) && pwd | sed s,/private,,)
OBJROOT = $(SRC)/obj
SYMROOT = $(OBJROOT)/../sym
DSTROOT = $(OBJROOT)/../dst

#######################################################################

PREFIX = /Developer/usr/local

# Unless assertions are forced on in the GMAKE command line, disable them.
ifndef ENABLE_ASSERTIONS
ENABLE_ASSERTIONS := no
endif

# Default is optimized build.
ifeq ($(LLVM_DEBUG),1)
LLVM_OPTIMIZED := no
else
LLVM_OPTIMIZED := yes
endif

# Default to not install libLTO.dylib.
INSTALL_LIBLTO := no

# Default to do a native build, not a cross-build for an ARM host or simulator.
ARM_HOSTED_BUILD := no
IOS_SIM_BUILD := no

ifndef RC_ProjectSourceVersion
RC_ProjectSourceVersion = 9999
endif

ifndef RC_ProjectSourceSubversion
RC_ProjectSourceSubversion = 0
endif

# NOTE : Always put version numbers at the end because they are optional.
install: $(OBJROOT) $(SYMROOT) $(DSTROOT)
	cd $(OBJROOT) && \
	  $(SRC)/utils/buildit/build_llvm "$(RC_ARCHS)" "$(TARGETS)" \
	    $(SRC) $(PREFIX) $(DSTROOT) $(SYMROOT) \
	    $(ENABLE_ASSERTIONS) $(LLVM_OPTIMIZED) $(INSTALL_LIBLTO) \
	    $(ARM_HOSTED_BUILD) $(IOS_SIM_BUILD) \
	    $(RC_ProjectSourceVersion) $(RC_ProjectSourceSubversion) 

EmbeddedHosted:
	$(MAKE) ARM_HOSTED_BUILD=yes PREFIX=/usr/local install

# When building for the iOS simulator, MACOSX_DEPLOYMENT_TARGET is not set
# by default, but it needs to be set when building tools that run on the host
# (e.g., tblgen), so set it here.
EmbeddedSim:
	export MACOSX_DEPLOYMENT_TARGET=`sw_vers -productVersion`; \
	$(MAKE) IOS_SIM_BUILD=yes PREFIX=$(SDKROOT)/usr/local install

# installhdrs does nothing, because the headers aren't useful until
# the compiler is installed.
installhdrs:

# We build and install in one shell script.
build: 

installsrc:
	@@echo
	@@echo ++++++++++++++++++++++
	@@echo + Installing sources +
	@@echo ++++++++++++++++++++++
	@@echo
	if [ $(SRCROOT) != . ]; then \
	  $(PAX) -rw . $(SRCROOT); \
	fi
	find -d "$(SRCROOT)" \( -type d -a -name .svn -o \
	                        -type f -a -name .DS_Store -o \
				-name \*~ -o -name .\#\* \) \
	  -exec rm -rf {} \;
	rm -rf "$(SRCROOT)/test"

#######################################################################

clean:
	@@echo
	@@echo ++++++++++++
	@@echo + Cleaning +
	@@echo ++++++++++++
	@@echo
	@@if [ -d $(OBJROOT) -a "$(OBJROOT)" != / ]; then \
	  echo '*** DELETING ' $(OBJROOT); \
	  rm -rf $(OBJROOT); \
	fi
	@@if [ -d $(SYMROOT) -a "$(SYMROOT)" != / ]; then \
	  echo '*** DELETING ' $(SYMROOT); \
	  rm -rf $(SYMROOT); \
	fi
	@@if [ -d $(DSTROOT) -a "$(DSTROOT)" != / ]; then \
	  echo '*** DELETING ' $(DSTROOT); \
	  rm -rf $(DSTROOT); \
	fi

#######################################################################

$(OBJROOT) $(SYMROOT) $(DSTROOT):
	mkdir -p $@@

.PHONY: install installsrc clean EmbeddedHosted EmbeddedSim
@


1.3
log
@SVN rev 212904 on 2010-09-20 16:43:17Z by dim

Upgrade our Clang in base to r114020, from upstream's release_28 branch.

Approved-by:	rpaulo (mentor)
@
text
@@


1.2
log
@SVN rev 210299 on 2010-07-20 17:16:57Z by ed

Upgrade our Clang in base to r108428.

This commit merges the latest LLVM sources from the vendor space. It
also updates the build glue to match the new sources. Clang's version
number is changed to match LLVM's, which means /usr/include/clang/2.0
has been renamed to /usr/include/clang/2.8.

Obtained from:	projects/clangbsd
@
text
@d52 1
a52 1
# Default to do a native build, not a cross-build for an ARM host.
d54 1
d70 1
a70 1
	    $(ARM_HOSTED_BUILD) \
d74 8
a81 1
	$(MAKE) ARM_HOSTED_BUILD=yes PREFIX=/usr install
d131 1
a131 1
.PHONY: install installsrc clean EmbeddedHosted
@


1.1
log
@SVN rev 208954 on 2010-06-09 17:59:52Z by rdivacky

Import LLVM/clang from vendor stripped of docs/ test/ website/ www/ examples/
in llvm/ and/or llvm/contrib/clang/ respectively.

Approved by:	ed (mentor)
Approved by:	core
@
text
@d35 1
a35 1
PREFIX = /usr/local
d73 1
a73 1
	$(MAKE) ARM_HOSTED_BUILD=yes install
@

