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

367 lines
14 KiB
Makefile
Raw Normal View History

2016-05-26 20:38:34 +02:00
PACKAGE = 'perfect-os-junk'
VERSION = '0.0.1'
2016-05-26 18:27:59 +02:00
2016-05-26 20:38:34 +02:00
PREFIX := /usr/local
BINDIR := $(PREFIX)/bin
LIBDIR := $(PREFIX)/lib
SHAREDIR := $(PREFIX)/share
INCLUDEDIR := $(PREFIX)/include
2016-05-26 18:27:59 +02:00
2016-05-26 20:38:34 +02:00
CC := cc
AR := ar
RANLIB := ranlib
2016-05-26 21:53:50 +02:00
CFLAGS := -O2 -Wall -Wextra -Wshadow -ansi -pedantic -std=c99
2016-05-26 20:38:34 +02:00
LDFLAGS :=
2016-05-26 18:27:59 +02:00
2016-05-26 20:38:34 +02:00
Q := @
2016-05-26 18:27:59 +02:00
2016-05-28 19:34:23 +02:00
all: libposj init-connection open-read-close-fifo open-write-close-fifo service-test pubsub/pubsubd
2016-05-26 18:27:59 +02:00
2016-05-26 20:38:34 +02:00
libposj: libposj.so libposj.a
@:
libposj.install: libposj.so.install libposj.a.install
2016-05-26 18:27:59 +02:00
2016-05-26 20:38:34 +02:00
libposj.clean: libposj.so.clean libposj.a.clean
2016-05-26 18:27:59 +02:00
2016-05-26 20:38:34 +02:00
libposj.uninstall: libposj.so.uninstall libposj.a.uninstall
2016-05-28 05:20:03 +02:00
init-connection: init-connection.o lib/communication.o libposj.a
2016-05-26 20:38:34 +02:00
@echo ' [LD] init-connection'
2016-05-28 05:20:03 +02:00
$(Q)$(CC) -o init-connection $(LDFLAGS) init-connection.o lib/communication.o libposj.a
2016-05-26 20:38:34 +02:00
init-connection.install: init-connection
@echo ' [IN] $(BINDIR)/init-connection'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 init-connection $(DESTDIR)$(BINDIR)/init-connection
init-connection.clean: init-connection.o.clean lib/communication.o.clean
@echo ' [RM] init-connection'
$(Q)rm -f init-connection
init-connection.uninstall:
@echo ' [RM] $(BINDIR)/init-connection'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/init-connection'
2016-05-28 05:20:03 +02:00
open-read-close-fifo: open-read-close-fifo.o lib/communication.o libposj.a
@echo ' [LD] open-read-close-fifo'
$(Q)$(CC) -o open-read-close-fifo $(LDFLAGS) open-read-close-fifo.o lib/communication.o libposj.a
open-read-close-fifo.install: open-read-close-fifo
@echo ' [IN] $(BINDIR)/open-read-close-fifo'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 open-read-close-fifo $(DESTDIR)$(BINDIR)/open-read-close-fifo
open-read-close-fifo.clean: open-read-close-fifo.o.clean lib/communication.o.clean
@echo ' [RM] open-read-close-fifo'
$(Q)rm -f open-read-close-fifo
open-read-close-fifo.uninstall:
@echo ' [RM] $(BINDIR)/open-read-close-fifo'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/open-read-close-fifo'
open-write-close-fifo: open-write-close-fifo.o lib/communication.o libposj.a
@echo ' [LD] open-write-close-fifo'
$(Q)$(CC) -o open-write-close-fifo $(LDFLAGS) open-write-close-fifo.o lib/communication.o libposj.a
open-write-close-fifo.install: open-write-close-fifo
@echo ' [IN] $(BINDIR)/open-write-close-fifo'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 open-write-close-fifo $(DESTDIR)$(BINDIR)/open-write-close-fifo
open-write-close-fifo.clean: open-write-close-fifo.o.clean lib/communication.o.clean
@echo ' [RM] open-write-close-fifo'
$(Q)rm -f open-write-close-fifo
open-write-close-fifo.uninstall:
@echo ' [RM] $(BINDIR)/open-write-close-fifo'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/open-write-close-fifo'
service-test: service-test.o lib/communication.o libposj.a
2016-05-26 20:38:34 +02:00
@echo ' [LD] service-test'
2016-05-28 05:20:03 +02:00
$(Q)$(CC) -o service-test $(LDFLAGS) service-test.o lib/communication.o libposj.a
2016-05-26 20:38:34 +02:00
service-test.install: service-test
@echo ' [IN] $(BINDIR)/service-test'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 service-test $(DESTDIR)$(BINDIR)/service-test
service-test.clean: service-test.o.clean lib/communication.o.clean
@echo ' [RM] service-test'
$(Q)rm -f service-test
service-test.uninstall:
@echo ' [RM] $(BINDIR)/service-test'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/service-test'
2016-05-28 19:34:23 +02:00
pubsub/pubsubd: pubsub/list.o pubsub/pubsubd.o
@echo ' [LD] pubsub/pubsubd'
$(Q)$(CC) -o pubsub/pubsubd $(LDFLAGS) pubsub/list.o pubsub/pubsubd.o libposj.a
pubsub/pubsubd.install: pubsub/pubsubd
@echo ' [IN] $(BINDIR)/pubsubd'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 pubsub/pubsubd $(DESTDIR)$(BINDIR)/pubsubd
pubsub/pubsubd.clean: pubsub/list.o.clean pubsub/pubsubd.o.clean
@echo ' [RM] pubsub/pubsubd'
$(Q)rm -f pubsub/pubsubd
pubsub/pubsubd.uninstall:
@echo ' [RM] $(BINDIR)/pubsubd'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/pubsubd'
2016-05-26 20:38:34 +02:00
libposj.so: lib/communication.o
@echo ' [LD] libposj.so'
$(Q)$(CC) -o libposj.so -shared $(LDFLAGS) lib/communication.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
@echo ' [LD] libposj.a'
$(Q)$(AR) rc 'libposj.a' lib/communication.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'
init-connection.o: init-connection.c ./lib/communication.h
@echo ' [CC] init-connection.o'
$(Q)$(CC) $(CFLAGS) -c init-connection.c -o init-connection.o
init-connection.o.install:
init-connection.o.clean:
@echo ' [RM] init-connection.o'
$(Q)rm -f init-connection.o
init-connection.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:
2016-05-28 05:20:03 +02:00
open-read-close-fifo.o: open-read-close-fifo.c
@echo ' [CC] open-read-close-fifo.o'
$(Q)$(CC) $(CFLAGS) -c open-read-close-fifo.c -o open-read-close-fifo.o
open-read-close-fifo.o.install:
open-read-close-fifo.o.clean:
@echo ' [RM] open-read-close-fifo.o'
$(Q)rm -f open-read-close-fifo.o
open-read-close-fifo.o.uninstall:
open-write-close-fifo.o: open-write-close-fifo.c
@echo ' [CC] open-write-close-fifo.o'
$(Q)$(CC) $(CFLAGS) -c open-write-close-fifo.c -o open-write-close-fifo.o
open-write-close-fifo.o.install:
open-write-close-fifo.o.clean:
@echo ' [RM] open-write-close-fifo.o'
$(Q)rm -f open-write-close-fifo.o
open-write-close-fifo.o.uninstall:
2016-05-26 20:38:34 +02:00
service-test.o: service-test.c ./lib/communication.h
@echo ' [CC] service-test.o'
$(Q)$(CC) $(CFLAGS) -c service-test.c -o service-test.o
service-test.o.install:
service-test.o.clean:
@echo ' [RM] service-test.o'
$(Q)rm -f service-test.o
service-test.o.uninstall:
2016-05-28 19:34:23 +02:00
pubsub/list.o: pubsub/list.c pubsub/list.h
@echo ' [CC] pubsub/list.o'
$(Q)$(CC) $(CFLAGS) -I lib -c pubsub/list.c -I lib -o pubsub/list.o
pubsub/list.o.install:
pubsub/list.o.clean:
@echo ' [RM] pubsub/list.o'
$(Q)rm -f pubsub/list.o
pubsub/list.o.uninstall:
pubsub/pubsubd.o: pubsub/pubsubd.c
@echo ' [CC] pubsub/pubsubd.o'
$(Q)$(CC) $(CFLAGS) -I lib -c pubsub/pubsubd.c -I lib -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:
2016-05-26 20:38:34 +02:00
$(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)
2016-05-28 19:34:23 +02:00
install: subdirs.install libposj.install init-connection.install open-read-close-fifo.install open-write-close-fifo.install service-test.install pubsub/pubsubd.install libposj.so.install libposj.a.install init-connection.o.install lib/communication.o.install open-read-close-fifo.o.install lib/communication.o.install open-write-close-fifo.o.install lib/communication.o.install service-test.o.install lib/communication.o.install pubsub/list.o.install pubsub/pubsubd.o.install lib/communication.o.install lib/communication.o.install
2016-05-26 20:38:34 +02:00
@:
subdirs.install:
2016-05-28 19:34:23 +02:00
uninstall: subdirs.uninstall libposj.uninstall init-connection.uninstall open-read-close-fifo.uninstall open-write-close-fifo.uninstall service-test.uninstall pubsub/pubsubd.uninstall libposj.so.uninstall libposj.a.uninstall init-connection.o.uninstall lib/communication.o.uninstall open-read-close-fifo.o.uninstall lib/communication.o.uninstall open-write-close-fifo.o.uninstall lib/communication.o.uninstall service-test.o.uninstall lib/communication.o.uninstall pubsub/list.o.uninstall pubsub/pubsubd.o.uninstall lib/communication.o.uninstall lib/communication.o.uninstall
2016-05-26 20:38:34 +02:00
@:
subdirs.uninstall:
test: all subdirs subdirs.test
@:
subdirs.test:
2016-05-28 19:34:23 +02:00
clean: libposj.clean init-connection.clean open-read-close-fifo.clean open-write-close-fifo.clean service-test.clean pubsub/pubsubd.clean libposj.so.clean libposj.a.clean init-connection.o.clean lib/communication.o.clean open-read-close-fifo.o.clean lib/communication.o.clean open-write-close-fifo.o.clean lib/communication.o.clean service-test.o.clean lib/communication.o.clean pubsub/list.o.clean pubsub/pubsubd.o.clean lib/communication.o.clean lib/communication.o.clean
2016-05-26 20:38:34 +02: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)/init-connection.c \
2016-05-28 19:34:23 +02:00
$(PACKAGE)-$(VERSION)/pubsub/list.c \
$(PACKAGE)-$(VERSION)/pubsub/pubsubd.c \
2016-05-26 20:38:34 +02:00
$(PACKAGE)-$(VERSION)/service-test.c \
2016-05-28 05:20:03 +02:00
$(PACKAGE)-$(VERSION)/open-write-close-fifo.c \
$(PACKAGE)-$(VERSION)/open-read-close-fifo.c \
2016-05-26 20:38:34 +02:00
$(PACKAGE)-$(VERSION)/lib/communication.c \
2016-05-28 05:20:03 +02:00
$(PACKAGE)-$(VERSION)/libposj.a \
2016-05-28 19:34:23 +02:00
$(PACKAGE)-$(VERSION)/pubsub/list.h \
2016-05-26 20:38:34 +02:00
$(PACKAGE)-$(VERSION)/lib/communication.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)/init-connection.c \
2016-05-28 19:34:23 +02:00
$(PACKAGE)-$(VERSION)/pubsub/list.c \
$(PACKAGE)-$(VERSION)/pubsub/pubsubd.c \
2016-05-26 20:38:34 +02:00
$(PACKAGE)-$(VERSION)/service-test.c \
2016-05-28 05:20:03 +02:00
$(PACKAGE)-$(VERSION)/open-write-close-fifo.c \
$(PACKAGE)-$(VERSION)/open-read-close-fifo.c \
2016-05-26 20:38:34 +02:00
$(PACKAGE)-$(VERSION)/lib/communication.c \
2016-05-28 05:20:03 +02:00
$(PACKAGE)-$(VERSION)/libposj.a \
2016-05-28 19:34:23 +02:00
$(PACKAGE)-$(VERSION)/pubsub/list.h \
2016-05-26 20:38:34 +02:00
$(PACKAGE)-$(VERSION)/lib/communication.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)/init-connection.c \
2016-05-28 19:34:23 +02:00
$(PACKAGE)-$(VERSION)/pubsub/list.c \
$(PACKAGE)-$(VERSION)/pubsub/pubsubd.c \
2016-05-26 20:38:34 +02:00
$(PACKAGE)-$(VERSION)/service-test.c \
2016-05-28 05:20:03 +02:00
$(PACKAGE)-$(VERSION)/open-write-close-fifo.c \
$(PACKAGE)-$(VERSION)/open-read-close-fifo.c \
2016-05-26 20:38:34 +02:00
$(PACKAGE)-$(VERSION)/lib/communication.c \
2016-05-28 05:20:03 +02:00
$(PACKAGE)-$(VERSION)/libposj.a \
2016-05-28 19:34:23 +02:00
$(PACKAGE)-$(VERSION)/pubsub/list.h \
2016-05-26 20:38:34 +02:00
$(PACKAGE)-$(VERSION)/lib/communication.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 ' - init-connectionbinary'
2016-05-28 05:20:03 +02:00
@echo ' - open-read-close-fifobinary'
@echo ' - open-write-close-fifobinary'
2016-05-26 20:38:34 +02:00
@echo ' - service-test binary'
2016-05-28 19:34:23 +02:00
@echo ' - pubsub/pubsubdbinary'
2016-05-26 20:38:34 +02:00
@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
2016-05-26 18:27:59 +02:00