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 # Default is optimized build.
45 ifeq ($(LLVM_DEBUG
),1)
51 ifndef RC_ProjectSourceVersion
52 RC_ProjectSourceVersion
= 9999
55 ifndef RC_ProjectSourceSubversion
56 RC_ProjectSourceSubversion
= 0
59 # NOTE : Always put version numbers at the end because they are optional.
60 install: $(OBJROOT
) $(SYMROOT
) $(DSTROOT
)
62 $(SRC
)/build_llvm
"$(RC_ARCHS)" "$(TARGETS)" \
63 $(SRC
) $(PREFIX
) $(DSTROOT
) $(SYMROOT
) \
64 $(LLVM_ASSERTIONS
) $(LLVM_OPTIMIZED
) \
65 $(RC_ProjectSourceVersion
) $(RC_ProjectSourceSubversion
)
68 # installhdrs does nothing, because the headers aren't useful until
69 # the compiler is installed.
72 # We build and install in one shell script.
77 @echo
++++++++++++++++++++++
78 @echo
+ Installing sources
+
79 @echo
++++++++++++++++++++++
81 if
[ $(SRCROOT
) != .
]; then \
82 $(PAX
) -rw .
$(SRCROOT
); \
84 find
-d
"$(SRCROOT)" \
( -type d
-a
-name .svn
-o \
85 -type f
-a
-name .DS_Store
-o \
86 -name \
*~
-o
-name .\
#\* \) \
88 rm -rf
"$(SRCROOT)/test"
90 #######################################################################
98 @if
[ -d
$(OBJROOT
) -a
"$(OBJROOT)" != / ]; then \
99 echo
'*** DELETING ' $(OBJROOT
); \
102 @if
[ -d
$(SYMROOT
) -a
"$(SYMROOT)" != / ]; then \
103 echo
'*** DELETING ' $(SYMROOT
); \
106 @if
[ -d
$(DSTROOT
) -a
"$(DSTROOT)" != / ]; then \
107 echo
'*** DELETING ' $(DSTROOT
); \
111 #######################################################################
113 $(OBJROOT
) $(SYMROOT
) $(DSTROOT
):
116 .PHONY
: install installsrc
clean