Files
linuxkit/alpine/packages/tap-vsockd/Makefile
Ian Campbell b8a7032161 Add || true to the docker rmi invocations in the clean target
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>
2016-06-08 13:59:47 +01:00

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