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

30 lines
632 B
Makefile
Raw Normal View History

CC=gcc
2016-12-20 23:36:00 +01:00
CFLAGS=-Wall -g -Wextra
2018-10-11 01:09:21 +02:00
LDFLAGS= -pthread -lreadline
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)
2018-10-11 01:09:21 +02:00
$(CC) $(CFLAGS) $(OBJECTS) $@.c -o $@.bin $(LDFLAGS)
.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