mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-01-06 09:19:51 +00:00
Linux xargs calls the command with no arguments if it gets no inputs, which `docker rmi` complains about. It provides -r / --no-run-if-empty to prevent this but unfortunately this isn't supported on OSX. Ignore errors from `docker rmi` so that `make clean` will keep going and clean up later stuff. Signed-off-by: Ian Campbell <ian.campbell@docker.com>
25 lines
618 B
Makefile
25 lines
618 B
Makefile
.PHONY: all
|
|
|
|
DEPS=tap-vsockd.c hvsock.c hvsock.h protocol.c protocol.h
|
|
|
|
all: Dockerfile $(DEPS)
|
|
docker build -t tap-vsockd:build .
|
|
docker run --rm tap-vsockd:build cat tap-vsockd > tap-vsockd
|
|
chmod 755 tap-vsockd
|
|
|
|
tap-vsockd: hvsock.o protocol.o tap-vsockd.o
|
|
gcc -Wall -Werror -o tap-vsockd tap-vsockd.o protocol.o hvsock.o -lpthread
|
|
|
|
hvsock.o: hvsock.c hvsock.h
|
|
gcc -Wall -Werror -c hvsock.c
|
|
|
|
protocol.o: protocol.c
|
|
gcc -Wall -Werror -c protocol.c
|
|
|
|
tap-vsockd.o: tap-vsockd.c hvsock.h
|
|
gcc -Wall -Werror -c tap-vsockd.c
|
|
|
|
clean:
|
|
rm -f tap-vsockd
|
|
docker images -q tap-vsockd:build | xargs docker rmi -f || true
|