Makefile 801 Bytes
Newer Older
Rob Pike's avatar
Rob Pike committed
1 2 3 4 5
# 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.

# DO NOT EDIT.  Automatically generated by gobuild.
Russ Cox's avatar
Russ Cox committed
6
# gobuild -m >Makefile
Rob Pike's avatar
Rob Pike committed
7 8 9 10 11 12
O=6
GC=$(O)g
CC=$(O)c -w
AS=$(O)a
AR=$(O)ar

Russ Cox's avatar
Russ Cox committed
13
default: packages
Rob Pike's avatar
Rob Pike committed
14 15

clean:
Russ Cox's avatar
Russ Cox committed
16
	rm -f *.$O *.a $O.out
Russ Cox's avatar
Russ Cox committed
17 18 19

test: packages
	gotest
Rob Pike's avatar
Rob Pike committed
20

21 22
coverage: packages
	gotest
23
	6cov -g `pwd` | grep -v '_test\.go:'
24

Rob Pike's avatar
Rob Pike committed
25 26 27 28 29 30 31 32 33 34
%.$O: %.go
	$(GC) $*.go

%.$O: %.c
	$(CC) $*.c

%.$O: %.s
	$(AS) $*.s

O1=\
Rob Pike's avatar
Rob Pike committed
35
	format.$O\
Rob Pike's avatar
Rob Pike committed
36

Rob Pike's avatar
Rob Pike committed
37 38 39
O2=\
	print.$O\

Russ Cox's avatar
Russ Cox committed
40 41
fmt.a: a1 a2

Rob Pike's avatar
Rob Pike committed
42
a1:	$(O1)
Russ Cox's avatar
Russ Cox committed
43
	$(AR) grc fmt.a format.$O
44
	rm -f $(O1)
Russ Cox's avatar
Russ Cox committed
45

Rob Pike's avatar
Rob Pike committed
46
a2:	$(O2)
Russ Cox's avatar
Russ Cox committed
47
	$(AR) grc fmt.a print.$O
48
	rm -f $(O2)
Rob Pike's avatar
Rob Pike committed
49

Russ Cox's avatar
Russ Cox committed
50 51 52 53
newpkg: clean
	$(AR) grc fmt.a

$(O1): newpkg
Rob Pike's avatar
Rob Pike committed
54
$(O2): a1
Rob Pike's avatar
Rob Pike committed
55

Russ Cox's avatar
Russ Cox committed
56 57 58 59 60 61 62 63
nuke: clean
	rm -f $(GOROOT)/pkg/fmt.a

packages: fmt.a

install: packages
	cp fmt.a $(GOROOT)/pkg/fmt.a