This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues/pull-requests.
2016-09-16 00:09:04 +02:00
|
|
|
CC=gcc
|
|
|
|
CFLAGS=-Wall -g
|
|
|
|
LDFLAGS= -pthread
|
|
|
|
CFILES=$(wildcard *.c) # CFILES => recompiles everything on a C file change
|
|
|
|
EXEC=$(basename $(wildcard *.c))
|
2016-11-03 22:44:35 +01:00
|
|
|
SOURCES=$(wildcard ../lib/communication.c ../lib/process.c)
|
2016-09-16 00:09:04 +02:00
|
|
|
OBJECTS=$(SOURCES:.c=.o)
|
|
|
|
TESTS=$(addsuffix .test, $(EXEC))
|
2016-11-04 16:51:17 +01:00
|
|
|
LCBOR=-lbor
|
2016-09-16 00:09:04 +02:00
|
|
|
|
2016-09-19 17:09:45 +02:00
|
|
|
all: $(SOURCES) $(EXEC)
|
2016-09-16 00:09:04 +02:00
|
|
|
|
|
|
|
$(EXEC): $(OBJECTS) $(CFILES)
|
2016-11-04 16:51:17 +01:00
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $@.c -o $@.bin
|
2016-09-16 00:09:04 +02:00
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) -c $(CFLAGS) $< -o $@
|
|
|
|
|
2016-10-14 17:47:08 +02:00
|
|
|
$(TESTS):
|
|
|
|
valgrind --show-leak-kinds=all --leak-check=full -v --track-origins=yes ./$(basename $@).bin
|
|
|
|
|
2016-09-16 00:09:04 +02:00
|
|
|
clean:
|
2016-09-19 17:09:45 +02:00
|
|
|
@-rm $(OBJECTS)
|
2016-09-16 00:09:04 +02:00
|
|
|
|
|
|
|
mrproper: clean
|
2016-09-19 17:09:45 +02:00
|
|
|
@-rm *.bin
|
2016-09-21 20:36:39 +02:00
|
|
|
|
|
|
|
cleantmp:
|
|
|
|
rm /tmp/ipc/*
|