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 # 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
21 HOSTS
= ppc i386
# `arch`
22 targets
= echo
$${TARGETS
:-'ppc i386'}
23 TARGETS
:= $(shell $(targets
))
29 SRC
= `cd $(SRCROOT) && pwd | sed s,/private,,`
31 SYMROOT
= $(OBJROOT
)/..
/sym
32 DSTROOT
= $(OBJROOT
)/..
/dst
36 #######################################################################
38 install: $(OBJROOT
) $(SYMROOT
) $(DSTROOT
)
40 $(SRC
)/build_gcc
"$(RC_ARCHS)" "$(TARGETS)" \
41 $(SRC
) $(PREFIX
) $(DSTROOT
) $(SYMROOT
)
43 # installhdrs does nothing, because the headers aren't useful until
44 # the compiler is installed.
47 # We build and install in one shell script.
52 @echo
++++++++++++++++++++++
53 @echo
+ Installing sources
+
54 @echo
++++++++++++++++++++++
56 if
[ $(SRCROOT
) != .
]; then \
57 $(PAX
) -rw .
$(SRCROOT
); \
59 find
-d
"$(SRCROOT)" \
( -type d
-a
-name CVS
-o \
60 -type f
-a
-name .DS_Store
-o \
61 -name \
*~
-o
-name .\
#\* \) \
64 #######################################################################
72 @if
[ -d
$(OBJROOT
) -a
"$(OBJROOT)" != / ]; then \
73 echo
'*** DELETING ' $(OBJROOT
); \
76 @if
[ -d
$(SYMROOT
) -a
"$(SYMROOT)" != / ]; then \
77 echo
'*** DELETING ' $(SYMROOT
); \
80 @if
[ -d
$(DSTROOT
) -a
"$(DSTROOT)" != / ]; then \
81 echo
'*** DELETING ' $(DSTROOT
); \
85 #######################################################################
87 $(OBJROOT
) $(SYMROOT
) $(DSTROOT
):
90 .PHONY
: install installsrc
clean