Makefile 1 KB
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

LIB=\
	gc.a$O\

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

YFILES=\
	go.y\

OFILES=\
18
	reflect.$O\
Rob Pike's avatar
Rob Pike committed
19 20 21 22
	y.tab.$O\
	lex.$O\
	subr.$O\
	dcl.$O\
Ken Thompson's avatar
Ken Thompson committed
23
	sinit.$O\
Rob Pike's avatar
Rob Pike committed
24 25
	export.$O\
	walk.$O\
Ken Thompson's avatar
Ken Thompson committed
26
	swt.$O\
Rob Pike's avatar
Rob Pike committed
27
	const.$O\
Ken Thompson's avatar
Ken Thompson committed
28 29 30
	mparith1.$O\
	mparith2.$O\
	mparith3.$O\
31
	builtin.$O\
32
	compat.$O\
Russ Cox's avatar
Russ Cox committed
33
	bits.$O\
Russ Cox's avatar
Russ Cox committed
34
	align.$O\
35
	gen.$O\
36
	obj.$O\
Russ Cox's avatar
Russ Cox committed
37
	print.$O\
Russ Cox's avatar
Russ Cox committed
38
	typecheck.$O\
Rob Pike's avatar
Rob Pike committed
39 40

$(LIB): $(OFILES)
Rob Pike's avatar
Rob Pike committed
41
	ar rsc $(LIB) $(OFILES)
Rob Pike's avatar
Rob Pike committed
42 43 44

$(OFILES): $(HFILES)

45
y.tab.h: $(YFILES)
Russ Cox's avatar
Russ Cox committed
46
	bison -y $(YFLAGS) $(YFILES)
Rob Pike's avatar
Rob Pike committed
47

48
y.tab.c: y.tab.h
Russ Cox's avatar
Russ Cox committed
49
	test -f y.tab.c && touch y.tab.c
50

51
builtin.c:	sys.go unsafe.go mkbuiltin1.c mkbuiltin
52
	./mkbuiltin >builtin.c || \
53
	(echo 'mkbuiltin failed; using bootstrap copy of builtin.c'; cp builtin.c.boot builtin.c)
Rob Pike's avatar
Rob Pike committed
54

55 56 57 58 59
subr.$O: opnames.h

opnames.h:	mkopnames go.h
	./mkopnames go.h >opnames.h

Rob Pike's avatar
Rob Pike committed
60
clean:
61
	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
62 63

install: $(LIB)