From 9e525374673ba48695276216622c9bbe4d4e9fab Mon Sep 17 00:00:00 2001 From: "legoff.laurent" Date: Thu, 25 Nov 2010 10:52:28 +0000 Subject: [PATCH] add Makefile (not tested yet, cause on windows) on cmd folder to generate executable for each test --- draw2d/src/cmd/Makefile | 16 ++++++++++++++++ draw2d/src/cmd/gettingStarted.go | 1 + draw2d/src/cmd/testdraw2d.go | 5 +++-- draw2d/src/cmd/testpath.go | 3 ++- 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 draw2d/src/cmd/Makefile diff --git a/draw2d/src/cmd/Makefile b/draw2d/src/cmd/Makefile new file mode 100644 index 0000000..bbd8176 --- /dev/null +++ b/draw2d/src/cmd/Makefile @@ -0,0 +1,16 @@ + +include $(GOROOT)/src/Make.inc + +TARG=gettingStarted testdraw2d testPath +OFILES=$(TARG:%=%.$O) + +all: $(TARG) + +$(TARG): %: %.$O + $(LD) -o $@ $< + +$(OFILES): %.$O: %.go Makefile + $(GC) -o $@ $< + +clean: + rm -f *.[$(OS)] $(TARG) $(CLEANFILES) diff --git a/draw2d/src/cmd/gettingStarted.go b/draw2d/src/cmd/gettingStarted.go index 01d5cfe..3e98f2a 100644 --- a/draw2d/src/cmd/gettingStarted.go +++ b/draw2d/src/cmd/gettingStarted.go @@ -11,6 +11,7 @@ import ( "image" "image/png" + //"draw2d" "draw2d.googlecode.com/svn/trunk/draw2d/src/pkg/draw2d" ) diff --git a/draw2d/src/cmd/testdraw2d.go b/draw2d/src/cmd/testdraw2d.go index 7008aa6..0b2121e 100644 --- a/draw2d/src/cmd/testdraw2d.go +++ b/draw2d/src/cmd/testdraw2d.go @@ -13,7 +13,8 @@ import ( "math" "image" "image/png" - "draw2d" + //"draw2d" + "draw2d.googlecode.com/svn/trunk/draw2d/src/pkg/draw2d" ) const ( @@ -22,7 +23,7 @@ const ( var ( lastTime int64 - folder = "../../../wiki/test_results/" + folder = "../../../../wiki/test_results/" ) func initGc(w, h int) (image.Image, *draw2d.GraphicContext) { diff --git a/draw2d/src/cmd/testpath.go b/draw2d/src/cmd/testpath.go index a45e012..d2dcbac 100644 --- a/draw2d/src/cmd/testpath.go +++ b/draw2d/src/cmd/testpath.go @@ -4,7 +4,8 @@ package main import ( - "draw2d" + //"draw2d" + "draw2d.googlecode.com/svn/trunk/draw2d/src/pkg/draw2d" "fmt" )