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

319 lines
12 KiB
Makefile
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

PACKAGE = 'perfect-os-junk'
VERSION = '0.0.1'
PREFIX := /usr/local
BINDIR := $(PREFIX)/bin
LIBDIR := $(PREFIX)/lib
SHAREDIR := $(PREFIX)/share
INCLUDEDIR := $(PREFIX)/include
CC := cc
AR := ar
RANLIB := ranlib
CFLAGS := -O2 -Wall -Wextra -Wshadow -ansi -pedantic -std=c99 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200809L
LDFLAGS :=
Q := @
all: libposj pingpong/pingpong pubsub/pubsub pubsub/pubsub-test-send
libposj: libposj.so libposj.a
@:
libposj.install: libposj.so.install libposj.a.install
libposj.clean: libposj.so.clean libposj.a.clean
libposj.uninstall: libposj.so.uninstall libposj.a.uninstall
pingpong/pingpong: pingpong/pingpong.o libposj.a
@echo ' [LD] pingpong/pingpong'
$(Q)$(CC) -o pingpong/pingpong $(LDFLAGS) pingpong/pingpong.o libposj.a -lpthread
pingpong/pingpong.install: pingpong/pingpong
@echo ' [IN] $(BINDIR)/pingpong'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 pingpong/pingpong $(DESTDIR)$(BINDIR)/pingpong
pingpong/pingpong.clean: pingpong/pingpong.o.clean
@echo ' [RM] pingpong/pingpong'
$(Q)rm -f pingpong/pingpong
pingpong/pingpong.uninstall:
@echo ' [RM] $(BINDIR)/pingpong'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/pingpong'
pubsub/pubsub: pubsub/pubsubd.o libposj.a
@echo ' [LD] pubsub/pubsub'
$(Q)$(CC) -o pubsub/pubsub $(LDFLAGS) pubsub/pubsubd.o libposj.a -lpthread
pubsub/pubsub.install: pubsub/pubsub
@echo ' [IN] $(BINDIR)/pubsub'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 pubsub/pubsub $(DESTDIR)$(BINDIR)/pubsub
pubsub/pubsub.clean: pubsub/pubsubd.o.clean
@echo ' [RM] pubsub/pubsub'
$(Q)rm -f pubsub/pubsub
pubsub/pubsub.uninstall:
@echo ' [RM] $(BINDIR)/pubsub'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/pubsub'
pubsub/pubsub-test-send: pubsub/pubsub-test-send.o libposj.a
@echo ' [LD] pubsub/pubsub-test-send'
$(Q)$(CC) -o pubsub/pubsub-test-send $(LDFLAGS) pubsub/pubsub-test-send.o libposj.a -lpthread
pubsub/pubsub-test-send.install: pubsub/pubsub-test-send
@echo ' [IN] $(BINDIR)/pubsub-test-send'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 pubsub/pubsub-test-send $(DESTDIR)$(BINDIR)/pubsub-test-send
pubsub/pubsub-test-send.clean: pubsub/pubsub-test-send.o.clean
@echo ' [RM] pubsub/pubsub-test-send'
$(Q)rm -f pubsub/pubsub-test-send
pubsub/pubsub-test-send.uninstall:
@echo ' [RM] $(BINDIR)/pubsub-test-send'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/pubsub-test-send'
libposj.so: lib/communication.o lib/process.o lib/pubsubd.o
@echo ' [LD] libposj.so'
$(Q)$(CC) -o libposj.so -shared $(LDFLAGS) lib/communication.o lib/process.o lib/pubsubd.o
libposj.so.install: libposj.so
@echo ' [IN] $(LIBDIR)/libposj.so.0.0.1'
$(Q)mkdir -p '$(DESTDIR)$(LIBDIR)'
$(Q)install -m0755 libposj.so $(DESTDIR)$(LIBDIR)/libposj.so.0.0.1
@echo ' [LN] $(LIBDIR)/libposj.so.0.0'
$(Q)ln -sf '$(LIBDIR)/libposj.so.0.0.1' '$(DESTDIR)/$(LIBDIR)/libposj.so.0.0'
@echo ' [LN] $(LIBDIR)/libposj.so.0'
$(Q)ln -sf '$(LIBDIR)/libposj.so.0.0.1' '$(DESTDIR)/$(LIBDIR)/libposj.so.0'
@echo ' [LN] $(LIBDIR)/libposj.so'
$(Q)ln -sf '$(LIBDIR)/libposj.so.0.0.1' '$(DESTDIR)/$(LIBDIR)/libposj.so'
libposj.so.clean:
@echo ' [RM] libposj.so'
$(Q)rm -f libposj.so
libposj.so.uninstall:
@echo ' [RM] $(LIBDIR)/libposj.so.0.0.1'
$(Q)rm -f '$(DESTDIR)$(LIBDIR)/libposj.so.0.0.1'
@echo ' [RM] $(LIBDIR)/libposj.so.0.0'
$(Q)rm -f '$(DESTDIR)$(LIBDIR)/libposj.so.0.0'
@echo ' [RM] $(LIBDIR)/libposj.so.0'
$(Q)rm -f '$(DESTDIR)$(LIBDIR)/libposj.so.0'
@echo ' [RM] $(LIBDIR)/libposj.so'
$(Q)rm -f '$(DESTDIR)$(LIBDIR)/libposj.so'
libposj.a: lib/communication.o lib/process.o lib/pubsubd.o
@echo ' [LD] libposj.a'
$(Q)$(AR) rc 'libposj.a' lib/communication.o lib/process.o lib/pubsubd.o
libposj.a.install: libposj.a
@echo ' [IN] $(LIBDIR)/libposj.a'
$(Q)mkdir -p '$(DESTDIR)$(LIBDIR)'
$(Q)install -m0755 libposj.a $(DESTDIR)$(LIBDIR)/libposj.a
libposj.a.clean:
@echo ' [RM] libposj.a'
$(Q)rm -f libposj.a
libposj.a.uninstall:
@echo ' [RM] $(LIBDIR)/libposj.a'
$(Q)rm -f '$(DESTDIR)$(LIBDIR)/libposj.a'
pingpong/pingpong.o: pingpong/pingpong.c pingpong/../lib/communication.h
@echo ' [CC] pingpong/pingpong.o'
$(Q)$(CC) $(CFLAGS) -c pingpong/pingpong.c -o pingpong/pingpong.o
pingpong/pingpong.o.install:
pingpong/pingpong.o.clean:
@echo ' [RM] pingpong/pingpong.o'
$(Q)rm -f pingpong/pingpong.o
pingpong/pingpong.o.uninstall:
pubsub/pubsubd.o: pubsub/pubsubd.c pubsub/../lib/pubsubd.h
@echo ' [CC] pubsub/pubsubd.o'
$(Q)$(CC) $(CFLAGS) -c pubsub/pubsubd.c -o pubsub/pubsubd.o
pubsub/pubsubd.o.install:
pubsub/pubsubd.o.clean:
@echo ' [RM] pubsub/pubsubd.o'
$(Q)rm -f pubsub/pubsubd.o
pubsub/pubsubd.o.uninstall:
pubsub/pubsub-test-send.o: pubsub/pubsub-test-send.c pubsub/../lib/pubsubd.h
@echo ' [CC] pubsub/pubsub-test-send.o'
$(Q)$(CC) $(CFLAGS) -c pubsub/pubsub-test-send.c -o pubsub/pubsub-test-send.o
pubsub/pubsub-test-send.o.install:
pubsub/pubsub-test-send.o.clean:
@echo ' [RM] pubsub/pubsub-test-send.o'
$(Q)rm -f pubsub/pubsub-test-send.o
pubsub/pubsub-test-send.o.uninstall:
lib/communication.o: lib/communication.c lib/communication.h
@echo ' [CC] lib/communication.o'
$(Q)$(CC) $(CFLAGS) -fPIC -c lib/communication.c -fPIC -o lib/communication.o
lib/communication.o.install:
lib/communication.o.clean:
@echo ' [RM] lib/communication.o'
$(Q)rm -f lib/communication.o
lib/communication.o.uninstall:
lib/process.o: lib/process.c lib/process.h
@echo ' [CC] lib/process.o'
$(Q)$(CC) $(CFLAGS) -fPIC -c lib/process.c -fPIC -o lib/process.o
lib/process.o.install:
lib/process.o.clean:
@echo ' [RM] lib/process.o'
$(Q)rm -f lib/process.o
lib/process.o.uninstall:
lib/pubsubd.o: lib/pubsubd.c lib/pubsubd.h
@echo ' [CC] lib/pubsubd.o'
$(Q)$(CC) $(CFLAGS) -fPIC -c lib/pubsubd.c -fPIC -o lib/pubsubd.o
lib/pubsubd.o.install:
lib/pubsubd.o.clean:
@echo ' [RM] lib/pubsubd.o'
$(Q)rm -f lib/pubsubd.o
lib/pubsubd.o.uninstall:
$(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)
install: subdirs.install libposj.install pingpong/pingpong.install pubsub/pubsub.install pubsub/pubsub-test-send.install libposj.so.install libposj.a.install pingpong/pingpong.o.install pubsub/pubsubd.o.install pubsub/pubsub-test-send.o.install lib/communication.o.install lib/process.o.install lib/pubsubd.o.install lib/communication.o.install lib/process.o.install lib/pubsubd.o.install
@:
subdirs.install:
uninstall: subdirs.uninstall libposj.uninstall pingpong/pingpong.uninstall pubsub/pubsub.uninstall pubsub/pubsub-test-send.uninstall libposj.so.uninstall libposj.a.uninstall pingpong/pingpong.o.uninstall pubsub/pubsubd.o.uninstall pubsub/pubsub-test-send.o.uninstall lib/communication.o.uninstall lib/process.o.uninstall lib/pubsubd.o.uninstall lib/communication.o.uninstall lib/process.o.uninstall lib/pubsubd.o.uninstall
@:
subdirs.uninstall:
test: all subdirs subdirs.test
@:
subdirs.test:
clean: libposj.clean pingpong/pingpong.clean pubsub/pubsub.clean pubsub/pubsub-test-send.clean libposj.so.clean libposj.a.clean pingpong/pingpong.o.clean pubsub/pubsubd.o.clean pubsub/pubsub-test-send.o.clean lib/communication.o.clean lib/process.o.clean lib/pubsubd.o.clean lib/communication.o.clean lib/process.o.clean lib/pubsubd.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)/lib/communication.c \
$(PACKAGE)-$(VERSION)/lib/process.c \
$(PACKAGE)-$(VERSION)/lib/pubsubd.c \
$(PACKAGE)-$(VERSION)/pingpong/pingpong.c \
$(PACKAGE)-$(VERSION)/pubsub/pubsub-test-send.c \
$(PACKAGE)-$(VERSION)/pubsub/pubsubd.c \
$(PACKAGE)-$(VERSION)/libposj.a \
$(PACKAGE)-$(VERSION)/lib/communication.h \
$(PACKAGE)-$(VERSION)/lib/process.h \
$(PACKAGE)-$(VERSION)/lib/pubsubd.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)/lib/communication.c \
$(PACKAGE)-$(VERSION)/lib/process.c \
$(PACKAGE)-$(VERSION)/lib/pubsubd.c \
$(PACKAGE)-$(VERSION)/pingpong/pingpong.c \
$(PACKAGE)-$(VERSION)/pubsub/pubsub-test-send.c \
$(PACKAGE)-$(VERSION)/pubsub/pubsubd.c \
$(PACKAGE)-$(VERSION)/libposj.a \
$(PACKAGE)-$(VERSION)/lib/communication.h \
$(PACKAGE)-$(VERSION)/lib/process.h \
$(PACKAGE)-$(VERSION)/lib/pubsubd.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)/lib/communication.c \
$(PACKAGE)-$(VERSION)/lib/process.c \
$(PACKAGE)-$(VERSION)/lib/pubsubd.c \
$(PACKAGE)-$(VERSION)/pingpong/pingpong.c \
$(PACKAGE)-$(VERSION)/pubsub/pubsub-test-send.c \
$(PACKAGE)-$(VERSION)/pubsub/pubsubd.c \
$(PACKAGE)-$(VERSION)/libposj.a \
$(PACKAGE)-$(VERSION)/lib/communication.h \
$(PACKAGE)-$(VERSION)/lib/process.h \
$(PACKAGE)-$(VERSION)/lib/pubsubd.h
help:
@echo ' :: perfect-os-junk-0.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 ''
@echo 'Project targets: '
@echo ' - libposj  library'
@echo ' - pingpong/pingpong binary'
@echo ' - pubsub/pubsub  binary'
@echo ' - pubsub/pubsub-test-send binary'
@echo ''
@echo 'Makefile options:'
@echo ' - gnu: true'
@echo ' - colors: true'
@echo ''
@echo 'Rebuild the Makefile with:'
@echo ' zsh ./build.zsh -c -g'
.PHONY: all subdirs clean distclean dist install uninstall help