summaryrefslogtreecommitdiff
path: root/src/lib/math/Makefile
blob: 623626e967469d05e7a43c46e71950ab4debdb41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# 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.
# gobuild -m >Makefile
O=6
GC=$(O)g
CC=$(O)c -w
AS=$(O)a
AR=$(O)ar

default: packages

clean:
	rm -f *.$O *.a $O.out

test: packages
	gotest

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

%.$O: %.go
	$(GC) $*.go

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

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

O1=\
	fabs.$O\
	hypot.$O\
	pow10.$O\
	runtime.$O\
	const.$O\

O2=\
	atan.$O\
	exp.$O\
	floor.$O\
	fmod.$O\
	log.$O\
	sin.$O\
	sqrt.$O\
	tan.$O\

O3=\
	asin.$O\
	atan2.$O\
	pow.$O\
	sinh.$O\

O4=\
	tanh.$O\

math.a: a1 a2 a3 a4

a1:	$(O1)
	$(AR) grc math.a fabs.$O hypot.$O pow10.$O runtime.$O const.$O
	rm -f $(O1)

a2:	$(O2)
	$(AR) grc math.a atan.$O exp.$O floor.$O fmod.$O log.$O sin.$O sqrt.$O tan.$O
	rm -f $(O2)

a3:	$(O3)
	$(AR) grc math.a asin.$O atan2.$O pow.$O sinh.$O
	rm -f $(O3)

a4:	$(O4)
	$(AR) grc math.a tanh.$O
	rm -f $(O4)

newpkg: clean
	$(AR) grc math.a

$(O1): newpkg
$(O2): a1
$(O3): a2
$(O4): a3

nuke: clean
	rm -f $(GOROOT)/pkg/math.a

packages: math.a

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