The Go Programming Language

Text file src/cmd/gc/Makefile

     1	# Copyright 2009 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	O:=$(HOST_O)
     7	
     8	LIB=gc.a
     9	
    10	HFILES=\
    11		go.h\
    12		y.tab.h\
    13		md5.h\
    14	
    15	YFILES=\
    16		go.y\
    17	
    18	OFILES=\
    19		align.$O\
    20		bits.$O\
    21		builtin.$O\
    22		closure.$O\
    23		const.$O\
    24		dcl.$O\
    25		export.$O\
    26		gen.$O\
    27		init.$O\
    28		lex.$O\
    29		md5.$O\
    30		mparith1.$O\
    31		mparith2.$O\
    32		mparith3.$O\
    33		obj.$O\
    34		print.$O\
    35		range.$O\
    36		reflect.$O\
    37		select.$O\
    38		sinit.$O\
    39		subr.$O\
    40		swt.$O\
    41		typecheck.$O\
    42		unsafe.$O\
    43		walk.$O\
    44		y1.tab.$O\
    45	
    46	NOINSTALL=1
    47	include ../../Make.clib
    48	
    49	install: $(LIB)
    50	
    51	y1.tab.c: y.tab.c	# make yystate global, yytname mutable
    52		cat y.tab.c | sed '/ int yystate;/d; s/int yychar;/int yychar, yystate;/; s/static const char \*const yytname/const char *yytname/; s/char const \*yymsgp/char *yymsgp/' >y1.tab.c
    53	
    54	yerr.h: bisonerrors go.errors y.tab.h	# y.tab.h rule generates y.output too
    55		awk -f bisonerrors y.output go.errors >yerr.h
    56	
    57	subr.$O: yerr.h
    58	
    59	builtin.c: builtin.c.boot
    60		cp builtin.c.boot builtin.c
    61	
    62	subr.$O: opnames.h
    63	
    64	opnames.h:	mkopnames go.h
    65		./mkopnames go.h >opnames.h
    66	
    67	CLEANFILES+=*.[568] [568].out y1.tab.c yerr.h mkbuiltin1 builtin.c _builtin.c opnames.h
    68	
    69	mkbuiltin1: mkbuiltin1.$O
    70		$(HOST_LD) -o $@ mkbuiltin1.$O -L"$(GOROOT)"/lib -lbio -l9 -lm $(HOST_LDFLAGS)
    71	

release.r60.3. Except as noted, this content is licensed under a Creative Commons Attribution 3.0 License.