diff --git a/Makefile b/Makefile index 54bb4d8..6d35d87 100644 --- a/Makefile +++ b/Makefile @@ -7,12 +7,7 @@ LIBDIR := $(PREFIX)/lib SHAREDIR := $(PREFIX)/share INCLUDEDIR := $(PREFIX)/include MANDIR := $(SHAREDIR)/man - -CC := cc -AR := ar -RANLIB := ranlib -CFLAGS := -LDFLAGS := +CRFLAGS := --release Q := @ @@ -21,7 +16,7 @@ all: tcpd tcpc pongd pongc plumberd websocketc websocketd tcpd: src/tcpd.cr @echo ' CR > tcpd' - $(Q)crystal src/tcpd.cr -o 'tcpd' + $(Q)crystal build $(CRFLAGS) src/tcpd.cr -o 'tcpd' tcpd.install: tcpd @@ -39,7 +34,7 @@ tcpd.uninstall: tcpc: src/tcpc.cr @echo ' CR > tcpc' - $(Q)crystal src/tcpc.cr -o 'tcpc' + $(Q)crystal build $(CRFLAGS) src/tcpc.cr -o 'tcpc' tcpc.install: tcpc @@ -57,7 +52,7 @@ tcpc.uninstall: pongd: src/pongd.cr @echo ' CR > pongd' - $(Q)crystal src/pongd.cr -o 'pongd' + $(Q)crystal build $(CRFLAGS) src/pongd.cr -o 'pongd' pongd.install: pongd @@ -75,7 +70,7 @@ pongd.uninstall: pongc: src/pongc.cr @echo ' CR > pongc' - $(Q)crystal src/pongc.cr -o 'pongc' + $(Q)crystal build $(CRFLAGS) src/pongc.cr -o 'pongc' pongc.install: pongc @@ -93,7 +88,7 @@ pongc.uninstall: plumberd: src/plumberd.cr @echo ' CR > plumberd' - $(Q)crystal src/plumberd.cr -o 'plumberd' + $(Q)crystal build $(CRFLAGS) src/plumberd.cr -o 'plumberd' plumberd.install: plumberd @@ -111,7 +106,7 @@ plumberd.uninstall: websocketc: src/websocketc.cr @echo ' CR > websocketc' - $(Q)crystal src/websocketc.cr -o 'websocketc' + $(Q)crystal build $(CRFLAGS) src/websocketc.cr -o 'websocketc' websocketc.install: websocketc @@ -129,7 +124,7 @@ websocketc.uninstall: websocketd: src/websocketd.cr @echo ' CR > websocketd' - $(Q)crystal src/websocketd.cr -o 'websocketd' + $(Q)crystal build $(CRFLAGS) src/websocketd.cr -o 'websocketd' websocketd.install: websocketd @@ -163,25 +158,14 @@ $(DESTDIR)$(INCLUDEDIR): $(DESTDIR)$(MANDIR): @echo ' DIR > $(MANDIR)' $(Q)mkdir -p $(DESTDIR)$(MANDIR) -install: subdirs.install tcpd.install tcpc.install pongd.install pongc.install plumberd.install websocketc.install websocketd.install +install: tcpd.install tcpc.install pongd.install pongc.install plumberd.install websocketc.install websocketd.install @: -subdirs.install: - -uninstall: subdirs.uninstall tcpd.uninstall tcpc.uninstall pongd.uninstall pongc.uninstall plumberd.uninstall websocketc.uninstall websocketd.uninstall +uninstall: tcpd.uninstall tcpc.uninstall pongd.uninstall pongc.uninstall plumberd.uninstall websocketc.uninstall websocketd.uninstall @: -subdirs.uninstall: - -test: all subdirs subdirs.test - @: - -subdirs.test: - clean: tcpd.clean tcpc.clean pongd.clean pongc.clean plumberd.clean websocketc.clean websocketd.clean - distclean: clean - dist: dist-gz dist-xz dist-bz2 $(Q)rm -- $(PACKAGE)-$(VERSION) @@ -237,10 +221,13 @@ help: @echo ' - uninstall  Deinstalls the project.' @echo '' @echo 'CLI-modifiable variables:' - @echo ' - CC  ${CC}' - @echo ' - CFLAGS  ${CFLAGS}' - @echo ' - LDFLAGS  ${LDFLAGS}' - @echo ' - DESTDIR  ${DESTDIR}' + @echo ' - CRFLAGS  ${CRFLAGS}' + @echo ' - CRFLAGS  ${CRFLAGS}' + @echo ' - CRFLAGS  ${CRFLAGS}' + @echo ' - CRFLAGS  ${CRFLAGS}' + @echo ' - CRFLAGS  ${CRFLAGS}' + @echo ' - CRFLAGS  ${CRFLAGS}' + @echo ' - CRFLAGS  ${CRFLAGS}' @echo ' - PREFIX  ${PREFIX}' @echo ' - BINDIR  ${BINDIR}' @echo ' - LIBDIR  ${LIBDIR}' @@ -263,5 +250,5 @@ help: @echo '' @echo 'Rebuild the Makefile with:' @echo ' zsh ./build.zsh -c' -.PHONY: all subdirs clean distclean dist install uninstall help +.PHONY: all clean distclean dist install uninstall help diff --git a/project.zsh b/project.zsh index 497ca9c..5ef1e3f 100644 --- a/project.zsh +++ b/project.zsh @@ -1,10 +1,10 @@ -package=plumberd -version=0.1.0 +package=ipcd +version=0.2.0 -targets=(tcpd tcpc pongd pongc plumberd websocketc websocketd) +targets=(tcpd tcpc pongd pongc ipcd websocketc websocketd) -for target in tcpd tcpc pongd pongc plumberd websocketc websocketd; do +for target in tcpd tcpc pongd pongc ipcd websocketc websocketd; do type[$target]=crystal sources[$target]=src/${target}.cr done diff --git a/shard.yml b/shard.yml index 56568bf..43d617b 100644 --- a/shard.yml +++ b/shard.yml @@ -1,11 +1,11 @@ -name: plumberd +name: ipcd version: 0.2.0 authors: - karchnu description: | - Plumberd allows IPC clients to contact remote services. + IPCd allows IPC clients to contact remote services. dependencies: ipc: @@ -18,8 +18,8 @@ targets: pongd: main: src/pongd.cr - plumberd: - main: src/main.cr + ipcd: + main: src/ipcd.cr admind: main: src/admind.cr diff --git a/src/plumberd.cr b/src/ipcd.cr similarity index 100% rename from src/plumberd.cr rename to src/ipcd.cr