mirror of
https://gitlab.com/manzerbredes/ina260-zmq-publisher.git
synced 2025-04-06 03:46:25 +02:00
28 lines
617 B
Makefile
28 lines
617 B
Makefile
CONF=$(PWD)/config.mk
|
|
include $(CONF)
|
|
CC="gcc"
|
|
CFLAGS=
|
|
|
|
all: publisher subscriber logger
|
|
|
|
publisher: src/publisher.c src/utils.c
|
|
$(CC) -lzmq $^ -o $@
|
|
|
|
subscriber: src/subscriber.c src/utils.c
|
|
$(CC) -lzmq $^ -o $@
|
|
|
|
logger: src/logger.c src/utils.c
|
|
$(CC) $^ -o $@
|
|
|
|
publish: publisher logger
|
|
rm -f pid
|
|
./logger $(LOGGERS_DIR) 587 $(LOG_INTERVAL) &> $(LOGGERS_DIR)/587.log & echo $$! >> pid
|
|
./publisher $(LOGGERS_DIR) $(LOG_INTERVAL) $(SUBSCRIBER_ADDR) $(ZMQ_PORT) $(KEY)
|
|
|
|
subscribe: subscriber
|
|
./subscriber $(ZMQ_PORT) $(SUBSCRIBER_DIR)
|
|
|
|
clean:
|
|
rm -f logger subscriber publisher
|
|
|
|
.PHONY: clean publish subscribe
|