blob: 40cc3a0e8a2d0751bc6e42c9b27d7dc0ae19051b [file] [log] [blame]
# Copyright 2010 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.
# Makefile for commands written in C.
ifeq (windows,$(findstring windows, $(shell uname | tr A-Z a-z | sed 's/mingw/windows/')))
$(HOST_LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lmach -lbio -l9 -lm $(HOST_LDFLAGS)
$(OFILES): $(HFILES)[ch]
rm -f *.$(HOST_O) $(TARG) $(CLEANFILES)
nuke: clean
rm -f "$(GOBIN)/$(TARG)"
ifneq ($(NOINSTALL),1)
install: $(QUOTED_GOBIN)/$(TARG)
cp $(TARG) "$(GOBIN)"/$(TARG) $(YFILES)
bison -y $(HOST_YFLAGS) $(YFILES)
test -f && touch
all: $(TARG)
# Use $(PWD)/$*.c so that gdb shows full path in stack traces.
%.$(HOST_O): %.c
$(HOST_CC) $(HOST_CFLAGS) -c "$(PWD)/$*.c"
# These are used by enough different Makefiles to be
# worth writing down in one place, even if they don't
# apply to every command that builds with Make.ccmd
cd ../$*l; $(MAKE) enam.o