Makefile
parent
7d237ad87c
commit
f3e26db413
|
@ -7,25 +7,16 @@ SOURCES=$(wildcard ../lib/*.c)
|
||||||
OBJECTS=$(SOURCES:.c=.o)
|
OBJECTS=$(SOURCES:.c=.o)
|
||||||
TESTS=$(addsuffix .test, $(EXEC))
|
TESTS=$(addsuffix .test, $(EXEC))
|
||||||
|
|
||||||
all: tcpdserver tcpdclient
|
all: $(SOURCES) $(EXEC)
|
||||||
|
|
||||||
$(EXEC): $(OBJECTS) $(CFILES)
|
$(EXEC): $(OBJECTS) $(CFILES)
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $@.c -o $@
|
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $@.c -lcbor -o $@.bin
|
||||||
|
|
||||||
tcpdserver: tcpdserver.c tcpdserver.h
|
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) $@.c -o $@
|
|
||||||
|
|
||||||
tcpdclient: tcpdclient.c tcpdserver.h
|
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) $@.c -o $@
|
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CFLAGS) $< -o $@
|
$(CC) -c $(CFLAGS) $< -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm $(OBJECTS)
|
@-rm $(OBJECTS)
|
||||||
|
|
||||||
mrproper: clean
|
mrproper: clean
|
||||||
rm $(EXEC)
|
@-rm *.bin
|
||||||
|
|
||||||
cleantmp:
|
|
||||||
rm /tmp/ipc/*
|
|
||||||
|
|
Reference in New Issue