blob: 02bc0256347d4cc33eb79b9e6376e1a5fb3848bf (
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
|
# 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.
CFLAGS=
O=6
CC=$(O)c
AS=$(O)a
LIB=lib_$(GOARCH)_$(GOOS).a
RT0OFILES=\
rt0_$(GOARCH)_$(GOOS).$O\
LIBOFILES=\
rt0_$(GOARCH).$O\
rt1_$(GOARCH)_$(GOOS).$O\
rt2_$(GOARCH).$O\
sys_$(GOARCH)_$(GOOS).$O\
runtime.$O\
map.$O\
chan.$O\
print.$O\
rune.$O\
proc.$O\
string.$O\
sys_file.$O\
OFILES=$(RT0OFILES) $(LIBOFILES)
OS_H=$(GOARCH)_$(GOOS).h
HFILES=runtime.h $(OS_H_)
install: rt0 $(LIB) runtime.acid
cp $(RT0OFILES) $(GOROOT)/lib
cp $(LIB) $(GOROOT)/lib
cp runtime.acid $(GOROOT)/acid/runtime.acid
rt0: $(RT0OFILES)
$(LIB): $(LIBOFILES)
$(O)ar rc $(LIB) $(LIBOFILES)
$(OFILES): $(HFILES)
nuke:
rm -f *.$(O) *.a $(GOROOT)/lib/$(LIB)
clean:
rm -f *.$(O) *.a runtime.acid
%.$O: %.c
$(CC) $<
sys_file.$O: sys_file.c sys_types.h $(OS_H)
$(CC) -D$(GOARCH)_$(GOOS) $<
%.$O: %.s
$(AS) $<
runtime.acid: runtime.h
$(CC) -a runtime.h >runtime.acid
|