2008-08-04 00:03:31 -06:00
|
|
|
# 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.
|
|
|
|
|
2009-11-23 18:32:51 -07:00
|
|
|
CFLAGS=-ggdb -I"$(GOROOT)"/include -O2 -fno-inline
|
2008-08-04 00:03:31 -06:00
|
|
|
O=o
|
|
|
|
YFLAGS=-d
|
2009-07-28 12:23:24 -06:00
|
|
|
# GNU Make syntax:
|
2009-12-03 18:22:43 -07:00
|
|
|
nullstring :=
|
|
|
|
space := $(nullstring) # a space at the end
|
2010-01-06 08:47:56 -07:00
|
|
|
ifndef GOBIN
|
2009-12-03 18:22:43 -07:00
|
|
|
QUOTED_HOME=$(subst $(space),\ ,$(HOME))
|
|
|
|
GOBIN=$(QUOTED_HOME)/bin
|
2010-01-05 17:54:27 -07:00
|
|
|
endif
|
2010-01-06 08:47:56 -07:00
|
|
|
QUOTED_GOBIN=$(subst $(space),\ ,$(GOBIN))
|
2009-12-11 16:14:09 -07:00
|
|
|
|
|
|
|
CC=$(QUOTED_GOBIN)/quietgcc
|
|
|
|
LD=$(QUOTED_GOBIN)/quietgcc
|
2009-07-30 13:54:38 -06:00
|
|
|
PWD=$(shell pwd)
|
|
|
|
|
|
|
|
%.$O: %.c
|
2009-11-23 18:32:51 -07:00
|
|
|
$(CC) $(CFLAGS) -c "$(PWD)"/$*.c
|