.POSIX: .SUFFIXES: HARE=hare HAREFLAGS ?= -lpthread DESTDIR= PREFIX=/usr/local BINDIR=$(PREFIX)/bin CC ?= cc CFLAGS = -O2 -Wall -fPIC classpathify = $(subst $(eval ) ,:,$1) HAREEXTRAPATH = $(HAREPATH) HAREEXTRAPATH += $(wildcard vendor/*) all: playground playground: $(wildcard cmd/playground/*.ha) $(SOURCES) HAREPATH=$(call classpathify,$(HAREEXTRAPATH)) \ $(HARE) build $(HAREFLAGS) -o $@ cmd/$@/ check: HAREPATH=$(HAREPATH):$(HAREEXTRAPATH) \ $(HARE) test $(HAREFLAGS) clean: rm -f playground install: playground install -Dm755 web $(DESTDIR)$(BINDIR)/playground uninstall: rm -f $(DESTDIR)$(BINDIR)/playground test: playground hurl --test test/api.hurl .PHONY: all check clean install uninstall test