we don't want people to override printBasicBlockLabel.
[llvm/avr.git] / utils / buildit / GNUmakefile
blobe3b334a045d1a0ac3e8ffd4cf8336f69a80b1681
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 {} \;
88 rm -rf "$(SRCROOT)/test"
90 #######################################################################
92 clean:
93 @echo
94 @echo ++++++++++++
95 @echo + Cleaning +
96 @echo ++++++++++++
97 @echo
98 @if [ -d $(OBJROOT) -a "$(OBJROOT)" != / ]; then \
99 echo '*** DELETING ' $(OBJROOT); \
100 rm -rf $(OBJROOT); \
102 @if [ -d $(SYMROOT) -a "$(SYMROOT)" != / ]; then \
103 echo '*** DELETING ' $(SYMROOT); \
104 rm -rf $(SYMROOT); \
106 @if [ -d $(DSTROOT) -a "$(DSTROOT)" != / ]; then \
107 echo '*** DELETING ' $(DSTROOT); \
108 rm -rf $(DSTROOT); \
111 #######################################################################
113 $(OBJROOT) $(SYMROOT) $(DSTROOT):
114 mkdir -p $@
116 .PHONY: install installsrc clean