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

366 lines
14 KiB
Makefile
Raw Permalink Normal View History

PACKAGE = 'libipc'
VERSION = '0.7.2'
PREFIX := /usr/local
BINDIR := $(PREFIX)/bin
LIBDIR := $(PREFIX)/lib
SHAREDIR := $(PREFIX)/share
INCLUDEDIR := $(PREFIX)/include
MANDIR := $(SHAREDIR)/man
2019-07-27 15:46:04 +02:00
CFLAGS := -Wall -Wextra -g
2019-11-14 20:44:18 +01:00
CC := cc
CXX := c++
LD := ${CC}
CXXFLAGS :=
LDFLAGS :=
Q := @
all: libipc man/libipc.7
@:
2019-07-27 15:46:04 +02:00
libipc: libipc.so libipc.a
@:
libipc.install: libipc.so.install libipc.a.install
libipc.clean: libipc.so.clean libipc.a.clean
libipc.uninstall: libipc.so.uninstall libipc.a.uninstall
2019-08-28 12:41:24 +02:00
man/libipc.7: man/libipc.7.scd man
2019-11-14 20:44:18 +01:00
@echo ' MAN > man/libipc.7'
2019-08-28 12:41:24 +02:00
$(Q)scdoc < 'man/libipc.7.scd' > 'man/libipc.7'
man/libipc.7.install: man/libipc.7
@echo ' IN > $(MANDIR)/man7/libipc.7'
$(Q)mkdir -p '$(DESTDIR)$(MANDIR)/man7'
$(Q)install -m0644 man/libipc.7 $(DESTDIR)$(MANDIR)/man7/libipc.7
man/libipc.7.clean:
@echo ' RM > man/libipc.7'
$(Q)rm -f man/libipc.7
man/libipc.7.uninstall:
@echo ' RM > $(MANDIR)/man7/libipc.7'
$(Q)rm -f '$(DESTDIR)$(MANDIR)/man7/libipc.7'
libipc.so: src/communication.o src/context.o src/error.o src/fs.o src/message.o src/network.o src/print.o src/service_path.o src/usocket.o src/utils.o src/fs.h src/ipc.h src/message.h src/usocket.h src/utils.h
@echo ' LD > libipc.so'
$(Q)$(CC) -o libipc.so -shared $(LDFLAGS) src/communication.o src/context.o src/error.o src/fs.o src/message.o src/network.o src/print.o src/service_path.o src/usocket.o src/utils.o
libipc.so.install: libipc.so
@echo ' IN > $(LIBDIR)/libipc.so.0.7.2'
$(Q)mkdir -p '$(DESTDIR)$(LIBDIR)'
$(Q)install -m0755 libipc.so $(DESTDIR)$(LIBDIR)/libipc.so.0.7.2
@echo ' LN > $(LIBDIR)/libipc.so.0.7'
$(Q)ln -sf '$(LIBDIR)/libipc.so.0.7.2' '$(DESTDIR)/$(LIBDIR)/libipc.so.0.7'
2019-11-14 20:44:18 +01:00
@echo ' LN > $(LIBDIR)/libipc.so.0'
$(Q)ln -sf '$(LIBDIR)/libipc.so.0.7.2' '$(DESTDIR)/$(LIBDIR)/libipc.so.0'
2019-11-14 20:44:18 +01:00
@echo ' LN > $(LIBDIR)/libipc.so'
$(Q)ln -sf '$(LIBDIR)/libipc.so.0.7.2' '$(DESTDIR)/$(LIBDIR)/libipc.so'
libipc.so.clean:
@echo ' RM > libipc.so'
$(Q)rm -f libipc.so
libipc.so.uninstall:
@echo ' RM > $(LIBDIR)/libipc.so.0.7.2'
$(Q)rm -f '$(DESTDIR)$(LIBDIR)/libipc.so.0.7.2'
@echo ' RM > $(LIBDIR)/libipc.so.0.7'
$(Q)rm -f '$(DESTDIR)$(LIBDIR)/libipc.so.0.7'
@echo ' RM > $(LIBDIR)/libipc.so.0'
$(Q)rm -f '$(DESTDIR)$(LIBDIR)/libipc.so.0'
@echo ' RM > $(LIBDIR)/libipc.so'
$(Q)rm -f '$(DESTDIR)$(LIBDIR)/libipc.so'
libipc.a: src/communication.o src/context.o src/error.o src/fs.o src/message.o src/network.o src/print.o src/service_path.o src/usocket.o src/utils.o src/fs.h src/ipc.h src/message.h src/usocket.h src/utils.h
@echo ' LD > libipc.a'
$(Q)$(AR) rc 'libipc.a' src/communication.o src/context.o src/error.o src/fs.o src/message.o src/network.o src/print.o src/service_path.o src/usocket.o src/utils.o
libipc.a.install: libipc.a
@echo ' IN > $(LIBDIR)/libipc.a'
$(Q)mkdir -p '$(DESTDIR)$(LIBDIR)'
$(Q)install -m0755 libipc.a $(DESTDIR)$(LIBDIR)/libipc.a
libipc.a.clean:
@echo ' RM > libipc.a'
$(Q)rm -f libipc.a
libipc.a.uninstall:
@echo ' RM > $(LIBDIR)/libipc.a'
$(Q)rm -f '$(DESTDIR)$(LIBDIR)/libipc.a'
2019-07-27 15:46:04 +02:00
src/communication.o: src/communication.c src/ipc.h src/utils.h src/message.h
@echo ' CC > src/communication.o'
2019-07-27 15:46:04 +02:00
$(Q)$(CC) $(CFLAGS) -fPIC -std=c11 -c src/communication.c -fPIC -std=c11 -o src/communication.o
src/communication.o.install:
src/communication.o.clean:
@echo ' RM > src/communication.o'
$(Q)rm -f src/communication.o
src/communication.o.uninstall:
src/context.o: src/context.c src/ipc.h
@echo ' CC > src/context.o'
$(Q)$(CC) $(CFLAGS) -fPIC -std=c11 -c src/context.c -fPIC -std=c11 -o src/context.o
src/context.o.install:
src/context.o.clean:
@echo ' RM > src/context.o'
$(Q)rm -f src/context.o
src/context.o.uninstall:
2019-07-27 15:46:04 +02:00
src/error.o: src/error.c src/ipc.h
@echo ' CC > src/error.o'
2019-07-27 15:46:04 +02:00
$(Q)$(CC) $(CFLAGS) -fPIC -std=c11 -c src/error.c -fPIC -std=c11 -o src/error.o
2019-06-03 21:25:59 +02:00
src/error.o.install:
src/error.o.clean:
@echo ' RM > src/error.o'
2019-06-03 21:25:59 +02:00
$(Q)rm -f src/error.o
src/error.o.uninstall:
src/fs.o: src/fs.c src/utils.h src/fs.h
@echo ' CC > src/fs.o'
$(Q)$(CC) $(CFLAGS) -fPIC -std=c11 -c src/fs.c -fPIC -std=c11 -o src/fs.o
src/fs.o.install:
src/fs.o.clean:
@echo ' RM > src/fs.o'
$(Q)rm -f src/fs.o
src/fs.o.uninstall:
2019-07-27 15:46:04 +02:00
src/message.o: src/message.c src/message.h src/usocket.h
@echo ' CC > src/message.o'
2019-07-27 15:46:04 +02:00
$(Q)$(CC) $(CFLAGS) -fPIC -std=c11 -c src/message.c -fPIC -std=c11 -o src/message.o
src/message.o.install:
src/message.o.clean:
@echo ' RM > src/message.o'
$(Q)rm -f src/message.o
src/message.o.uninstall:
2019-07-27 15:46:04 +02:00
src/network.o: src/network.c src/ipc.h
@echo ' CC > src/network.o'
$(Q)$(CC) $(CFLAGS) -fPIC -std=c11 -c src/network.c -fPIC -std=c11 -o src/network.o
src/network.o.install:
src/network.o.clean:
@echo ' RM > src/network.o'
$(Q)rm -f src/network.o
src/network.o.uninstall:
src/print.o: src/print.c src/ipc.h
@echo ' CC > src/print.o'
$(Q)$(CC) $(CFLAGS) -fPIC -std=c11 -c src/print.c -fPIC -std=c11 -o src/print.o
src/print.o.install:
src/print.o.clean:
@echo ' RM > src/print.o'
$(Q)rm -f src/print.o
src/print.o.uninstall:
src/service_path.o: src/service_path.c src/ipc.h
@echo ' CC > src/service_path.o'
$(Q)$(CC) $(CFLAGS) -fPIC -std=c11 -c src/service_path.c -fPIC -std=c11 -o src/service_path.o
src/service_path.o.install:
src/service_path.o.clean:
@echo ' RM > src/service_path.o'
$(Q)rm -f src/service_path.o
src/service_path.o.uninstall:
src/usocket.o: src/usocket.c src/usocket.h src/utils.h src/fs.h
@echo ' CC > src/usocket.o'
2019-07-27 15:46:04 +02:00
$(Q)$(CC) $(CFLAGS) -fPIC -std=c11 -c src/usocket.c -fPIC -std=c11 -o src/usocket.o
src/usocket.o.install:
src/usocket.o.clean:
@echo ' RM > src/usocket.o'
$(Q)rm -f src/usocket.o
src/usocket.o.uninstall:
2019-07-27 15:46:04 +02:00
src/utils.o: src/utils.c src/utils.h src/ipc.h
@echo ' CC > src/utils.o'
2019-07-27 15:46:04 +02:00
$(Q)$(CC) $(CFLAGS) -fPIC -std=c11 -c src/utils.c -fPIC -std=c11 -o src/utils.o
src/utils.o.install:
src/utils.o.clean:
@echo ' RM > src/utils.o'
$(Q)rm -f src/utils.o
src/utils.o.uninstall:
2019-07-27 15:46:04 +02:00
man:
$(Q)mkdir -p man
src:
$(Q)mkdir -p src
$(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: libipc.install man/libipc.7.install libipc.so.install libipc.a.install src/communication.o.install src/context.o.install src/error.o.install src/fs.o.install src/message.o.install src/network.o.install src/print.o.install src/service_path.o.install src/usocket.o.install src/utils.o.install src/communication.o.install src/context.o.install src/error.o.install src/fs.o.install src/message.o.install src/network.o.install src/print.o.install src/service_path.o.install src/usocket.o.install src/utils.o.install
@:
uninstall: libipc.uninstall man/libipc.7.uninstall libipc.so.uninstall libipc.a.uninstall src/communication.o.uninstall src/context.o.uninstall src/error.o.uninstall src/fs.o.uninstall src/message.o.uninstall src/network.o.uninstall src/print.o.uninstall src/service_path.o.uninstall src/usocket.o.uninstall src/utils.o.uninstall src/communication.o.uninstall src/context.o.uninstall src/error.o.uninstall src/fs.o.uninstall src/message.o.uninstall src/network.o.uninstall src/print.o.uninstall src/service_path.o.uninstall src/usocket.o.uninstall src/utils.o.uninstall
@:
clean: libipc.clean man/libipc.7.clean libipc.so.clean libipc.a.clean src/communication.o.clean src/context.o.clean src/error.o.clean src/fs.o.clean src/message.o.clean src/network.o.clean src/print.o.clean src/service_path.o.clean src/usocket.o.clean src/utils.o.clean src/communication.o.clean src/context.o.clean src/error.o.clean src/fs.o.clean src/message.o.clean src/network.o.clean src/print.o.clean src/service_path.o.clean src/usocket.o.clean src/utils.o.clean
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)/libipc.so \
$(PACKAGE)-$(VERSION)/libipc.a \
$(PACKAGE)-$(VERSION)/man/libipc.7.scd \
$(PACKAGE)-$(VERSION)/man/libipc.7 \
$(PACKAGE)-$(VERSION)/Makefile \
$(PACKAGE)-$(VERSION)/project.zsh \
$(PACKAGE)-$(VERSION)/src/communication.c \
$(PACKAGE)-$(VERSION)/src/context.c \
2019-06-03 21:25:59 +02:00
$(PACKAGE)-$(VERSION)/src/error.c \
$(PACKAGE)-$(VERSION)/src/fs.c \
$(PACKAGE)-$(VERSION)/src/message.c \
2019-07-27 15:46:04 +02:00
$(PACKAGE)-$(VERSION)/src/network.c \
$(PACKAGE)-$(VERSION)/src/print.c \
$(PACKAGE)-$(VERSION)/src/service_path.c \
$(PACKAGE)-$(VERSION)/src/usocket.c \
$(PACKAGE)-$(VERSION)/src/utils.c \
$(PACKAGE)-$(VERSION)/src/ipc.h \
$(PACKAGE)-$(VERSION)/src/fs.h \
$(PACKAGE)-$(VERSION)/src/message.h \
$(PACKAGE)-$(VERSION)/src/usocket.h \
$(PACKAGE)-$(VERSION)/src/utils.h
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)/libipc.so \
$(PACKAGE)-$(VERSION)/libipc.a \
$(PACKAGE)-$(VERSION)/man/libipc.7.scd \
$(PACKAGE)-$(VERSION)/man/libipc.7 \
$(PACKAGE)-$(VERSION)/Makefile \
$(PACKAGE)-$(VERSION)/project.zsh \
$(PACKAGE)-$(VERSION)/src/communication.c \
$(PACKAGE)-$(VERSION)/src/context.c \
2019-06-03 21:25:59 +02:00
$(PACKAGE)-$(VERSION)/src/error.c \
$(PACKAGE)-$(VERSION)/src/fs.c \
$(PACKAGE)-$(VERSION)/src/message.c \
2019-07-27 15:46:04 +02:00
$(PACKAGE)-$(VERSION)/src/network.c \
$(PACKAGE)-$(VERSION)/src/print.c \
$(PACKAGE)-$(VERSION)/src/service_path.c \
$(PACKAGE)-$(VERSION)/src/usocket.c \
$(PACKAGE)-$(VERSION)/src/utils.c \
$(PACKAGE)-$(VERSION)/src/ipc.h \
$(PACKAGE)-$(VERSION)/src/fs.h \
$(PACKAGE)-$(VERSION)/src/message.h \
$(PACKAGE)-$(VERSION)/src/usocket.h \
$(PACKAGE)-$(VERSION)/src/utils.h
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)/libipc.so \
$(PACKAGE)-$(VERSION)/libipc.a \
$(PACKAGE)-$(VERSION)/man/libipc.7.scd \
$(PACKAGE)-$(VERSION)/man/libipc.7 \
$(PACKAGE)-$(VERSION)/Makefile \
$(PACKAGE)-$(VERSION)/project.zsh \
$(PACKAGE)-$(VERSION)/src/communication.c \
$(PACKAGE)-$(VERSION)/src/context.c \
2019-06-03 21:25:59 +02:00
$(PACKAGE)-$(VERSION)/src/error.c \
$(PACKAGE)-$(VERSION)/src/fs.c \
$(PACKAGE)-$(VERSION)/src/message.c \
2019-07-27 15:46:04 +02:00
$(PACKAGE)-$(VERSION)/src/network.c \
$(PACKAGE)-$(VERSION)/src/print.c \
$(PACKAGE)-$(VERSION)/src/service_path.c \
$(PACKAGE)-$(VERSION)/src/usocket.c \
$(PACKAGE)-$(VERSION)/src/utils.c \
$(PACKAGE)-$(VERSION)/src/ipc.h \
$(PACKAGE)-$(VERSION)/src/fs.h \
$(PACKAGE)-$(VERSION)/src/message.h \
$(PACKAGE)-$(VERSION)/src/usocket.h \
$(PACKAGE)-$(VERSION)/src/utils.h
help:
@echo ' :: libipc-0.7.2'
@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 ' - CFLAGS  ${CFLAGS}'
2019-11-14 20:44:18 +01:00
@echo ' - CC  ${CC}'
@echo ' - CXX  ${CXX}'
@echo ' - LD  ${LD}'
@echo ' - CXXFLAGS  ${CXXFLAGS}'
@echo ' - LDFLAGS  ${LDFLAGS}'
@echo ' - PREFIX  ${PREFIX}'
@echo ' - BINDIR  ${BINDIR}'
@echo ' - LIBDIR  ${LIBDIR}'
@echo ' - SHAREDIR  ${SHAREDIR}'
@echo ' - INCLUDEDIR  ${INCLUDEDIR}'
@echo ' - MANDIR  ${MANDIR}'
@echo ''
@echo 'Project targets: '
@echo ' - libipc  library'
2019-08-28 12:41:24 +02:00
@echo ' - man/libipc.7  scdocman'
@echo ''
@echo 'Makefile options:'
@echo ' - gnu: false'
@echo ' - colors: true'
@echo ''
@echo 'Rebuild the Makefile with:'
@echo ' zsh ./build.zsh -c'
2019-11-14 20:44:18 +01:00
.PHONY: all clean distclean dist install uninstall help