1
Fork 0
hare-playground/Makefile

41 lines
725 B
Makefile
Raw Permalink Normal View History

2024-05-28 10:23:52 +00:00
.POSIX:
.SUFFIXES:
HARE=hare
2024-06-01 14:32:31 +00:00
HAREFLAGS ?= -lpthread
2024-05-28 10:23:52 +00:00
DESTDIR=
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
CC ?= cc
CFLAGS = -O2 -Wall -fPIC
classpathify = $(subst $(eval ) ,:,$1)
HAREEXTRAPATH = $(HAREPATH)
HAREEXTRAPATH += $(wildcard vendor/*)
2024-06-03 19:05:26 +00:00
all: playground
2024-05-28 10:23:52 +00:00
2024-06-03 19:05:26 +00:00
playground: $(wildcard cmd/playground/*.ha) $(SOURCES)
2024-05-28 10:23:52 +00:00
HAREPATH=$(call classpathify,$(HAREEXTRAPATH)) \
$(HARE) build $(HAREFLAGS) -o $@ cmd/$@/
check:
HAREPATH=$(HAREPATH):$(HAREEXTRAPATH) \
$(HARE) test $(HAREFLAGS)
clean:
2024-06-03 19:05:26 +00:00
rm -f playground
2024-05-28 10:23:52 +00:00
2024-06-03 19:05:26 +00:00
install: playground
install -Dm755 web $(DESTDIR)$(BINDIR)/playground
2024-05-28 10:23:52 +00:00
uninstall:
2024-06-03 19:05:26 +00:00
rm -f $(DESTDIR)$(BINDIR)/playground
2024-05-28 10:23:52 +00:00
2024-06-03 19:05:26 +00:00
test: playground
2024-06-01 17:17:14 +00:00
hurl --test test/api.hurl
.PHONY: all check clean install uninstall test