
FILES   = $(wildcard src/*.coffee)
TARGETS = $(FILES:.coffee=.js) search compile
INDEXES = $(wildcard indexes/*)

all: $(TARGETS)
    
compile:
	echo "node src/compiler.js" > compile
	chmod +x compile

search:
	echo "node src/search.js" > search
	chmod +x search

%.js: %.coffee
	coffeescript/bin/coffee -c $<

clean:
	rm -f $(TARGETS) $(INDEXES)
