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

5
include ../../Make.conf
Rob Pike's avatar
Rob Pike committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

LIB=\
	gc.a$O\

HFILES=\
	go.h\
	y.tab.h\

YFILES=\
	go.y\

OFILES=\
	y.tab.$O\
	lex.$O\
	subr.$O\
	dcl.$O\
	export.$O\
	walk.$O\
Ken Thompson's avatar
Ken Thompson committed
24
	swt.$O\
Rob Pike's avatar
Rob Pike committed
25
	const.$O\
Ken Thompson's avatar
Ken Thompson committed
26 27 28
	mparith1.$O\
	mparith2.$O\
	mparith3.$O\
29
	builtin.$O\
30
	compat.$O\
Russ Cox's avatar
Russ Cox committed
31
	bits.$O\
Russ Cox's avatar
Russ Cox committed
32
	align.$O\
33
	gen.$O\
34
	obj.$O\
Rob Pike's avatar
Rob Pike committed
35 36

$(LIB): $(OFILES)
Rob Pike's avatar
Rob Pike committed
37
	ar rsc $(LIB) $(OFILES)
Rob Pike's avatar
Rob Pike committed
38 39 40

$(OFILES): $(HFILES)

41
y.tab.h: $(YFILES)
Russ Cox's avatar
Russ Cox committed
42
	bison -y $(YFLAGS) $(YFILES)
Rob Pike's avatar
Rob Pike committed
43

44
y.tab.c: y.tab.h
Russ Cox's avatar
Russ Cox committed
45
	test -f y.tab.c && touch y.tab.c
46

47
builtin.c:	sys.go unsafe.go runtime.go mkbuiltin1.c mkbuiltin
48
	./mkbuiltin >builtin.c || \
49
	(echo 'mkbuiltin failed; using bootstrap copy of builtin.c'; cp builtin.c.boot builtin.c)
Rob Pike's avatar
Rob Pike committed
50 51

clean:
52
	rm -f $(OFILES) *.6 enam.c 6.out a.out y.tab.h y.tab.c $(LIB) mkbuiltin1 builtin.c _builtin.c
Rob Pike's avatar
Rob Pike committed
53 54

install: $(LIB)