Obsolete
/
libipc-old
Archived
3
0
Fork 0

Makefilez.

more_to_read
Luka Vandervelden 2016-06-10 19:50:11 +02:00
parent 7d3e580d2e
commit 4fdc5acf3a
2 changed files with 140 additions and 181 deletions

288
Makefile
View File

@ -10,12 +10,12 @@ INCLUDEDIR := $(PREFIX)/include
CC := cc CC := cc
AR := ar AR := ar
RANLIB := ranlib RANLIB := ranlib
CFLAGS := -O2 -Wall -Wextra -Wshadow -ansi -pedantic -std=c99 CFLAGS := -O2 -Wall -Wextra -Wshadow -ansi -pedantic -std=c99 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=199309L
LDFLAGS := LDFLAGS :=
Q := @ Q := @
all: libposj init-connection open-read-close-fifo open-write-close-fifo service-test pubsub/pubsubd all: libposj pingpong/pingpong pubsub/pubsub pubsub/pubsub-test-send
libposj: libposj.so libposj.a libposj: libposj.so libposj.a
@: @:
@ -25,94 +25,60 @@ libposj.clean: libposj.so.clean libposj.a.clean
libposj.uninstall: libposj.so.uninstall libposj.a.uninstall libposj.uninstall: libposj.so.uninstall libposj.a.uninstall
init-connection: init-connection.o lib/communication.o libposj.a pingpong/pingpong: pingpong/pingpong.o libposj.a
@echo ' [LD] init-connection' @echo ' [LD] pingpong/pingpong'
$(Q)$(CC) -o init-connection $(LDFLAGS) init-connection.o lib/communication.o libposj.a $(Q)$(CC) -o pingpong/pingpong $(LDFLAGS) pingpong/pingpong.o libposj.a -lpthread
init-connection.install: init-connection pingpong/pingpong.install: pingpong/pingpong
@echo ' [IN] $(BINDIR)/init-connection' @echo ' [IN] $(BINDIR)/pingpong'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)' $(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 init-connection $(DESTDIR)$(BINDIR)/init-connection $(Q)install -m0755 pingpong/pingpong $(DESTDIR)$(BINDIR)/pingpong
init-connection.clean: init-connection.o.clean lib/communication.o.clean pingpong/pingpong.clean: pingpong/pingpong.o.clean
@echo ' [RM] init-connection' @echo ' [RM] pingpong/pingpong'
$(Q)rm -f init-connection $(Q)rm -f pingpong/pingpong
init-connection.uninstall: pingpong/pingpong.uninstall:
@echo ' [RM] $(BINDIR)/init-connection' @echo ' [RM] $(BINDIR)/pingpong'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/init-connection' $(Q)rm -f '$(DESTDIR)$(BINDIR)/pingpong'
open-read-close-fifo: open-read-close-fifo.o lib/communication.o libposj.a pubsub/pubsub: pubsub/pubsubd.o libposj.a
@echo ' [LD] open-read-close-fifo' @echo ' [LD] pubsub/pubsub'
$(Q)$(CC) -o open-read-close-fifo $(LDFLAGS) open-read-close-fifo.o lib/communication.o libposj.a $(Q)$(CC) -o pubsub/pubsub $(LDFLAGS) pubsub/pubsubd.o libposj.a -lpthread
open-read-close-fifo.install: open-read-close-fifo pubsub/pubsub.install: pubsub/pubsub
@echo ' [IN] $(BINDIR)/open-read-close-fifo' @echo ' [IN] $(BINDIR)/pubsub'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)' $(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 open-read-close-fifo $(DESTDIR)$(BINDIR)/open-read-close-fifo $(Q)install -m0755 pubsub/pubsub $(DESTDIR)$(BINDIR)/pubsub
open-read-close-fifo.clean: open-read-close-fifo.o.clean lib/communication.o.clean pubsub/pubsub.clean: pubsub/pubsubd.o.clean
@echo ' [RM] open-read-close-fifo' @echo ' [RM] pubsub/pubsub'
$(Q)rm -f open-read-close-fifo $(Q)rm -f pubsub/pubsub
open-read-close-fifo.uninstall: pubsub/pubsub.uninstall:
@echo ' [RM] $(BINDIR)/open-read-close-fifo' @echo ' [RM] $(BINDIR)/pubsub'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/open-read-close-fifo' $(Q)rm -f '$(DESTDIR)$(BINDIR)/pubsub'
open-write-close-fifo: open-write-close-fifo.o lib/communication.o libposj.a pubsub/pubsub-test-send: pubsub/pubsub-test-send.o libposj.a
@echo ' [LD] open-write-close-fifo' @echo ' [LD] pubsub/pubsub-test-send'
$(Q)$(CC) -o open-write-close-fifo $(LDFLAGS) open-write-close-fifo.o lib/communication.o libposj.a $(Q)$(CC) -o pubsub/pubsub-test-send $(LDFLAGS) pubsub/pubsub-test-send.o libposj.a -lpthread
open-write-close-fifo.install: open-write-close-fifo pubsub/pubsub-test-send.install: pubsub/pubsub-test-send
@echo ' [IN] $(BINDIR)/open-write-close-fifo' @echo ' [IN] $(BINDIR)/pubsub-test-send'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)' $(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 open-write-close-fifo $(DESTDIR)$(BINDIR)/open-write-close-fifo $(Q)install -m0755 pubsub/pubsub-test-send $(DESTDIR)$(BINDIR)/pubsub-test-send
open-write-close-fifo.clean: open-write-close-fifo.o.clean lib/communication.o.clean pubsub/pubsub-test-send.clean: pubsub/pubsub-test-send.o.clean
@echo ' [RM] open-write-close-fifo' @echo ' [RM] pubsub/pubsub-test-send'
$(Q)rm -f open-write-close-fifo $(Q)rm -f pubsub/pubsub-test-send
open-write-close-fifo.uninstall: pubsub/pubsub-test-send.uninstall:
@echo ' [RM] $(BINDIR)/open-write-close-fifo' @echo ' [RM] $(BINDIR)/pubsub-test-send'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/open-write-close-fifo' $(Q)rm -f '$(DESTDIR)$(BINDIR)/pubsub-test-send'
service-test: service-test.o lib/communication.o libposj.a libposj.so: lib/communication.o lib/process.o lib/pubsubd.o
@echo ' [LD] service-test'
$(Q)$(CC) -o service-test $(LDFLAGS) service-test.o lib/communication.o libposj.a
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'
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'
libposj.so: lib/communication.o
@echo ' [LD] libposj.so' @echo ' [LD] libposj.so'
$(Q)$(CC) -o libposj.so -shared $(LDFLAGS) lib/communication.o $(Q)$(CC) -o libposj.so -shared $(LDFLAGS) lib/communication.o lib/process.o lib/pubsubd.o
libposj.so.install: libposj.so libposj.so.install: libposj.so
@echo ' [IN] $(LIBDIR)/libposj.so.0.0.1' @echo ' [IN] $(LIBDIR)/libposj.so.0.0.1'
@ -139,9 +105,9 @@ libposj.so.uninstall:
@echo ' [RM] $(LIBDIR)/libposj.so' @echo ' [RM] $(LIBDIR)/libposj.so'
$(Q)rm -f '$(DESTDIR)$(LIBDIR)/libposj.so' $(Q)rm -f '$(DESTDIR)$(LIBDIR)/libposj.so'
libposj.a: lib/communication.o libposj.a: lib/communication.o lib/process.o lib/pubsubd.o
@echo ' [LD] libposj.a' @echo ' [LD] libposj.a'
$(Q)$(AR) rc 'libposj.a' lib/communication.o $(Q)$(AR) rc 'libposj.a' lib/communication.o lib/process.o lib/pubsubd.o
libposj.a.install: libposj.a libposj.a.install: libposj.a
@echo ' [IN] $(LIBDIR)/libposj.a' @echo ' [IN] $(LIBDIR)/libposj.a'
@ -156,17 +122,41 @@ libposj.a.uninstall:
@echo ' [RM] $(LIBDIR)/libposj.a' @echo ' [RM] $(LIBDIR)/libposj.a'
$(Q)rm -f '$(DESTDIR)$(LIBDIR)/libposj.a' $(Q)rm -f '$(DESTDIR)$(LIBDIR)/libposj.a'
init-connection.o: init-connection.c ./lib/communication.h pingpong/pingpong.o: pingpong/pingpong.c pingpong/../lib/communication.h
@echo ' [CC] init-connection.o' @echo ' [CC] pingpong/pingpong.o'
$(Q)$(CC) $(CFLAGS) -c init-connection.c -o init-connection.o $(Q)$(CC) $(CFLAGS) -c pingpong/pingpong.c -o pingpong/pingpong.o
init-connection.o.install: pingpong/pingpong.o.install:
init-connection.o.clean: pingpong/pingpong.o.clean:
@echo ' [RM] init-connection.o' @echo ' [RM] pingpong/pingpong.o'
$(Q)rm -f init-connection.o $(Q)rm -f pingpong/pingpong.o
init-connection.o.uninstall: 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 lib/communication.o: lib/communication.c lib/communication.h
@echo ' [CC] lib/communication.o' @echo ' [CC] lib/communication.o'
@ -180,65 +170,29 @@ lib/communication.o.clean:
lib/communication.o.uninstall: lib/communication.o.uninstall:
open-read-close-fifo.o: open-read-close-fifo.c lib/process.o: lib/process.c lib/process.h
@echo ' [CC] open-read-close-fifo.o' @echo ' [CC] lib/process.o'
$(Q)$(CC) $(CFLAGS) -c open-read-close-fifo.c -o open-read-close-fifo.o $(Q)$(CC) $(CFLAGS) -fPIC -c lib/process.c -fPIC -o lib/process.o
open-read-close-fifo.o.install: lib/process.o.install:
open-read-close-fifo.o.clean: lib/process.o.clean:
@echo ' [RM] open-read-close-fifo.o' @echo ' [RM] lib/process.o'
$(Q)rm -f open-read-close-fifo.o $(Q)rm -f lib/process.o
open-read-close-fifo.o.uninstall: lib/process.o.uninstall:
open-write-close-fifo.o: open-write-close-fifo.c lib/pubsubd.o: lib/pubsubd.c lib/pubsubd.h
@echo ' [CC] open-write-close-fifo.o' @echo ' [CC] lib/pubsubd.o'
$(Q)$(CC) $(CFLAGS) -c open-write-close-fifo.c -o open-write-close-fifo.o $(Q)$(CC) $(CFLAGS) -fPIC -c lib/pubsubd.c -fPIC -o lib/pubsubd.o
open-write-close-fifo.o.install: lib/pubsubd.o.install:
open-write-close-fifo.o.clean: lib/pubsubd.o.clean:
@echo ' [RM] open-write-close-fifo.o' @echo ' [RM] lib/pubsubd.o'
$(Q)rm -f open-write-close-fifo.o $(Q)rm -f lib/pubsubd.o
open-write-close-fifo.o.uninstall: lib/pubsubd.o.uninstall:
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:
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:
$(DESTDIR)$(PREFIX): $(DESTDIR)$(PREFIX):
@echo ' [DIR] $(PREFIX)' @echo ' [DIR] $(PREFIX)'
@ -255,12 +209,12 @@ $(DESTDIR)$(SHAREDIR):
$(DESTDIR)$(INCLUDEDIR): $(DESTDIR)$(INCLUDEDIR):
@echo ' [DIR] $(INCLUDEDIR)' @echo ' [DIR] $(INCLUDEDIR)'
$(Q)mkdir -p $(DESTDIR)$(INCLUDEDIR) $(Q)mkdir -p $(DESTDIR)$(INCLUDEDIR)
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 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: subdirs.install:
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 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: subdirs.uninstall:
@ -270,7 +224,7 @@ test: all subdirs subdirs.test
subdirs.test: subdirs.test:
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 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 distclean: clean
@ -285,46 +239,46 @@ dist-gz: $(PACKAGE)-$(VERSION).tar.gz
$(PACKAGE)-$(VERSION).tar.gz: distdir $(PACKAGE)-$(VERSION).tar.gz: distdir
@echo ' [TAR] $(PACKAGE)-$(VERSION).tar.gz' @echo ' [TAR] $(PACKAGE)-$(VERSION).tar.gz'
$(Q)tar czf $(PACKAGE)-$(VERSION).tar.gz \ $(Q)tar czf $(PACKAGE)-$(VERSION).tar.gz \
$(PACKAGE)-$(VERSION)/init-connection.c \
$(PACKAGE)-$(VERSION)/pubsub/list.c \
$(PACKAGE)-$(VERSION)/pubsub/pubsubd.c \
$(PACKAGE)-$(VERSION)/service-test.c \
$(PACKAGE)-$(VERSION)/open-write-close-fifo.c \
$(PACKAGE)-$(VERSION)/open-read-close-fifo.c \
$(PACKAGE)-$(VERSION)/lib/communication.c \ $(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)/libposj.a \
$(PACKAGE)-$(VERSION)/pubsub/list.h \ $(PACKAGE)-$(VERSION)/lib/communication.h \
$(PACKAGE)-$(VERSION)/lib/communication.h $(PACKAGE)-$(VERSION)/lib/process.h \
$(PACKAGE)-$(VERSION)/lib/pubsubd.h
dist-xz: $(PACKAGE)-$(VERSION).tar.xz dist-xz: $(PACKAGE)-$(VERSION).tar.xz
$(PACKAGE)-$(VERSION).tar.xz: distdir $(PACKAGE)-$(VERSION).tar.xz: distdir
@echo ' [TAR] $(PACKAGE)-$(VERSION).tar.xz' @echo ' [TAR] $(PACKAGE)-$(VERSION).tar.xz'
$(Q)tar cJf $(PACKAGE)-$(VERSION).tar.xz \ $(Q)tar cJf $(PACKAGE)-$(VERSION).tar.xz \
$(PACKAGE)-$(VERSION)/init-connection.c \
$(PACKAGE)-$(VERSION)/pubsub/list.c \
$(PACKAGE)-$(VERSION)/pubsub/pubsubd.c \
$(PACKAGE)-$(VERSION)/service-test.c \
$(PACKAGE)-$(VERSION)/open-write-close-fifo.c \
$(PACKAGE)-$(VERSION)/open-read-close-fifo.c \
$(PACKAGE)-$(VERSION)/lib/communication.c \ $(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)/libposj.a \
$(PACKAGE)-$(VERSION)/pubsub/list.h \ $(PACKAGE)-$(VERSION)/lib/communication.h \
$(PACKAGE)-$(VERSION)/lib/communication.h $(PACKAGE)-$(VERSION)/lib/process.h \
$(PACKAGE)-$(VERSION)/lib/pubsubd.h
dist-bz2: $(PACKAGE)-$(VERSION).tar.bz2 dist-bz2: $(PACKAGE)-$(VERSION).tar.bz2
$(PACKAGE)-$(VERSION).tar.bz2: distdir $(PACKAGE)-$(VERSION).tar.bz2: distdir
@echo ' [TAR] $(PACKAGE)-$(VERSION).tar.bz2' @echo ' [TAR] $(PACKAGE)-$(VERSION).tar.bz2'
$(Q)tar cjf $(PACKAGE)-$(VERSION).tar.bz2 \ $(Q)tar cjf $(PACKAGE)-$(VERSION).tar.bz2 \
$(PACKAGE)-$(VERSION)/init-connection.c \
$(PACKAGE)-$(VERSION)/pubsub/list.c \
$(PACKAGE)-$(VERSION)/pubsub/pubsubd.c \
$(PACKAGE)-$(VERSION)/service-test.c \
$(PACKAGE)-$(VERSION)/open-write-close-fifo.c \
$(PACKAGE)-$(VERSION)/open-read-close-fifo.c \
$(PACKAGE)-$(VERSION)/lib/communication.c \ $(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)/libposj.a \
$(PACKAGE)-$(VERSION)/pubsub/list.h \ $(PACKAGE)-$(VERSION)/lib/communication.h \
$(PACKAGE)-$(VERSION)/lib/communication.h $(PACKAGE)-$(VERSION)/lib/process.h \
$(PACKAGE)-$(VERSION)/lib/pubsubd.h
help: help:
@echo ' :: perfect-os-junk-0.0.1' @echo ' :: perfect-os-junk-0.0.1'
@ -350,11 +304,9 @@ help:
@echo '' @echo ''
@echo 'Project targets: ' @echo 'Project targets: '
@echo ' - libposj library' @echo ' - libposj library'
@echo ' - init-connectionbinary' @echo ' - pingpong/pingpongbinary'
@echo ' - open-read-close-fifobinary' @echo ' - pubsub/pubsub binary'
@echo ' - open-write-close-fifobinary' @echo ' - pubsub/pubsub-test-sendbinary'
@echo ' - service-test binary'
@echo ' - pubsub/pubsubdbinary'
@echo '' @echo ''
@echo 'Makefile options:' @echo 'Makefile options:'
@echo ' - gnu: true' @echo ' - gnu: true'

