summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2008-08-03 23:03:31 -0700
committerRuss Cox <rsc@golang.org>2008-08-03 23:03:31 -0700
commit4098515e306264092773d116137cabaa9971bdef (patch)
tree98eed5339154c254e2bed61fcd39ac830cfde81e
parent2cd1c9405a3ea6980c948fa74382d53e64a9b6a6 (diff)
downloadgo-4098515e306264092773d116137cabaa9971bdef.tar.gz
Use a single Make.conf for setting CC, etc.
This makes it easy to build with other flags (like -ggdb) or other compilers (like cc64). R=r DELTA=45 (6 added, 22 deleted, 17 changed) OCL=13790 CL=13793
-rw-r--r--src/Make.conf10
-rw-r--r--src/cmd/6a/Makefile7
-rw-r--r--src/cmd/6c/Makefile6
-rw-r--r--src/cmd/6g/Makefile6
-rw-r--r--src/cmd/6l/Makefile6
-rw-r--r--src/cmd/ar/Makefile6
-rw-r--r--src/cmd/cc/Makefile5
-rw-r--r--src/cmd/gc/Makefile5
-rw-r--r--src/libbio/Makefile3
-rw-r--r--src/libmach_amd64/Makefile3
10 files changed, 24 insertions, 33 deletions
diff --git a/src/Make.conf b/src/Make.conf
new file mode 100644
index 000000000..e6d8628ae
--- /dev/null
+++ b/src/Make.conf
@@ -0,0 +1,10 @@
+# Copyright 2009 The Go Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+
+CC=cc64
+LD=cc64
+CFLAGS=-ggdb -I$(GOROOT)/include
+BIN=$(HOME)/bin
+O=o
+YFLAGS=-d
diff --git a/src/cmd/6a/Makefile b/src/cmd/6a/Makefile
index 4d987c124..be34e99d3 100644
--- a/src/cmd/6a/Makefile
+++ b/src/cmd/6a/Makefile
@@ -2,10 +2,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-YFLAGS=-d
-CFLAGS=-I$(GOROOT)/include
-BIN=$(HOME)/bin
-O=o
+include ../../Make.conf
TARG=\
6a\
@@ -26,7 +23,7 @@ YFILES=\
a.y\
$(TARG): $(OFILES)
- cc -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lbio -l9
+ $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lbio -l9
$(OFILES): $(HFILES)
diff --git a/src/cmd/6c/Makefile b/src/cmd/6c/Makefile
index df92cee01..fcfeb2204 100644
--- a/src/cmd/6c/Makefile
+++ b/src/cmd/6c/Makefile
@@ -2,9 +2,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-CFLAGS=-I$(GOROOT)/include
-BIN=$(HOME)/bin
-O=o
+include ../../Make.conf
TARG=\
6c\
@@ -32,7 +30,7 @@ LIB=\
../cc/cc.a$O
$(TARG): $(OFILES) $(LIB)
- cc -o $(TARG) -L$(GOROOT)/lib $(OFILES) $(LIB) -lbio -l9
+ $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) $(LIB) -lbio -l9
$(OFILES): $(HFILES)
diff --git a/src/cmd/6g/Makefile b/src/cmd/6g/Makefile
index d119820e9..4d27ae811 100644
--- a/src/cmd/6g/Makefile
+++ b/src/cmd/6g/Makefile
@@ -2,9 +2,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-CFLAGS=-I$(GOROOT)/include
-BIN=$(HOME)/bin
-O=o
+include ../../Make.conf
TARG=\
6g
@@ -27,7 +25,7 @@ LIB=\
../gc/gc.a$O
$(TARG): $(OFILES) $(LIB)
- cc -o $(TARG) -L$(GOROOT)/lib $(OFILES) $(LIB) -lbio -l9
+ $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) $(LIB) -lbio -l9
$(OFILES): $(HFILES)
diff --git a/src/cmd/6l/Makefile b/src/cmd/6l/Makefile
index e87efafc9..c15f4ff1b 100644
--- a/src/cmd/6l/Makefile
+++ b/src/cmd/6l/Makefile
@@ -2,9 +2,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-CFLAGS=-I$(GOROOT)/include
-BIN=$(HOME)/bin
-O=o
+include ../../Make.conf
TARG=\
6l\
@@ -25,7 +23,7 @@ HFILES=\
$(TARG): $(OFILES)
- cc -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lbio -l9
+ $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lbio -l9
$(OFILES): $(HFILES)
diff --git a/src/cmd/ar/Makefile b/src/cmd/ar/Makefile
index 11f573e10..ec499b297 100644
--- a/src/cmd/ar/Makefile
+++ b/src/cmd/ar/Makefile
@@ -2,9 +2,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-CFLAGS=-I$(GOROOT)/include
-BIN=$(HOME)/bin
-O=o
+include ../../Make.conf
# The directory is ar because the source is portable and general.
# We call the binary 6ar to avoid confusion and because this binary
@@ -15,7 +13,7 @@ OFILES=\
ar.$O\
$(TARG): $(OFILES)
- cc -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lmach_amd64 -lbio -l9
+ $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lmach_amd64 -lbio -l9
clean:
rm -f $(OFILES) $(TARG)
diff --git a/src/cmd/cc/Makefile b/src/cmd/cc/Makefile
index cf52c8818..5d21241c4 100644
--- a/src/cmd/cc/Makefile
+++ b/src/cmd/cc/Makefile
@@ -2,10 +2,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-YFLAGS=-d
-CFLAGS=-I$(GOROOT)/include
-BIN=$(HOME)/bin
-O=o
+include ../../Make.conf
LIB=\
cc.a$O\
diff --git a/src/cmd/gc/Makefile b/src/cmd/gc/Makefile
index 8535c64b4..d5db24fe2 100644
--- a/src/cmd/gc/Makefile
+++ b/src/cmd/gc/Makefile
@@ -2,10 +2,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-YFLAGS=-d
-CFLAGS=-I$(GOROOT)/include
-BIN=$(HOME)/bin
-O=o
+include ../../Make.conf
LIB=\
gc.a$O\
diff --git a/src/libbio/Makefile b/src/libbio/Makefile
index eddeac071..02eaaa684 100644
--- a/src/libbio/Makefile
+++ b/src/libbio/Makefile
@@ -22,8 +22,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-CFLAGS=-I$(GOROOT)/include
-O=o
+include ../Make.conf
LIB=libbio.a
diff --git a/src/libmach_amd64/Makefile b/src/libmach_amd64/Makefile
index b8aa716b3..e4a80d8d2 100644
--- a/src/libmach_amd64/Makefile
+++ b/src/libmach_amd64/Makefile
@@ -26,8 +26,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-CFLAGS=-I$(GOROOT)/include
-O=o
+include ../Make.conf
LIB=libmach_amd64.a
OFILES=\