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/tests/Makefile

440 lines
21 KiB
Makefile
Raw Normal View History

PACKAGE = 'ipc-tests'
VERSION = '0.5.0'
PREFIX := /usr/local
BINDIR := $(PREFIX)/bin
LIBDIR := $(PREFIX)/lib
SHAREDIR := $(PREFIX)/share
INCLUDEDIR := $(PREFIX)/include
MANDIR := $(SHAREDIR)/man
CC := cc
AR := ar
RANLIB := ranlib
CFLAGS := -Wall -Wextra -g
LDFLAGS := -I../src -L../ ../src/ipc.h -lipc
Q := @
all: func_01_connection_establishment func_01_connection_establishmentd func_02_pong func_02_pongd func_03_multiple-communications-client func_03_multiple-communications-server func_04_empty_message unit_01_service-path unit_02_usock-remove unit_03_connection-add-remove
@:
func_01_connection_establishment: func_01_connection_establishment.o
@echo ' LD > func_01_connection_establishment'
$(Q)$(CC) -o func_01_connection_establishment func_01_connection_establishment.o $(LDFLAGS)
func_01_connection_establishment.install: func_01_connection_establishment
@echo ' IN > $(BINDIR)/func_01_connection_establishment'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 func_01_connection_establishment $(DESTDIR)$(BINDIR)/func_01_connection_establishment
func_01_connection_establishment.clean: func_01_connection_establishment.o.clean
@echo ' RM > func_01_connection_establishment'
$(Q)rm -f func_01_connection_establishment
func_01_connection_establishment.uninstall:
@echo ' RM > $(BINDIR)/func_01_connection_establishment'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/func_01_connection_establishment'
func_01_connection_establishmentd: func_01_connection_establishmentd.o
@echo ' LD > func_01_connection_establishmentd'
$(Q)$(CC) -o func_01_connection_establishmentd func_01_connection_establishmentd.o $(LDFLAGS)
func_01_connection_establishmentd.install: func_01_connection_establishmentd
@echo ' IN > $(BINDIR)/func_01_connection_establishmentd'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 func_01_connection_establishmentd $(DESTDIR)$(BINDIR)/func_01_connection_establishmentd
func_01_connection_establishmentd.clean: func_01_connection_establishmentd.o.clean
@echo ' RM > func_01_connection_establishmentd'
$(Q)rm -f func_01_connection_establishmentd
func_01_connection_establishmentd.uninstall:
@echo ' RM > $(BINDIR)/func_01_connection_establishmentd'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/func_01_connection_establishmentd'
func_02_pong: func_02_pong.o
@echo ' LD > func_02_pong'
$(Q)$(CC) -o func_02_pong func_02_pong.o $(LDFLAGS)
func_02_pong.install: func_02_pong
@echo ' IN > $(BINDIR)/func_02_pong'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 func_02_pong $(DESTDIR)$(BINDIR)/func_02_pong
func_02_pong.clean: func_02_pong.o.clean
@echo ' RM > func_02_pong'
$(Q)rm -f func_02_pong
func_02_pong.uninstall:
@echo ' RM > $(BINDIR)/func_02_pong'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/func_02_pong'
func_02_pongd: func_02_pongd.o
@echo ' LD > func_02_pongd'
$(Q)$(CC) -o func_02_pongd func_02_pongd.o $(LDFLAGS)
func_02_pongd.install: func_02_pongd
@echo ' IN > $(BINDIR)/func_02_pongd'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 func_02_pongd $(DESTDIR)$(BINDIR)/func_02_pongd
func_02_pongd.clean: func_02_pongd.o.clean
@echo ' RM > func_02_pongd'
$(Q)rm -f func_02_pongd
func_02_pongd.uninstall:
@echo ' RM > $(BINDIR)/func_02_pongd'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/func_02_pongd'
func_03_multiple-communications-client: func_03_multiple-communications-client.o
@echo ' LD > func_03_multiple-communications-client'
$(Q)$(CC) -o func_03_multiple-communications-client func_03_multiple-communications-client.o $(LDFLAGS)
func_03_multiple-communications-client.install: func_03_multiple-communications-client
@echo ' IN > $(BINDIR)/func_03_multiple-communications-client'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 func_03_multiple-communications-client $(DESTDIR)$(BINDIR)/func_03_multiple-communications-client
func_03_multiple-communications-client.clean: func_03_multiple-communications-client.o.clean
@echo ' RM > func_03_multiple-communications-client'
$(Q)rm -f func_03_multiple-communications-client
func_03_multiple-communications-client.uninstall:
@echo ' RM > $(BINDIR)/func_03_multiple-communications-client'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/func_03_multiple-communications-client'
func_03_multiple-communications-server: func_03_multiple-communications-server.o
@echo ' LD > func_03_multiple-communications-server'
$(Q)$(CC) -o func_03_multiple-communications-server func_03_multiple-communications-server.o $(LDFLAGS)
func_03_multiple-communications-server.install: func_03_multiple-communications-server
@echo ' IN > $(BINDIR)/func_03_multiple-communications-server'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 func_03_multiple-communications-server $(DESTDIR)$(BINDIR)/func_03_multiple-communications-server
func_03_multiple-communications-server.clean: func_03_multiple-communications-server.o.clean
@echo ' RM > func_03_multiple-communications-server'
$(Q)rm -f func_03_multiple-communications-server
func_03_multiple-communications-server.uninstall:
@echo ' RM > $(BINDIR)/func_03_multiple-communications-server'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/func_03_multiple-communications-server'
func_04_empty_message: func_04_empty_message.o
@echo ' LD > func_04_empty_message'
$(Q)$(CC) -o func_04_empty_message func_04_empty_message.o $(LDFLAGS)
func_04_empty_message.install: func_04_empty_message
@echo ' IN > $(BINDIR)/func_04_empty_message'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 func_04_empty_message $(DESTDIR)$(BINDIR)/func_04_empty_message
func_04_empty_message.clean: func_04_empty_message.o.clean
@echo ' RM > func_04_empty_message'
$(Q)rm -f func_04_empty_message
func_04_empty_message.uninstall:
@echo ' RM > $(BINDIR)/func_04_empty_message'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/func_04_empty_message'
unit_01_service-path: unit_01_service-path.o
@echo ' LD > unit_01_service-path'
$(Q)$(CC) -o unit_01_service-path unit_01_service-path.o $(LDFLAGS)
unit_01_service-path.install: unit_01_service-path
@echo ' IN > $(BINDIR)/unit_01_service-path'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 unit_01_service-path $(DESTDIR)$(BINDIR)/unit_01_service-path
unit_01_service-path.clean: unit_01_service-path.o.clean
@echo ' RM > unit_01_service-path'
$(Q)rm -f unit_01_service-path
unit_01_service-path.uninstall:
@echo ' RM > $(BINDIR)/unit_01_service-path'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/unit_01_service-path'
unit_02_usock-remove: unit_02_usock-remove.o
@echo ' LD > unit_02_usock-remove'
$(Q)$(CC) -o unit_02_usock-remove unit_02_usock-remove.o $(LDFLAGS)
unit_02_usock-remove.install: unit_02_usock-remove
@echo ' IN > $(BINDIR)/unit_02_usock-remove'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 unit_02_usock-remove $(DESTDIR)$(BINDIR)/unit_02_usock-remove
unit_02_usock-remove.clean: unit_02_usock-remove.o.clean
@echo ' RM > unit_02_usock-remove'
$(Q)rm -f unit_02_usock-remove
unit_02_usock-remove.uninstall:
@echo ' RM > $(BINDIR)/unit_02_usock-remove'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/unit_02_usock-remove'
unit_03_connection-add-remove: unit_03_connection-add-remove.o
@echo ' LD > unit_03_connection-add-remove'
$(Q)$(CC) -o unit_03_connection-add-remove unit_03_connection-add-remove.o $(LDFLAGS)
unit_03_connection-add-remove.install: unit_03_connection-add-remove
@echo ' IN > $(BINDIR)/unit_03_connection-add-remove'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 unit_03_connection-add-remove $(DESTDIR)$(BINDIR)/unit_03_connection-add-remove
unit_03_connection-add-remove.clean: unit_03_connection-add-remove.o.clean
@echo ' RM > unit_03_connection-add-remove'
$(Q)rm -f unit_03_connection-add-remove
unit_03_connection-add-remove.uninstall:
@echo ' RM > $(BINDIR)/unit_03_connection-add-remove'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/unit_03_connection-add-remove'
func_01_connection_establishment.o: func_01_connection_establishment.c ./../src/ipc.h
@echo ' CC > func_01_connection_establishment.o'
$(Q)$(CC) $(CFLAGS) -std=c11 -c func_01_connection_establishment.c -std=c11 -o func_01_connection_establishment.o
func_01_connection_establishment.o.install:
func_01_connection_establishment.o.clean:
@echo ' RM > func_01_connection_establishment.o'
$(Q)rm -f func_01_connection_establishment.o
func_01_connection_establishment.o.uninstall:
func_01_connection_establishmentd.o: func_01_connection_establishmentd.c ./../src/ipc.h
@echo ' CC > func_01_connection_establishmentd.o'
$(Q)$(CC) $(CFLAGS) -std=c11 -c func_01_connection_establishmentd.c -std=c11 -o func_01_connection_establishmentd.o
func_01_connection_establishmentd.o.install:
func_01_connection_establishmentd.o.clean:
@echo ' RM > func_01_connection_establishmentd.o'
$(Q)rm -f func_01_connection_establishmentd.o
func_01_connection_establishmentd.o.uninstall:
func_02_pong.o: func_02_pong.c ./../src/ipc.h
@echo ' CC > func_02_pong.o'
$(Q)$(CC) $(CFLAGS) -std=c11 -c func_02_pong.c -std=c11 -o func_02_pong.o
func_02_pong.o.install:
func_02_pong.o.clean:
@echo ' RM > func_02_pong.o'
$(Q)rm -f func_02_pong.o
func_02_pong.o.uninstall:
func_02_pongd.o: func_02_pongd.c ./../src/ipc.h
@echo ' CC > func_02_pongd.o'
$(Q)$(CC) $(CFLAGS) -std=c11 -c func_02_pongd.c -std=c11 -o func_02_pongd.o
func_02_pongd.o.install:
func_02_pongd.o.clean:
@echo ' RM > func_02_pongd.o'
$(Q)rm -f func_02_pongd.o
func_02_pongd.o.uninstall:
func_03_multiple-communications-client.o: func_03_multiple-communications-client.c ./../src/ipc.h
@echo ' CC > func_03_multiple-communications-client.o'
$(Q)$(CC) $(CFLAGS) -std=c11 -c func_03_multiple-communications-client.c -std=c11 -o func_03_multiple-communications-client.o
func_03_multiple-communications-client.o.install:
func_03_multiple-communications-client.o.clean:
@echo ' RM > func_03_multiple-communications-client.o'
$(Q)rm -f func_03_multiple-communications-client.o
func_03_multiple-communications-client.o.uninstall:
func_03_multiple-communications-server.o: func_03_multiple-communications-server.c ./../src/ipc.h
@echo ' CC > func_03_multiple-communications-server.o'
$(Q)$(CC) $(CFLAGS) -std=c11 -c func_03_multiple-communications-server.c -std=c11 -o func_03_multiple-communications-server.o
func_03_multiple-communications-server.o.install:
func_03_multiple-communications-server.o.clean:
@echo ' RM > func_03_multiple-communications-server.o'
$(Q)rm -f func_03_multiple-communications-server.o
func_03_multiple-communications-server.o.uninstall:
func_04_empty_message.o: func_04_empty_message.c ./../src/ipc.h
@echo ' CC > func_04_empty_message.o'
$(Q)$(CC) $(CFLAGS) -std=c11 -c func_04_empty_message.c -std=c11 -o func_04_empty_message.o
func_04_empty_message.o.install:
func_04_empty_message.o.clean:
@echo ' RM > func_04_empty_message.o'
$(Q)rm -f func_04_empty_message.o
func_04_empty_message.o.uninstall:
unit_01_service-path.o: unit_01_service-path.c ./../src/ipc.h
@echo ' CC > unit_01_service-path.o'
$(Q)$(CC) $(CFLAGS) -std=c11 -c unit_01_service-path.c -std=c11 -o unit_01_service-path.o
unit_01_service-path.o.install:
unit_01_service-path.o.clean:
@echo ' RM > unit_01_service-path.o'
$(Q)rm -f unit_01_service-path.o
unit_01_service-path.o.uninstall:
unit_02_usock-remove.o: unit_02_usock-remove.c ./../src/ipc.h ./../src/usocket.h
@echo ' CC > unit_02_usock-remove.o'
$(Q)$(CC) $(CFLAGS) -std=c11 -c unit_02_usock-remove.c -std=c11 -o unit_02_usock-remove.o
unit_02_usock-remove.o.install:
unit_02_usock-remove.o.clean:
@echo ' RM > unit_02_usock-remove.o'
$(Q)rm -f unit_02_usock-remove.o
unit_02_usock-remove.o.uninstall:
unit_03_connection-add-remove.o: unit_03_connection-add-remove.c ./../src/ipc.h
@echo ' CC > unit_03_connection-add-remove.o'
$(Q)$(CC) $(CFLAGS) -std=c11 -c unit_03_connection-add-remove.c -std=c11 -o unit_03_connection-add-remove.o
unit_03_connection-add-remove.o.install:
unit_03_connection-add-remove.o.clean:
@echo ' RM > unit_03_connection-add-remove.o'
$(Q)rm -f unit_03_connection-add-remove.o
unit_03_connection-add-remove.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)
$(DESTDIR)$(MANDIR):
@echo ' DIR > $(MANDIR)'
$(Q)mkdir -p $(DESTDIR)$(MANDIR)
install: subdirs.install func_01_connection_establishment.install func_01_connection_establishmentd.install func_02_pong.install func_02_pongd.install func_03_multiple-communications-client.install func_03_multiple-communications-server.install func_04_empty_message.install unit_01_service-path.install unit_02_usock-remove.install unit_03_connection-add-remove.install func_01_connection_establishment.o.install func_01_connection_establishmentd.o.install func_02_pong.o.install func_02_pongd.o.install func_03_multiple-communications-client.o.install func_03_multiple-communications-server.o.install func_04_empty_message.o.install unit_01_service-path.o.install unit_02_usock-remove.o.install unit_03_connection-add-remove.o.install
@:
subdirs.install:
uninstall: subdirs.uninstall func_01_connection_establishment.uninstall func_01_connection_establishmentd.uninstall func_02_pong.uninstall func_02_pongd.uninstall func_03_multiple-communications-client.uninstall func_03_multiple-communications-server.uninstall func_04_empty_message.uninstall unit_01_service-path.uninstall unit_02_usock-remove.uninstall unit_03_connection-add-remove.uninstall func_01_connection_establishment.o.uninstall func_01_connection_establishmentd.o.uninstall func_02_pong.o.uninstall func_02_pongd.o.uninstall func_03_multiple-communications-client.o.uninstall func_03_multiple-communications-server.o.uninstall func_04_empty_message.o.uninstall unit_01_service-path.o.uninstall unit_02_usock-remove.o.uninstall unit_03_connection-add-remove.o.uninstall
@:
subdirs.uninstall:
test: all subdirs subdirs.test
@:
subdirs.test:
clean: func_01_connection_establishment.clean func_01_connection_establishmentd.clean func_02_pong.clean func_02_pongd.clean func_03_multiple-communications-client.clean func_03_multiple-communications-server.clean func_04_empty_message.clean unit_01_service-path.clean unit_02_usock-remove.clean unit_03_connection-add-remove.clean func_01_connection_establishment.o.clean func_01_connection_establishmentd.o.clean func_02_pong.o.clean func_02_pongd.o.clean func_03_multiple-communications-client.o.clean func_03_multiple-communications-server.o.clean func_04_empty_message.o.clean unit_01_service-path.o.clean unit_02_usock-remove.o.clean unit_03_connection-add-remove.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)/Makefile \
$(PACKAGE)-$(VERSION)/project.zsh \
$(PACKAGE)-$(VERSION)/unit_01_service-path.c \
$(PACKAGE)-$(VERSION)/func_02_pong.c \
$(PACKAGE)-$(VERSION)/func_02_pongd.c \
$(PACKAGE)-$(VERSION)/func_04_empty_message.c \
$(PACKAGE)-$(VERSION)/func_01_connection_establishment.c \
$(PACKAGE)-$(VERSION)/func_03_multiple-communications-server.c \
$(PACKAGE)-$(VERSION)/unit_03_connection-add-remove.c \
$(PACKAGE)-$(VERSION)/func_03_multiple-communications-client.c \
$(PACKAGE)-$(VERSION)/unit_02_usock-remove.c \
$(PACKAGE)-$(VERSION)/func_01_connection_establishmentd.c
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)/Makefile \
$(PACKAGE)-$(VERSION)/project.zsh \
$(PACKAGE)-$(VERSION)/unit_01_service-path.c \
$(PACKAGE)-$(VERSION)/func_02_pong.c \
$(PACKAGE)-$(VERSION)/func_02_pongd.c \
$(PACKAGE)-$(VERSION)/func_04_empty_message.c \
$(PACKAGE)-$(VERSION)/func_01_connection_establishment.c \
$(PACKAGE)-$(VERSION)/func_03_multiple-communications-server.c \
$(PACKAGE)-$(VERSION)/unit_03_connection-add-remove.c \
$(PACKAGE)-$(VERSION)/func_03_multiple-communications-client.c \
$(PACKAGE)-$(VERSION)/unit_02_usock-remove.c \
$(PACKAGE)-$(VERSION)/func_01_connection_establishmentd.c
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)/Makefile \
$(PACKAGE)-$(VERSION)/project.zsh \
$(PACKAGE)-$(VERSION)/unit_01_service-path.c \
$(PACKAGE)-$(VERSION)/func_02_pong.c \
$(PACKAGE)-$(VERSION)/func_02_pongd.c \
$(PACKAGE)-$(VERSION)/func_04_empty_message.c \
$(PACKAGE)-$(VERSION)/func_01_connection_establishment.c \
$(PACKAGE)-$(VERSION)/func_03_multiple-communications-server.c \
$(PACKAGE)-$(VERSION)/unit_03_connection-add-remove.c \
$(PACKAGE)-$(VERSION)/func_03_multiple-communications-client.c \
$(PACKAGE)-$(VERSION)/unit_02_usock-remove.c \
$(PACKAGE)-$(VERSION)/func_01_connection_establishmentd.c
help:
@echo ' :: ipc-tests-0.5.0'
@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 ' - MANDIR  ${MANDIR}'
@echo ''
@echo 'Project targets: '
@echo ' - func_01_connection_establishment binary'
@echo ' - func_01_connection_establishmentd binary'
@echo ' - func_02_pong  binary'
@echo ' - func_02_pongd  binary'
@echo ' - func_03_multiple-communications-client binary'
@echo ' - func_03_multiple-communications-server binary'
@echo ' - func_04_empty_message binary'
@echo ' - unit_01_service-path binary'
@echo ' - unit_02_usock-remove binary'
@echo ' - unit_03_connection-add-remove binary'
@echo ''
@echo 'Makefile options:'
@echo ' - gnu: false'
@echo ' - colors: true'
@echo ''
@echo 'Rebuild the Makefile with:'
@echo ' zsh ./build.zsh -c'
.PHONY: all subdirs clean distclean dist install uninstall help