go-wise / Makefile

# General rules for creating go files, we have the source files in this
# direcotry and output files in "out" directory.
%.6: ./%.go
	go tool 6g $<

out/%: ./%.6
	go tool 6l -o $@ $<

# Auto detect source files
ALL_SRC = $(wildcard *.go)
# Don't compile some
SRC := $(ALL_SRC:%yahoo.go=)
SRC := $(SRC:%parallel_test.go=)
PROGRAMS = $(SRC:%.go=out/%)

all: $(PROGRAMS)

	rm -f $(PROGRAMS)
	rm -f $(PROGRAMS:%=%.6)

fresh: clean all

.PHONY: all clean fresh url