mirror of
https://gitlab.com/manzerbredes/ina260-zmq-publisher.git
synced 2025-04-06 03:46:25 +02:00
Minor changes
This commit is contained in:
parent
c84520472c
commit
f89a58860e
8 changed files with 14 additions and 65 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,7 +1,5 @@
|
|||
# Binary
|
||||
/client
|
||||
/publisher
|
||||
/logger
|
||||
/bin
|
||||
|
||||
# Logs
|
||||
/logs
|
26
Makefile
26
Makefile
|
@ -3,27 +3,21 @@ include $(CONF)
|
|||
CC="gcc"
|
||||
CFLAGS=
|
||||
|
||||
all: publisher client logger
|
||||
all: pre-build bin/publisher bin/client bin/logger
|
||||
|
||||
publisher:
|
||||
@echo "---------- Building publisher..."
|
||||
CFLAGS=$(CFLAGS) \
|
||||
$(MAKE) -C src/publisher/ CC=$(CC) OUT=$(PWD) CONF=$(CONF)
|
||||
pre-build:
|
||||
mkdir -p bin/
|
||||
|
||||
client:
|
||||
@echo "---------- Building client..."
|
||||
CFLAGS=$(CFLAGS) \
|
||||
$(MAKE) -C src/client/ CC=$(CC) OUT=$(PWD) CONF=$(CONF)
|
||||
bin/publisher: src/publisher.c
|
||||
$(CC) -lzmq $^ -o $@
|
||||
|
||||
logger:
|
||||
@echo "---------- Building logger..."
|
||||
CFLAGS=$(CFLAGS) \
|
||||
$(MAKE) -C src/logger/ CC=$(CC) OUT=$(PWD) CONF=$(CONF)
|
||||
bin/client: src/client.c
|
||||
$(CC) -lzmq $^ -o $@
|
||||
|
||||
bin/logger: src/logger.c
|
||||
$(CC) $^ -o $@
|
||||
|
||||
clean:
|
||||
$(MAKE) clean -C src/publisher/ OUT=$(PWD)
|
||||
$(MAKE) clean -C src/client/ OUT=$(PWD)
|
||||
$(MAKE) clean -C src/logger/ OUT=$(PWD)
|
||||
rm -rf bin/
|
||||
|
||||
.PHONY: clean publisher client logger
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <time.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../utils.h"
|
||||
#include "utils.h"
|
||||
|
||||
|
||||
int main (int argc, char *argv [])
|
|
@ -1,15 +0,0 @@
|
|||
include $(CONF)
|
||||
EXEC=client
|
||||
CFLAGS+=-lzmq
|
||||
|
||||
DEFINES=\
|
||||
-DPUBLISHER_PORT=$(PUBLISHER_PORT) \
|
||||
-DPUBLISHER_ADDR=$(PUBLISHER_ADDR)
|
||||
|
||||
all: main.c
|
||||
$(CC) $^ -o $(OUT)/$(EXEC) $(CFLAGS) $(DEFINES)
|
||||
|
||||
clean:
|
||||
rm -f $(OUT)/$(EXEC)
|
||||
|
||||
.PHONY: clean
|
|
@ -9,7 +9,7 @@
|
|||
#include <libgen.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include "../utils.h"
|
||||
#include "utils.h"
|
||||
#include <time.h>
|
||||
|
||||
void start(char *power_path, char *busid, char *chipaddr);
|
|
@ -1,13 +0,0 @@
|
|||
include $(CONF)
|
||||
EXEC=logger
|
||||
|
||||
DEFINES=\
|
||||
-DLOGGER_DIR=$(LOGGER_DIR)
|
||||
|
||||
all: main.c
|
||||
$(CC) $^ -o $(OUT)/$(EXEC) $(CFLAGS) $(DEFINES)
|
||||
|
||||
clean:
|
||||
rm -f $(OUT)/$(EXEC)
|
||||
|
||||
.PHONY: clean
|
|
@ -6,7 +6,7 @@
|
|||
#include <assert.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "../utils.h"
|
||||
#include "utils.h"
|
||||
|
||||
int main (void)
|
||||
{
|
|
@ -1,15 +0,0 @@
|
|||
include $(CONF)
|
||||
EXEC=publisher
|
||||
CFLAGS+=-lzmq
|
||||
|
||||
DEFINES=\
|
||||
-DPUBLISHER_PORT=$(PUBLISHER_PORT) \
|
||||
-DPUBLISHER_ADDR=$(PUBLISHER_ADDR)
|
||||
|
||||
all: main.c
|
||||
$(CC) $^ -o $(OUT)/$(EXEC) $(CFLAGS) $(DEFINES)
|
||||
|
||||
clean:
|
||||
rm -f $(OUT)/$(EXEC)
|
||||
|
||||
.PHONY: clean
|
Loading…
Add table
Reference in a new issue