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/remote/Makefile
2016-09-16 21:37:59 +02:00

32 lines
620 B
Makefile

CC=gcc
CFLAGS=-Wall -g
LDFLAGS= -pthread
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: tcpdserver tcpdclient
$(EXEC): $(OBJECTS) $(CFILES)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $@.c -o $@
tcpdserver: tcpdserver.c tcpdserver.h
$(CC) $(CFLAGS) $(LDFLAGS) $@.c -o $@
tcpdclient: tcpdclient.c tcpdserver.h
$(CC) $(CFLAGS) $(LDFLAGS) $@.c -o $@
.c.o:
$(CC) -c $(CFLAGS) $< -o $@
clean:
-rm $(OBJECTS)
mrproper: clean
rm $(EXEC)
cleantmp:
rm /tmp/ipc/*