Fix build rules
This commit is contained in:
parent
3c6c9f0681
commit
fda36c7d5a
3 changed files with 8 additions and 6 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
|||
/docs/
|
||||
_build
|
||||
/lib/
|
||||
/bin/
|
||||
/.shards/
|
||||
|
|
12
Makefile
12
Makefile
|
@ -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
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ TODO: Write installation instructions here
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
TODO: Write usage instructions here
|
||||
|
||||
## Development
|
||||
|
|
Loading…
Reference in a new issue