kathmandu_time/Makefile
2022-08-16 21:33:02 +02:00

37 lines
588 B
Makefile

SOURCES=$(shell find -name '*.cr')
LDFLAGS=
DESTDIR=/usr
BUILDDIR=_build
all: build
$(BUILD_DIR):
mkdir -p $(BUILD_DIR)
$(BUILDDIR)/kathmandu_time: $(BUILDDIR) $(SOURCES)
crystal build $(LDFLAGS) src/kathmandu_time.cr -o $(BUILDDIR)/kathmandu_time
build: $(BUILDDIR)/kathmandu_time
build-release: LDFLAGS=--release --no-debug
build-release: build
install: build
install -m 0755 -o root -g root \
$(BUILDDIR)/kathmandu_time \
$(DESTDIR)/bin/kathmandu_time
spec:
crystal spec
test: spec
run:
crystal run src/kathmandu_time.cr
clean:
rm -f $(BUILDDIR)/kathmandu_time