You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

173 lines
5.3 KiB

5 years ago
PACKAGE = 'kanban'
VERSION = '0.1'
PREFIX := /usr/local
BINDIR := $(PREFIX)/bin
LIBDIR := $(PREFIX)/lib
SHAREDIR := $(PREFIX)/share
INCLUDEDIR := $(PREFIX)/include
MANDIR := $(SHAREDIR)/man
CC := cc
AR := ar
RANLIB := ranlib
CFLAGS :=
LDFLAGS :=
Q := @
all: kanband main.js style.css
5 years ago
@:
kanband: src/main.cr
@echo ' CR > kanband'
$(Q)crystal src/main.cr -o 'kanband'
5 years ago
kanband.install: kanband
@echo ' IN > $(BINDIR)/kanband'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 kanband $(DESTDIR)$(BINDIR)/kanband
5 years ago
kanband.clean:
@echo ' RM > kanband'
$(Q)rm -f kanband
5 years ago
kanband.uninstall:
@echo ' RM > $(BINDIR)/kanband'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/kanband'
5 years ago
main.js: main.bundle.js
@echo ' MIN > main.js'
$(Q)npx babel --minified main.bundle.js -o main.js
5 years ago
main.bundle.js: client/index.ls client/bulma.ls
@echo ' BUN > main.bundle.js'
$(Q)npx browserify -t browserify-livescript client/index.ls -o main.bundle.js
5 years ago
main.js.clean:
@echo ' RM > main.js'
$(Q)rm -f main.js
@echo ' RM > main.bundle.js'
$(Q)rm -f main.bundle.js
style.css: client/style.sass
@echo ' CSS > style.css'
$(Q)sassc client/style.sass > style.css
style.css.clean:
@echo ' RM > style.css'
$(Q)rm -f style.css
5 years ago
$(DESTDIR)$(PREFIX):
@echo ' DIR > $(PREFIX)'
$(Q)mkdir -p $(DESTDIR)$(PREFIX)
$(DESTDIR)$(BINDIR):
@echo ' DIR > $(BINDIR)'
$(Q)mkdir -p $(DESTDIR)$(BINDIR)
$(DESTDIR)$(LIBDIR):
@echo ' DIR > $(LIBDIR)'
$(Q)mkdir -p $(DESTDIR)$(LIBDIR)
$(DESTDIR)$(SHAREDIR):
@echo ' DIR > $(SHAREDIR)'
$(Q)mkdir -p $(DESTDIR)$(SHAREDIR)
$(DESTDIR)$(INCLUDEDIR):
@echo ' DIR > $(INCLUDEDIR)'
$(Q)mkdir -p $(DESTDIR)$(INCLUDEDIR)
$(DESTDIR)$(MANDIR):
@echo ' DIR > $(MANDIR)'
$(Q)mkdir -p $(DESTDIR)$(MANDIR)
install: subdirs.install kanband.install main.js.install style.css.install
5 years ago
@:
subdirs.install:
uninstall: subdirs.uninstall kanband.uninstall main.js.uninstall style.css.uninstall
5 years ago
@:
subdirs.uninstall:
test: all subdirs subdirs.test
@:
subdirs.test:
clean: kanband.clean main.js.clean style.css.clean
5 years ago
distclean: clean
dist: dist-gz dist-xz dist-bz2
$(Q)rm -- $(PACKAGE)-$(VERSION)
distdir:
$(Q)rm -rf -- $(PACKAGE)-$(VERSION)
$(Q)ln -s -- . $(PACKAGE)-$(VERSION)
dist-gz: $(PACKAGE)-$(VERSION).tar.gz
$(PACKAGE)-$(VERSION).tar.gz: distdir
@echo ' TAR > $(PACKAGE)-$(VERSION).tar.gz'
$(Q)tar czf $(PACKAGE)-$(VERSION).tar.gz \
$(PACKAGE)-$(VERSION)/src/main.cr \
5 years ago
$(PACKAGE)-$(VERSION)/client/index.ls \
$(PACKAGE)-$(VERSION)/client/style.sass \
$(PACKAGE)-$(VERSION)/client/bulma.ls
5 years ago
dist-xz: $(PACKAGE)-$(VERSION).tar.xz
$(PACKAGE)-$(VERSION).tar.xz: distdir
@echo ' TAR > $(PACKAGE)-$(VERSION).tar.xz'
$(Q)tar cJf $(PACKAGE)-$(VERSION).tar.xz \
$(PACKAGE)-$(VERSION)/src/main.cr \
5 years ago
$(PACKAGE)-$(VERSION)/client/index.ls \
$(PACKAGE)-$(VERSION)/client/style.sass \
$(PACKAGE)-$(VERSION)/client/bulma.ls
5 years ago
dist-bz2: $(PACKAGE)-$(VERSION).tar.bz2
$(PACKAGE)-$(VERSION).tar.bz2: distdir
@echo ' TAR > $(PACKAGE)-$(VERSION).tar.bz2'
$(Q)tar cjf $(PACKAGE)-$(VERSION).tar.bz2 \
$(PACKAGE)-$(VERSION)/src/main.cr \
5 years ago
$(PACKAGE)-$(VERSION)/client/index.ls \
$(PACKAGE)-$(VERSION)/client/style.sass \
$(PACKAGE)-$(VERSION)/client/bulma.ls
5 years ago
help:
@echo ' :: kanban-0.1'
@echo ''
@echo 'Generic targets:'
@echo ' - help  Prints this help message.'
@echo ' - all  Builds all targets.'
@echo ' - dist  Creates tarballs of the files of the project.'
@echo ' - install  Installs the project.'
@echo ' - clean  Removes compiled files.'
@echo ' - uninstall  Deinstalls the project.'
@echo ''
@echo 'CLI-modifiable variables:'
@echo ' - CC  ${CC}'
@echo ' - CFLAGS  ${CFLAGS}'
@echo ' - LDFLAGS  ${LDFLAGS}'
@echo ' - DESTDIR  ${DESTDIR}'
@echo ' - PREFIX  ${PREFIX}'
@echo ' - BINDIR  ${BINDIR}'
@echo ' - LIBDIR  ${LIBDIR}'
@echo ' - SHAREDIR  ${SHAREDIR}'
@echo ' - INCLUDEDIR  ${INCLUDEDIR}'
@echo ' - MANDIR  ${MANDIR}'
@echo ''
@echo 'Project targets: '
@echo ' - kanband  crystal'
@echo ' - main.js  livescript'
@echo ' - style.css  css'
5 years ago
@echo ''
@echo 'Makefile options:'
@echo ' - gnu: false'
@echo ' - colors: true'
@echo ''
@echo 'Rebuild the Makefile with:'
@echo ' zsh ./build.zsh -c'
.PHONY: all subdirs clean distclean dist install uninstall help