Merge tag 'kbuild-fixes-v4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/masah...
[sfrench/cifs-2.6.git] / tools / testing / selftests / vDSO / Makefile
1 # SPDX-License-Identifier: GPL-2.0
2 include ../lib.mk
3
4 ifndef CROSS_COMPILE
5 CFLAGS := -std=gnu99
6 CFLAGS_vdso_standalone_test_x86 := -nostdlib -fno-asynchronous-unwind-tables -fno-stack-protector
7 ifeq ($(CONFIG_X86_32),y)
8 LDLIBS += -lgcc_s
9 endif
10
11 TEST_PROGS := $(OUTPUT)/vdso_test $(OUTPUT)/vdso_standalone_test_x86
12
13 all: $(TEST_PROGS)
14 $(OUTPUT)/vdso_test: parse_vdso.c vdso_test.c
15 $(OUTPUT)/vdso_standalone_test_x86: vdso_standalone_test_x86.c parse_vdso.c
16         $(CC) $(CFLAGS) $(CFLAGS_vdso_standalone_test_x86) \
17                 vdso_standalone_test_x86.c parse_vdso.c \
18                 -o $@
19
20 EXTRA_CLEAN := $(TEST_PROGS)
21 endif