Advertisement
devinteske

First Makefile for First Go Program

Apr 16th, 2013
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 0.58 KB | None | 0 0
  1. ############################################################ CONFIGURATION
  2.  
  3. PROGNAME = tlist
  4.  
  5. ############################################################ GO CONFIGURATION
  6.  
  7. GOOS = freebsd
  8. GOARCH = 386
  9. GOROOT = /usr/local/go
  10.  
  11. ############################################################ TARGET RULES
  12.  
  13. all: $(PROGNAME)
  14.  
  15. $(PROGNAME): main.8
  16.         GOOS=$(GOOS) GOARCH=$(GOARCH) GOROOT=$(GOROOT) 8l -o $(PROGNAME) $(>)
  17.  
  18. main.8: main.go
  19.         GOOS=$(GOOS) GOARCH=$(GOARCH) GOROOT=$(GOROOT) 8g -o $(@) $(>)
  20.  
  21. clean:
  22.         rm -f *.8
  23.  
  24. distclean: clean
  25.         rm -f $(PROGNAME)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement