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-05-31 23:16:39 +02:00
|
|
|
CC=gcc
|
2016-09-14 23:05:02 +02:00
|
|
|
CFLAGS=-Wall -g -Wextra
|
|
|
|
LDFLAGS= -pthread
|
2016-05-31 23:16:39 +02:00
|
|
|
CFILES=$(wildcard *.c) # CFILES => recompiles everything on a C file change
|
|
|
|
EXEC=$(basename $(wildcard *.c))
|
|
|
|
SOURCES=$(wildcard ../lib/*.c)
|
|
|
|
OBJECTS=$(SOURCES:.c=.o)
|
|
|
|
TESTS=$(addsuffix .test, $(EXEC))
|
|
|
|
|
|
|
|
all: $(SOURCES) $(EXEC)
|
|
|
|
|
|
|
|
$(EXEC): $(OBJECTS) $(CFILES)
|
2016-09-15 23:08:08 +02:00
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $@.c -lcbor -o $@.bin
|
2016-05-31 23:16:39 +02:00
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) -c $(CFLAGS) $< -o $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm $(OBJECTS)
|
|
|
|
|
|
|
|
mrproper: clean
|
2016-09-15 23:08:08 +02:00
|
|
|
rm *.bin
|