Add install target
This commit is contained in:
parent
848e434fc1
commit
2d2c872c3d
1 changed files with 17 additions and 3 deletions
20
Makefile
20
Makefile
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue