Fix build rules

This commit is contained in:
Glenn Y. Rolland 2022-08-16 21:35:19 +02:00
parent 3c6c9f0681
commit fda36c7d5a
3 changed files with 8 additions and 6 deletions

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
/docs/
_build
/lib/
/bin/
/.shards/

View file

@ -4,24 +4,24 @@ SOURCES=$(shell find -name '*.cr')
LDFLAGS=
DESTDIR=/usr
BUILDDIR=_build
BUILD_DIR=_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_DIR)/kathmandu_time: $(BUILD_DIR) $(SOURCES)
crystal build $(LDFLAGS) src/kathmandu_time.cr -o $(BUILD_DIR)/kathmandu_time
build: $(BUILDDIR)/kathmandu_time
build: $(BUILD_DIR)/kathmandu_time
build-release: LDFLAGS=--release --no-debug
build-release: build
install: build
install -m 0755 -o root -g root \
$(BUILDDIR)/kathmandu_time \
$(BUILD_DIR)/kathmandu_time \
$(DESTDIR)/bin/kathmandu_time
spec:
@ -33,5 +33,5 @@ run:
crystal run src/kathmandu_time.cr
clean:
rm -f $(BUILDDIR)/kathmandu_time
rm -f $(BUILD_DIR)/kathmandu_time

View file

@ -8,6 +8,7 @@ TODO: Write installation instructions here
## Usage
TODO: Write usage instructions here
## Development