Commit bf6dd2db authored by Maxim Pimenov's avatar Maxim Pimenov Committed by Russ Cox

various: use $GCFLAGS and $GCIMPORTS like Make does

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5489065
parent dd694fb1
......@@ -21,5 +21,5 @@ test: get.bin
$(LD) -o $@ $<
%.$O: %.go
$(GC) $*.go
$(GC) $(GCFLAGS) $(GCIMPORTS) $*.go
......@@ -28,11 +28,11 @@ include ../../../src/Make.pkg
# Computes 1000 digits of pi; single-threaded.
pi: install pi.go
$(GC) pi.go
$(GC) $(GCFLAGS) $(GCIMPORTS) pi.go
$(LD) -o $@ pi.$O
# Computes 200 Fibonacci numbers; multi-threaded.
fib: install fib.go
$(GC) fib.go
$(GC) $(GCFLAGS) $(GCIMPORTS) fib.go
$(LD) -o $@ fib.$O
......@@ -11,7 +11,7 @@ CGOFILES=\
CGO_OFILES=\
c-life.o\
ifeq ($(GOOS),windows)
ifeq ($(GOARCH),amd64)
CGO_OFILES+=\
......@@ -31,5 +31,5 @@ CLEANFILES+=life
include ../../../src/Make.pkg
life: install main.go
$(GC) main.go
$(GC) $(GCFLAGS) $(GCIMPORTS) main.go
$(LD) -o $@ main.$O
......@@ -13,5 +13,5 @@ CLEANFILES+=hello fib chain run.out
include ../../../src/Make.pkg
%: install %.go
$(GC) $*.go
$(GC) $(GCFLAGS) $(GCIMPORTS) $*.go
$(LD) -o $@ $*.$O
......@@ -18,5 +18,5 @@ libcgoso.so: cgoso_c.c
gcc cgoso_c.c -fPIC -o $@ $(_CGO_CFLAGS_$(GOARCH)) $(_CGO_LDFLAGS_$(GOOS))
out: install main.go
$(GC) main.go
$(GC) $(GCFLAGS) $(GCIMPORTS) main.go
$(LD) -o $@ main.$O
......@@ -13,5 +13,5 @@ CLEANFILES+=run
include ../../../src/Make.pkg
%: install %.go
$(GC) $*.go
$(GC) $(GCFLAGS) $(GCIMPORTS) $*.go
$(LD) $(SWIG_RPATH) -o $@ $*.$O
......@@ -13,5 +13,5 @@ CLEANFILES+=hello
include ../../../src/Make.pkg
%: install %.go
$(GC) $*.go
$(GC) $(GCFLAGS) $(GCIMPORTS) $*.go
$(LD) $(SWIG_RPATH) -o $@ $*.$O
......@@ -12,7 +12,7 @@ include ../../Make.cmd
units: goyacc units.y
./goyacc -p units_ units.y
$(GC) y.go
$(GC) $(GCFLAGS) $(GCIMPORTS) y.go
$(LD) -o units y.$O
CLEANFILES += units y.go y.output
......@@ -22,4 +22,4 @@ dump: dump.$O
$(LD) -o dump $<
dump.$O: dump.go
$(GC) $<
$(GC) $(GCFLAGS) $(GCIMPORTS) $<
......@@ -19,15 +19,15 @@ include ../../../Make.pkg
CLEANFILES+=maketables maketesttables
maketables: maketables.go triegen.go
$(GC) maketables.go triegen.go
$(GC) $(GCFLAGS) $(GCIMPORTS) maketables.go triegen.go
$(LD) -o maketables maketables.$O
maketesttables: maketesttables.go triegen.go
$(GC) maketesttables.go triegen.go
$(GC) $(GCFLAGS) $(GCIMPORTS) maketesttables.go triegen.go
$(LD) -o maketesttables maketesttables.$O
normregtest: normregtest.go
$(GC) normregtest.go
$(GC) $(GCFLAGS) $(GCIMPORTS) normregtest.go
$(LD) -o normregtest normregtest.$O
tables: maketables
......
......@@ -15,5 +15,5 @@ include ../../../Make.pkg
# Script to test heading detection heuristic
CLEANFILES+=headscan
headscan: headscan.go
$(GC) headscan.go
$(GC) $(GCFLAGS) $(GCIMPORTS) headscan.go
$(LD) -o headscan headscan.$(O)
......@@ -17,7 +17,7 @@ include ../../Make.pkg
CLEANFILES+=maketables
maketables: maketables.go
$(GC) maketables.go
$(GC) $(GCFLAGS) $(GCIMPORTS) maketables.go
$(LD) -o maketables maketables.$O
tables: maketables
......
......@@ -12,7 +12,7 @@ ALL=\
all: $(addsuffix .out, $(ALL))
%.$O: %.go stats.go
$(GC) $*.go stats.go
$(GC) $(GCFLAGS) $(GCIMPORTS) $*.go stats.go
%.out: %.$O
$(LD) -o $@ $*.$O
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment