Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(66)

Side by Side Diff: src/pkg/runtime/cgo/Makefile

Issue 5601057: code review 5601057: build: remove Make.pkg, Make.tool (Closed)
Patch Set: diff -r b479bc080ad9 https://code.google.com/p/go/ Created 13 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pkg/runtime/Makefile ('k') | src/pkg/runtime/debug/Makefile » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2010 The Go Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style
3 # license that can be found in the LICENSE file.
4
5 include ../../../Make.inc
6
7 TARG=runtime/cgo
8
9 GOFILES=\
10 cgo.go\
11
12 ifeq ($(CGO_ENABLED),1)
13
14 # Unwarranted chumminess with Make.pkg's cgo rules.
15 # Do not try this at home.
16 CGO_OFILES=\
17 gcc_$(GOARCH).o\
18 gcc_$(GOOS)_$(GOARCH).o\
19 gcc_util.o\
20
21 ifeq ($(GOOS),windows)
22 CGO_LDFLAGS=-lm -mthreads
23 else
24 CGO_LDFLAGS=-lpthread
25 CGO_OFILES+=gcc_setenv.o\
26
27 endif
28
29 OFILES=\
30 iscgo.$O\
31 callbacks.$O\
32 _cgo_import.$O\
33 $(CGO_OFILES)\
34
35 ifeq ($(GOOS),freebsd)
36 OFILES+=\
37 freebsd.$O\
38
39 endif
40
41 endif
42
43 include ../../../Make.pkg
44
45 ifeq ($(CGO_ENABLED),1)
46 _cgo_defun.c:
47 echo >$@
48
49 _cgo_main.c:
50 echo 'int main() { return 0; }' >$@
51 endif
52
53 gcc_$(GOARCH).o: gcc_$(GOARCH).S
54 $(HOST_CC) $(_CGO_CFLAGS_$(GOARCH)) -g -O2 -fPIC -o $@ -c $^
55
56 gcc_$(GOOS)_$(GOARCH).o: gcc_$(GOOS)_$(GOARCH).c
57 $(HOST_CC) $(_CGO_CFLAGS_$(GOARCH)) -g -O2 -fPIC -o $@ -c $^
58
59 gcc_%.o: gcc_%.c
60 $(HOST_CC) $(_CGO_CFLAGS_$(GOARCH)) -g -O2 -fPIC -o $@ -c $^
OLDNEW
« no previous file with comments | « src/pkg/runtime/Makefile ('k') | src/pkg/runtime/debug/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b