1
0
mirror of https://github.com/golang/go synced 2024-11-21 17:24:42 -07:00

various: use $GCFLAGS and $GCIMPORTS like Make does

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5489065
This commit is contained in:
Maxim Pimenov 2011-12-16 11:31:39 -05:00 committed by Russ Cox
parent dd694fb149
commit bf6dd2db04
13 changed files with 17 additions and 17 deletions

View File

@ -21,5 +21,5 @@ test: get.bin
$(LD) -o $@ $<
%.$O: %.go
$(GC) $*.go
$(GC) $(GCFLAGS) $(GCIMPORTS) $*.go

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -13,5 +13,5 @@ CLEANFILES+=run
include ../../../src/Make.pkg
%: install %.go
$(GC) $*.go
$(GC) $(GCFLAGS) $(GCIMPORTS) $*.go
$(LD) $(SWIG_RPATH) -o $@ $*.$O

View File

@ -13,5 +13,5 @@ CLEANFILES+=hello
include ../../../src/Make.pkg
%: install %.go
$(GC) $*.go
$(GC) $(GCFLAGS) $(GCIMPORTS) $*.go
$(LD) $(SWIG_RPATH) -o $@ $*.$O

View File

@ -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

View File

@ -22,4 +22,4 @@ dump: dump.$O
$(LD) -o dump $<
dump.$O: dump.go
$(GC) $<
$(GC) $(GCFLAGS) $(GCIMPORTS) $<

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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