Skip to content

Instantly share code, notes, and snippets.

@zrbecker
Created April 22, 2011 17:17
Show Gist options
  • Select an option

  • Save zrbecker/937130 to your computer and use it in GitHub Desktop.

Select an option

Save zrbecker/937130 to your computer and use it in GitHub Desktop.
Go makefile
GOC=6g
GOCFLAGS=
GOLINK=6l
GOLINKFLAGS=
SOURCES=helloworld.go
DEPS=
EXECUTABLE=helloworld
OBJECTS=$(SOURCES:.go=.6)
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(GOLINK) -o $@ $(GOLINKFLAGS) $(OBJECTS)
%.6: %.go $(DEPS)
$(GOC) -o $@ $(GOCCFLAGS) $<
clean:
rm $(OBJECTS) $(EXECUTABLE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment