Bump version to gcc-4055.
[official-gcc.git] / GNUmakefile
blob5b9f57d4926e52b9d5dab096a884ebac307ad9cb
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
15 endif
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))
25 RC_ARCHS = $(HOSTS)
27 SRCROOT = .
29 SRC = `cd $(SRCROOT) && pwd | sed s,/private,,`
30 OBJROOT = $(SRC)/obj
31 SYMROOT = $(OBJROOT)/../sym
32 DSTROOT = $(OBJROOT)/../dst
34 PREFIX = /usr
36 #######################################################################
38 install: $(OBJROOT) $(SYMROOT) $(DSTROOT)
39 cd $(OBJROOT) && \
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.
45 installhdrs:
47 # We build and install in one shell script.
48 build:
50 installsrc:
51 @echo
52 @echo ++++++++++++++++++++++
53 @echo + Installing sources +
54 @echo ++++++++++++++++++++++
55 @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 .\#\* \) \
62 -exec rm -rf {} \;
64 #######################################################################
66 clean:
67 @echo
68 @echo ++++++++++++
69 @echo + Cleaning +
70 @echo ++++++++++++
71 @echo
72 @if [ -d $(OBJROOT) -a "$(OBJROOT)" != / ]; then \
73 echo '*** DELETING ' $(OBJROOT); \
74 rm -rf $(OBJROOT); \
76 @if [ -d $(SYMROOT) -a "$(SYMROOT)" != / ]; then \
77 echo '*** DELETING ' $(SYMROOT); \
78 rm -rf $(SYMROOT); \
80 @if [ -d $(DSTROOT) -a "$(DSTROOT)" != / ]; then \
81 echo '*** DELETING ' $(DSTROOT); \
82 rm -rf $(DSTROOT); \
85 #######################################################################
87 $(OBJROOT) $(SYMROOT) $(DSTROOT):
88 mkdir -p $@
90 .PHONY: install installsrc clean