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.
5
# Makefile for commands written in C.
7
ifeq (windows,$(findstring windows, $(shell uname | tr A-Z a-z | sed 's/mingw/windows/')))
11
$(TARG): $(OFILES) $(LIB)
12
$(HOST_LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lbio -l9 -lm $(HOST_LDFLAGS)
16
CLEANFILES+=y.tab.[ch]
19
rm -f *.$(HOST_O) $(TARG) $(CLEANFILES)
21
ifneq ($(NOINSTALL),1)
22
install: $(QUOTED_GOBIN)/$(TARG)
25
$(QUOTED_GOBIN)/$(TARG): $(TARG)
26
cp $(TARG) "$(GOBIN)"/$(TARG)
29
bison -y $(HOST_YFLAGS) $(YFILES)
32
test -f y.tab.c && touch y.tab.c
37
$(HOST_CC) $(HOST_CFLAGS) -c "$(PWD)/$*.c"
39
# These are used by enough different Makefiles to be
40
# worth writing down in one place, even if they don't
41
# apply to every command that builds with Make.ccmd
43
cd ../$*l; $(MAKE) enam.o