Makefile: Improve build target

This commit is contained in:
Glenn Y. Rolland 2020-03-03 19:19:04 +01:00
parent b0a53bb6a2
commit d95652b5d6

View file

@ -9,13 +9,15 @@ all: build
$(BUILDDIR): $(BUILDDIR):
mkdir -p $(BUILDDIR) mkdir -p $(BUILDDIR)
build: clean $(BUILDDIR) $(BUILDDIR)/pushokku:
crystal build $(LDFLAGS) src/pushokku.cr -o $(BUILDDIR)/pushokku crystal build $(LDFLAGS) src/pushokku.cr -o $(BUILDDIR)/pushokku
build: $(BUILDDIR)/pushokku
build-release: LDFLAGS=--release --no-debug build-release: LDFLAGS=--release --no-debug
build-release: build build-release: build
install: install: build
install -m 0755 -o root -g root \ install -m 0755 -o root -g root \
$(BUILDDIR)/pushokku \ $(BUILDDIR)/pushokku \
$(DESTDIR)/bin/pushokku $(DESTDIR)/bin/pushokku