Archived
3
0
This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues or pull requests.
ipcd/Makefile

261 lines
8.4 KiB
Makefile
Raw Normal View History

2020-05-27 15:01:50 +02:00
PACKAGE = 'ipcd'
VERSION = '0.2.1'
2019-11-04 15:35:01 +01:00
PREFIX := /usr/local
BINDIR := $(PREFIX)/bin
LIBDIR := $(PREFIX)/lib
SHAREDIR := $(PREFIX)/share
INCLUDEDIR := $(PREFIX)/include
MANDIR := $(SHAREDIR)/man
2020-01-06 15:35:09 +01:00
CRFLAGS := --release
2020-05-27 15:01:50 +02:00
CRFLAGS := --release
CRFLAGS := --release
CRFLAGS := --release
CRFLAGS := --release
CRFLAGS := --release
CRFLAGS := --release
2019-11-04 15:35:01 +01:00
Q := @
2020-05-27 15:01:50 +02:00
all: tcpd tcpc pongd pongc ipcd websocketc websocketd
2019-11-04 15:35:01 +01:00
@:
2020-05-27 15:01:50 +02:00
tcpd: src/tcpd.cr
2019-11-04 15:35:01 +01:00
@echo ' CR > tcpd'
2020-01-06 15:35:09 +01:00
$(Q)crystal build $(CRFLAGS) src/tcpd.cr -o 'tcpd'
2019-11-04 15:35:01 +01:00
tcpd.install: tcpd
@echo ' IN > $(BINDIR)/tcpd'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 tcpd $(DESTDIR)$(BINDIR)/tcpd
tcpd.clean:
@echo ' RM > tcpd'
$(Q)rm -f tcpd
tcpd.uninstall:
@echo ' RM > $(BINDIR)/tcpd'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/tcpd'
2020-05-27 15:01:50 +02:00
tcpc: src/tcpc.cr
2019-11-04 15:35:01 +01:00
@echo ' CR > tcpc'
2020-01-06 15:35:09 +01:00
$(Q)crystal build $(CRFLAGS) src/tcpc.cr -o 'tcpc'
2019-11-04 15:35:01 +01:00
tcpc.install: tcpc
@echo ' IN > $(BINDIR)/tcpc'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 tcpc $(DESTDIR)$(BINDIR)/tcpc
tcpc.clean:
@echo ' RM > tcpc'
$(Q)rm -f tcpc
tcpc.uninstall:
@echo ' RM > $(BINDIR)/tcpc'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/tcpc'
2020-05-27 15:01:50 +02:00
pongd: src/pongd.cr
2019-11-04 15:35:01 +01:00
@echo ' CR > pongd'
2020-01-06 15:35:09 +01:00
$(Q)crystal build $(CRFLAGS) src/pongd.cr -o 'pongd'
2019-11-04 15:35:01 +01:00
pongd.install: pongd
@echo ' IN > $(BINDIR)/pongd'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 pongd $(DESTDIR)$(BINDIR)/pongd
pongd.clean:
@echo ' RM > pongd'
$(Q)rm -f pongd
pongd.uninstall:
@echo ' RM > $(BINDIR)/pongd'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/pongd'
2020-05-27 15:01:50 +02:00
pongc: src/pongc.cr
2019-11-04 15:35:01 +01:00
@echo ' CR > pongc'
2020-01-06 15:35:09 +01:00
$(Q)crystal build $(CRFLAGS) src/pongc.cr -o 'pongc'
2019-11-04 15:35:01 +01:00
pongc.install: pongc
@echo ' IN > $(BINDIR)/pongc'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 pongc $(DESTDIR)$(BINDIR)/pongc
pongc.clean:
@echo ' RM > pongc'
$(Q)rm -f pongc
pongc.uninstall:
@echo ' RM > $(BINDIR)/pongc'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/pongc'
2020-05-27 15:01:50 +02:00
ipcd: src/ipcd.cr
@echo ' CR > ipcd'
$(Q)crystal build $(CRFLAGS) src/ipcd.cr -o 'ipcd'
2019-11-04 15:35:01 +01:00
2020-05-27 15:01:50 +02:00
ipcd.install: ipcd
@echo ' IN > $(BINDIR)/ipcd'
2019-11-04 15:35:01 +01:00
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
2020-05-27 15:01:50 +02:00
$(Q)install -m0755 ipcd $(DESTDIR)$(BINDIR)/ipcd
2019-11-04 15:35:01 +01:00
2020-05-27 15:01:50 +02:00
ipcd.clean:
@echo ' RM > ipcd'
$(Q)rm -f ipcd
2019-11-04 15:35:01 +01:00
2020-05-27 15:01:50 +02:00
ipcd.uninstall:
@echo ' RM > $(BINDIR)/ipcd'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/ipcd'
2019-11-04 15:35:01 +01:00
2020-05-27 15:01:50 +02:00
websocketc: src/websocketc.cr
2019-11-04 15:35:01 +01:00
@echo ' CR > websocketc'
2020-01-06 15:35:09 +01:00
$(Q)crystal build $(CRFLAGS) src/websocketc.cr -o 'websocketc'
2019-11-04 15:35:01 +01:00
websocketc.install: websocketc
@echo ' IN > $(BINDIR)/websocketc'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 websocketc $(DESTDIR)$(BINDIR)/websocketc
websocketc.clean:
@echo ' RM > websocketc'
$(Q)rm -f websocketc
websocketc.uninstall:
@echo ' RM > $(BINDIR)/websocketc'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/websocketc'
2020-05-27 15:01:50 +02:00
websocketd: src/websocketd.cr
2019-11-04 15:35:01 +01:00
@echo ' CR > websocketd'
2020-01-06 15:35:09 +01:00
$(Q)crystal build $(CRFLAGS) src/websocketd.cr -o 'websocketd'
2019-11-04 15:35:01 +01:00
websocketd.install: websocketd
@echo ' IN > $(BINDIR)/websocketd'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 websocketd $(DESTDIR)$(BINDIR)/websocketd
websocketd.clean:
@echo ' RM > websocketd'
$(Q)rm -f websocketd
websocketd.uninstall:
@echo ' RM > $(BINDIR)/websocketd'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/websocketd'
$(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)
2020-05-27 15:01:50 +02:00
install: tcpd.install tcpc.install pongd.install pongc.install ipcd.install websocketc.install websocketd.install
2019-11-04 15:35:01 +01:00
@:
2020-05-27 15:01:50 +02:00
uninstall: tcpd.uninstall tcpc.uninstall pongd.uninstall pongc.uninstall ipcd.uninstall websocketc.uninstall websocketd.uninstall
2019-11-04 15:35:01 +01:00
@:
2020-05-27 15:01:50 +02:00
clean: tcpd.clean tcpc.clean pongd.clean pongc.clean ipcd.clean websocketc.clean websocketd.clean
2019-11-04 15:35:01 +01:00
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/websocketc.cr \
$(PACKAGE)-$(VERSION)/src/websocketd.cr \
$(PACKAGE)-$(VERSION)/src/tcpc.cr \
$(PACKAGE)-$(VERSION)/src/pongc.cr \
$(PACKAGE)-$(VERSION)/src/tcpd.cr \
2020-05-27 15:01:50 +02:00
$(PACKAGE)-$(VERSION)/src/pongd.cr \
$(PACKAGE)-$(VERSION)/src/ipcd.cr
2019-11-04 15:35:01 +01:00
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/websocketc.cr \
$(PACKAGE)-$(VERSION)/src/websocketd.cr \
$(PACKAGE)-$(VERSION)/src/tcpc.cr \
$(PACKAGE)-$(VERSION)/src/pongc.cr \
$(PACKAGE)-$(VERSION)/src/tcpd.cr \
2020-05-27 15:01:50 +02:00
$(PACKAGE)-$(VERSION)/src/pongd.cr \
$(PACKAGE)-$(VERSION)/src/ipcd.cr
2019-11-04 15:35:01 +01:00
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/websocketc.cr \
$(PACKAGE)-$(VERSION)/src/websocketd.cr \
$(PACKAGE)-$(VERSION)/src/tcpc.cr \
$(PACKAGE)-$(VERSION)/src/pongc.cr \
$(PACKAGE)-$(VERSION)/src/tcpd.cr \
2020-05-27 15:01:50 +02:00
$(PACKAGE)-$(VERSION)/src/pongd.cr \
$(PACKAGE)-$(VERSION)/src/ipcd.cr
2019-11-04 15:35:01 +01:00
help:
2020-05-27 15:01:50 +02:00
@echo ' :: ipcd-0.2.1'
2019-11-04 15:35:01 +01:00
@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:'
2020-01-06 15:35:09 +01:00
@echo ' - CRFLAGS  ${CRFLAGS}'
@echo ' - CRFLAGS  ${CRFLAGS}'
@echo ' - CRFLAGS  ${CRFLAGS}'
@echo ' - CRFLAGS  ${CRFLAGS}'
@echo ' - CRFLAGS  ${CRFLAGS}'
@echo ' - CRFLAGS  ${CRFLAGS}'
@echo ' - CRFLAGS  ${CRFLAGS}'
2019-11-04 15:35:01 +01:00
@echo ' - PREFIX  ${PREFIX}'
@echo ' - BINDIR  ${BINDIR}'
@echo ' - LIBDIR  ${LIBDIR}'
@echo ' - SHAREDIR  ${SHAREDIR}'
@echo ' - INCLUDEDIR  ${INCLUDEDIR}'
@echo ' - MANDIR  ${MANDIR}'
@echo ''
@echo 'Project targets: '
@echo ' - tcpd  crystal'
@echo ' - tcpc  crystal'
@echo ' - pongd  crystal'
@echo ' - pongc  crystal'
2020-05-27 15:01:50 +02:00
@echo ' - ipcd  crystal'
2019-11-04 15:35:01 +01:00
@echo ' - websocketc  crystal'
@echo ' - websocketd  crystal'
@echo ''
@echo 'Makefile options:'
@echo ' - gnu: false'
@echo ' - colors: true'
@echo ''
@echo 'Rebuild the Makefile with:'
@echo ' zsh ./build.zsh -c'
2020-01-06 15:35:09 +01:00
.PHONY: all clean distclean dist install uninstall help
2019-11-04 15:35:01 +01:00