View File

@ -2,23 +2,30 @@
package=perfect-os-junk package=perfect-os-junk
version=0.0.1 version=0.0.1
CFLAGS="-O2 -Wall -Wextra -Wshadow -ansi -pedantic -std=c99" CFLAGS="-O2 -Wall -Wextra -Wshadow -ansi -pedantic -std=c99 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=199309L"
targets=(libposj) targets=(libposj)
type[libposj]=library type[libposj]=library
sources[libposj]="$(echo lib/*.c)" sources[libposj]="$(echo lib/*.c)"
for i in *.c; do target="pingpong/pingpong"
targets+=(${i%.c}) targets+=(${target})
sources[${i%.c}]="$i $(echo lib/*.c)" sources[${target}]="$(echo pingpong/*.c)"
type[${i%.c}]=binary type[${target}]=binary
depends[${i%.c}]="libposj.a" depends[${target}]="libposj.a"
ldflags[${i%.c}]="libposj.a" ldflags[${target}]="libposj.a -lpthread"
done
targets+=(pubsub/pubsubd) target="pubsub/pubsub"
type[pubsub/pubsubd]=binary targets+=(${target})
sources[pubsub/pubsubd]="pubsub/list.c pubsub/pubsubd.c" sources[${target}]="$(ls pubsub/*.c | grep -v test-send)"
cflags[pubsub/pubsubd]="-I lib" type[${target}]=binary
ldflags[pubsub/pubsubd]="libposj.a" depends[${target}]="libposj.a"
ldflags[${target}]="libposj.a -lpthread"
target="pubsub/pubsub-test-send"
targets+=(${target})
sources[${target}]="pubsub/pubsub-test-send.c"
type[${target}]=binary
depends[${target}]="libposj.a"
ldflags[${target}]="libposj.a -lpthread"