xref: /linux/tools/testing/vsock/Makefile (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
28abbffd2SArseniy Krasnovall: test vsock_perf
38d211285SArseniy Krasnovtest: vsock_test vsock_diag_test vsock_uring_test
4bc36442eSArseniy Krasnovvsock_test: vsock_test.o vsock_test_zerocopy.o timeout.o control.o util.o msg_zerocopy_common.o
5df7e0e0dSStefan Hajnoczivsock_diag_test: vsock_diag_test.o timeout.o control.o util.o
6e846d679SArseniy Krasnovvsock_perf: vsock_perf.o msg_zerocopy_common.o
70b025033SStefan Hajnoczi
88d211285SArseniy Krasnovvsock_uring_test: LDLIBS = -luring
98d211285SArseniy Krasnovvsock_uring_test: control.o util.o vsock_uring_test.o timeout.o msg_zerocopy_common.o
108d211285SArseniy Krasnov
1143985468SStefan HajnocziCFLAGS += -g -O2 -Werror -Wall -I. -I../../include -I../../../usr/include -Wno-pointer-sign -fno-strict-overflow -fno-strict-aliasing -fno-common -MMD -U_FORTIFY_SOURCE -D_GNU_SOURCE
120b025033SStefan Hajnoczi.PHONY: all test clean
130b025033SStefan Hajnocziclean:
148d211285SArseniy Krasnov	${RM} *.o *.d vsock_test vsock_diag_test vsock_perf vsock_uring_test
150b025033SStefan Hajnoczi-include *.d
16*42ffe242SPeng Fan
17*42ffe242SPeng FanVSOCK_INSTALL_PATH ?=
18*42ffe242SPeng Fan
19*42ffe242SPeng Faninstall: all
20*42ffe242SPeng Fanifdef VSOCK_INSTALL_PATH
21*42ffe242SPeng Fan	mkdir -p $(VSOCK_INSTALL_PATH)
22*42ffe242SPeng Fan	install -m 744 vsock_test $(VSOCK_INSTALL_PATH)
23*42ffe242SPeng Fan	install -m 744 vsock_perf $(VSOCK_INSTALL_PATH)
24*42ffe242SPeng Fan	install -m 744 vsock_diag_test $(VSOCK_INSTALL_PATH)
25*42ffe242SPeng Fan	install -m 744 vsock_uring_test $(VSOCK_INSTALL_PATH)
26*42ffe242SPeng Fanelse
27*42ffe242SPeng Fan	$(error Error: set VSOCK_INSTALL_PATH to use install)
28*42ffe242SPeng Fanendif
29