diff --git a/src/Make.ccmd b/src/Make.ccmd index e22e256f003..a0da13857e4 100644 --- a/src/Make.ccmd +++ b/src/Make.ccmd @@ -4,6 +4,10 @@ # Makefile for commands written in C. +ifeq (windows,$(findstring windows, $(shell uname | tr A-Z a-z | sed 's/mingw/windows/'))) +TARG:=$(TARG).exe +endif + $(TARG): $(OFILES) $(LIB) $(HOST_LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lbio -l9 -lm diff --git a/src/Make.pkg b/src/Make.pkg index 6c1ac7a8721..d5ccbe03088 100644 --- a/src/Make.pkg +++ b/src/Make.pkg @@ -50,7 +50,7 @@ coverage: gotest 6cov -g $(shell pwd) $O.out | grep -v '_test\.go:' -CLEANFILES+=*.cgo1.go *.cgo2.c _cgo_defun.c _cgo_gotypes.go _cgo_export.* *.so _obj _test _testmain.go +CLEANFILES+=*.cgo1.go *.cgo2.c _cgo_defun.c _cgo_gotypes.go _cgo_export.* *.so _obj _test _testmain.go *.exe test: gotest