1
# LLVM LOCAL file build machinery
2
# LLVM Compiler Makefile for use by buildit.
4
# This makefile is intended only for use with B&I buildit. For "normal" builds
5
# use the conventional top-level makefile.
7
# You can specify TARGETS=ppc (or i386) on the buildit command line to limit the
8
# build to just one target. The default is for ppc and i386. The compiler
9
# targetted at this host gets built anyway, but not installed unless it's listed
12
# Include the set of standard Apple makefile definitions.
13
ifndef CoreOSMakefiles
14
CoreOSMakefiles = $(MAKEFILEPATH)/CoreOS
16
include $(CoreOSMakefiles)/Standard/Standard.make
18
# Enable Apple extensions to (gnu)make.
19
USE_APPLE_PB_SUPPORT = all
23
targets = echo $(RC_ARCHS)
24
TARGETS := $(shell $(targets))
28
SRC = $(shell cd $(SRCROOT) && pwd | sed s,/private,,)
30
SYMROOT = $(OBJROOT)/../sym
31
DSTROOT = $(OBJROOT)/../dst
33
#######################################################################
37
# Unless assertions are forced on in the GMAKE command line, disable them.
38
ifndef ENABLE_ASSERTIONS
39
ENABLE_ASSERTIONS := no
42
# Default is optimized build.
43
ifeq ($(LLVM_DEBUG),1)
49
ifndef RC_ProjectSourceVersion
50
RC_ProjectSourceVersion = 9999
53
ifndef RC_ProjectSourceSubversion
54
RC_ProjectSourceSubversion = 0
57
# NOTE : Always put version numbers at the end because they are optional.
58
install: $(OBJROOT) $(SYMROOT) $(DSTROOT)
60
$(SRC)/utils/buildit/build_llvm "$(RC_ARCHS)" "$(TARGETS)" \
61
$(SRC) $(PREFIX) $(DSTROOT) $(SYMROOT) \
62
$(ENABLE_ASSERTIONS) $(LLVM_OPTIMIZED) \
63
$(RC_ProjectSourceVersion) $(RC_ProjectSourceSubversion)
66
# installhdrs does nothing, because the headers aren't useful until
67
# the compiler is installed.
70
# We build and install in one shell script.
75
@echo ++++++++++++++++++++++
76
@echo + Installing sources +
77
@echo ++++++++++++++++++++++
79
if [ $(SRCROOT) != . ]; then \
80
$(PAX) -rw . $(SRCROOT); \
82
find -d "$(SRCROOT)" \( -type d -a -name .svn -o \
83
-type f -a -name .DS_Store -o \
84
-name \*~ -o -name .\#\* \) \
86
rm -rf "$(SRCROOT)/test"
88
#######################################################################
96
@if [ -d $(OBJROOT) -a "$(OBJROOT)" != / ]; then \
97
echo '*** DELETING ' $(OBJROOT); \
100
@if [ -d $(SYMROOT) -a "$(SYMROOT)" != / ]; then \
101
echo '*** DELETING ' $(SYMROOT); \
104
@if [ -d $(DSTROOT) -a "$(DSTROOT)" != / ]; then \
105
echo '*** DELETING ' $(DSTROOT); \
109
#######################################################################
111
$(OBJROOT) $(SYMROOT) $(DSTROOT):
114
.PHONY: install installsrc clean