1 # APPLE LOCAL file build machinery
2 # Apple GCC Compiler Makefile for use by buildit.
4 # This makefile is intended only for use with B&I buildit. For "normal"
5 # builds use the conventional FSF top-level makefile.
7 # You can specify TARGETS=ppc (or i386) on the buildit command line to
8 # limit the build to just one target. The default is for ppc and i386.
9 # The compiler targetted at this host gets built anyway, but not installed
10 # unless it's listed in TARGETS.
12 # The following default target is for the benefit of those who try to
13 # build llvm-gcc in the source directory. GNU make will prefer to use
14 # this GNUmakefile instead of the Makefile generated by configure. Since
15 # buildit always invokes this makefile with an explicit target, report an
16 # error for the default target and some other common gcc targets.
17 .PHONY
: all all-gcc all-host all-target bootstrap
18 all all-gcc all-host all-target bootstrap
:
20 @echo
"Error: llvm-gcc cannot be built in the source directory."
21 @echo
"Please follow the instructions in the README.LLVM file."
24 # Include the set of standard Apple makefile definitions.
25 ifndef CoreOSMakefiles
26 CoreOSMakefiles
= $(MAKEFILEPATH
)/CoreOS
28 include $(CoreOSMakefiles
)/Standard
/Standard.make
30 # Enable Apple extensions to (gnu)make.
31 USE_APPLE_PB_SUPPORT
= all
35 targets
= echo
$(RC_ARCHS
)
36 TARGETS
:= $(shell $(targets
))
40 SRC
= $(shell cd
$(SRCROOT
) && pwd | sed s
,/private
,,)
42 SYMROOT
= $(OBJROOT
)/..
/sym
43 DSTROOT
= $(OBJROOT
)/..
/dst
47 #######################################################################
50 # LLVM defaults to enabled.
53 # LLVM gets installed into /Developer/usr/local, not /usr.
55 PREFIX
= /Developer
/usr
/llvm-gcc-4.2
57 PREFIX
= ${DEVELOPER_DIR}/usr
/llvm-gcc-4.2
63 # Unless assertions are forced on in the GMAKE command line, enable them.
64 ifndef ENABLE_ASSERTIONS
65 ENABLE_ASSERTIONS
:= yes
70 LLVMCORE_PATH
= /Developer
/usr
/local
72 LLVMCORE_PATH
= ${DEVELOPER_DIR}/usr
/local
76 ifndef RC_ProjectSourceVersion
77 RC_ProjectSourceVersion
= 9999
80 ifndef RC_ProjectSourceSubversion
81 RC_ProjectSourceSubversion
= 00
84 install: $(OBJROOT
) $(SYMROOT
) $(DSTROOT
)
86 $(SRC
)/build_gcc
"$(RC_ARCHS)" "$(TARGETS)" \
87 $(SRC
) $(PREFIX
) $(DSTROOT
) $(SYMROOT
) $(ENABLE_LLVM
) \
88 $(ENABLE_ASSERTIONS
) $(LLVMCORE_PATH
) \
89 $(RC_ProjectSourceVersion
) $(RC_ProjectSourceSubversion
)
93 # installhdrs does nothing, because the headers aren't useful until
94 # the compiler is installed.
97 # We build and install in one shell script.
102 @echo
++++++++++++++++++++++
103 @echo
+ Installing sources
+
104 @echo
++++++++++++++++++++++
106 if
[ $(SRCROOT
) != .
]; then \
107 $(PAX
) -rw .
$(SRCROOT
); \
109 # LLVM LOCAL begin: Avoid verification error due to binaries in libjava.
110 rm -rf
"$(SRCROOT)/libjava/"
111 find
-d
"$(SRCROOT)" \
( -type d
-a
-name CVS
-o \
112 -type f
-a
-name .DS_Store
-o \
113 -name \
*~
-o
-name .\
#\* \) \
116 #######################################################################
124 @if
[ -d
$(OBJROOT
) -a
"$(OBJROOT)" != / ]; then \
125 echo
'*** DELETING ' $(OBJROOT
); \
128 @if
[ -d
$(SYMROOT
) -a
"$(SYMROOT)" != / ]; then \
129 echo
'*** DELETING ' $(SYMROOT
); \
132 @if
[ -d
$(DSTROOT
) -a
"$(DSTROOT)" != / ]; then \
133 echo
'*** DELETING ' $(DSTROOT
); \
137 #######################################################################
139 $(OBJROOT
) $(SYMROOT
) $(DSTROOT
):
142 .PHONY
: install installsrc
clean