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

30 lines
621 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)
2016-12-23 01:33:52 +01:00
test:
rm /tmp/ipc/pongd-0-0
./pongd.bin
$(EXEC): $(OBJECTS) $(CFILES)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $@.c -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 $(PARAMS)
2016-10-14 17:47:08 +02:00
clean:
2016-09-15 23:08:08 +02:00
@-rm $(OBJECTS)
mrproper: clean
2016-09-15 23:08:08 +02:00
@-rm *.bin