xref: /linux/tools/testing/selftests/ipc/Makefile (revision 5e29a9105b1a0da86eff0ad6ae015997b49d4d1d)
1uname_M := $(shell uname -m 2>/dev/null || echo not)
2ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/)
3ifeq ($(ARCH),i386)
4        ARCH := x86
5	CFLAGS := -DCONFIG_X86_32 -D__i386__
6endif
7ifeq ($(ARCH),x86_64)
8	ARCH := x86
9	CFLAGS := -DCONFIG_X86_64 -D__x86_64__
10endif
11
12CFLAGS += -I../../../../usr/include/
13
14all:
15ifeq ($(ARCH),x86)
16	gcc $(CFLAGS) msgque.c -o msgque_test
17else
18	echo "Not an x86 target, can't build msgque selftest"
19endif
20
21TEST_PROGS := msgque_test
22
23include ../lib.mk
24
25clean:
26	rm -fr ./msgque_test
27