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 ifdef ENABLE_ASSERTIONS
39 LLVM_ASSERTIONS := yes
44 ifndef RC_ProjectSourceVersion
45 RC_ProjectSourceVersion = 9999
48 ifndef RC_ProjectSourceSubversion
49 RC_ProjectSourceSubversion = 01
52 install: $(OBJROOT) $(SYMROOT) $(DSTROOT)
54 $(SRC)/build_llvm "$(RC_ARCHS)" "$(TARGETS)" \
55 $(SRC) $(PREFIX) $(DSTROOT) $(SYMROOT) \
56 $(RC_ProjectSourceVersion) $(RC_ProjectSourceSubversion) \
59 # installhdrs does nothing, because the headers aren't useful until
60 # the compiler is installed.
63 # We build and install in one shell script.
68 @echo ++++++++++++++++++++++
69 @echo + Installing sources +
70 @echo ++++++++++++++++++++++
72 if [ $(SRCROOT) != . ]; then \
73 $(PAX) -rw . $(SRCROOT); \
75 find -d "$(SRCROOT)" \( -type d -a -name .svn -o \
76 -type f -a -name .DS_Store -o \
77 -name \*~ -o -name .\#\* \) \
80 #######################################################################
88 @if [ -d $(OBJROOT) -a "$(OBJROOT)" != / ]; then \
89 echo '*** DELETING ' $(OBJROOT); \
92 @if [ -d $(SYMROOT) -a "$(SYMROOT)" != / ]; then \
93 echo '*** DELETING ' $(SYMROOT); \
96 @if [ -d $(DSTROOT) -a "$(DSTROOT)" != / ]; then \
97 echo '*** DELETING ' $(DSTROOT); \
101 #######################################################################
103 $(OBJROOT) $(SYMROOT) $(DSTROOT):
106 .PHONY: install installsrc clean