TARGET=$(shell pwd | sed -e 's/.*\///')

all: $(TARGET)

$(TARGET): $(wildcard *.hs)
	ghc -O2 -fglasgow-exts -threaded --make $(TARGET).hs

clean:
	rm -f *.o *.hi $(TARGET)

test: $(TARGET)
	./$<

.PHONY: all clean test
