Add install target

This commit is contained in:
Glenn Y. Rolland 2020-03-03 19:12:30 +01:00
parent 848e434fc1
commit 2d2c872c3d

View file

@ -1,14 +1,28 @@
LDFLAGS= LDFLAGS=
#LDFLAGS=--no-debug DESTDIR=/usr
BUILDDIR=_build
all: build all: build
build: $(BUILDDIR):
crystal build $(LDFLAGS) src/pushokku.cr -o pushokku mkdir -p $(BUILDDIR)
build: clean $(BUILDDIR)
crystal build $(LDFLAGS) src/pushokku.cr -o $(BUILDDIR)/pushokku
build-release: LDFLAGS=--release --no-debug
build-release: build
install:
install -m 0755 -o root -g root \
$(BUILDDIR)/pushokku \
$(DESTDIR)/bin/pushokku
test: test:
run: run:
crystal run src/pushokku.cr crystal run src/pushokku.cr
clean:
rm -f $(BUILDDIR)/pushokku