ina260-zmq-publisher/Makefile
2023-07-15 19:45:32 +02:00

27 lines
566 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
./logger $(LOGGERS_DIR) 587 $(LOG_INTERVAL) &
./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