pushokku/Makefile

37 lines
537 B
Makefile
Raw Normal View History

2020-03-02 00:21:13 +01:00
2020-03-25 16:09:49 +01:00
SOURCES=$(shell find -name '*.cr')
2020-03-03 18:56:19 +01:00
LDFLAGS=
2020-03-03 19:12:30 +01:00
DESTDIR=/usr
BUILDDIR=_build
2020-03-03 18:56:19 +01:00
2020-03-02 00:21:13 +01:00
all: build
2020-03-03 19:12:30 +01:00
$(BUILDDIR):
mkdir -p $(BUILDDIR)
$(BUILDDIR)/pushokku: $(BUILDDIR) $(SOURCES)
2020-03-03 19:12:30 +01:00
crystal build $(LDFLAGS) src/pushokku.cr -o $(BUILDDIR)/pushokku
2020-03-03 19:19:04 +01:00
build: $(BUILDDIR)/pushokku
2020-03-03 19:12:30 +01:00
build-release: LDFLAGS=--release --no-debug
build-release: build
2020-03-02 00:21:13 +01:00
2020-03-03 19:19:04 +01:00
install: build
2020-03-03 19:12:30 +01:00
install -m 0755 -o root -g root \
$(BUILDDIR)/pushokku \
$(DESTDIR)/bin/pushokku
2020-03-03 19:15:09 +01:00
spec:
crystal spec
test: spec
2020-03-02 00:21:13 +01:00
run:
crystal run src/pushokku.cr
2020-03-03 19:12:30 +01:00
clean:
rm -f $(BUILDDIR)/pushokku