Archived
3
0
This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues or pull requests.
libipc-old/pong/app/Makefile

26 lines
575 B
Makefile
Raw Normal View History

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