Fix part 1 of pr4682. PICADD is a 16-bit instruction even in thumb2 mode.
[llvm/avr.git] / utils / buildit / GNUmakefile
blob6e5131254cb0ee999c6797d91f83d19122ebe177
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
10 # 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 RC_ARCHS := ppc i386
22 HOSTS = $(RC_ARCHS)
23 targets = echo $(RC_ARCHS)
24 TARGETS := $(shell $(targets))
26 SRCROOT = .
28 SRC = $(shell cd $(SRCROOT) && pwd | sed s,/private,,)
29 OBJROOT = $(SRC)/obj
30 SYMROOT = $(OBJROOT)/../sym
31 DSTROOT = $(OBJROOT)/../dst
33 #######################################################################
35 PREFIX = /usr/local
37 # Unless assertions are forced on in the GMAKE command line, disable them.
38 ifdef ENABLE_ASSERTIONS
39 LLVM_ASSERTIONS := yes
40 else
41 LLVM_ASSERTIONS := no
42 endif
44 # Default is optimized build.
45 ifeq ($(LLVM_DEBUG),1)
46 LLVM_OPTIMIZED := no
47 else
48 LLVM_OPTIMIZED := yes
49 endif
51 ifndef RC_ProjectSourceVersion
52 RC_ProjectSourceVersion = 9999
53 endif
55 ifndef RC_ProjectSourceSubversion
56 RC_ProjectSourceSubversion = 0
57 endif
59 # NOTE : Always put version numbers at the end because they are optional.
60 install: $(OBJROOT) $(SYMROOT) $(DSTROOT)
61 cd $(OBJROOT) && \
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.
70 installhdrs:
72 # We build and install in one shell script.
73 build:
75 installsrc:
76 @echo
77 @echo ++++++++++++++++++++++
78 @echo + Installing sources +
79 @echo ++++++++++++++++++++++
80 @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 .\#\* \) \
87 -exec rm -rf {} \;
89 #######################################################################
91 clean:
92 @echo
93 @echo ++++++++++++
94 @echo + Cleaning +
95 @echo ++++++++++++
96 @echo
97 @if [ -d $(OBJROOT) -a "$(OBJROOT)" != / ]; then \
98 echo '*** DELETING ' $(OBJROOT); \
99 rm -rf $(OBJROOT); \
101 @if [ -d $(SYMROOT) -a "$(SYMROOT)" != / ]; then \
102 echo '*** DELETING ' $(SYMROOT); \
103 rm -rf $(SYMROOT); \
105 @if [ -d $(DSTROOT) -a "$(DSTROOT)" != / ]; then \
106 echo '*** DELETING ' $(DSTROOT); \
107 rm -rf $(DSTROOT); \
110 #######################################################################
112 $(OBJROOT) $(SYMROOT) $(DSTROOT):
113 mkdir -p $@
115 .PHONY: install installsrc clean