1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 270b574e7SDominik Brodowskiinclude ../lib.mk 370b574e7SDominik Brodowski 429ee9239SShuah Khan (Samsung OSG)uname_M := $(shell uname -m 2>/dev/null || echo not) 529ee9239SShuah Khan (Samsung OSG)ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) 629ee9239SShuah Khan (Samsung OSG) 72e9a9725SMark BrownTEST_GEN_PROGS := $(OUTPUT)/vdso_test_gettimeofday $(OUTPUT)/vdso_test_getcpu 8693f5ca0SVincenzo FrascinoTEST_GEN_PROGS += $(OUTPUT)/vdso_test_abi 9*03f55c79SVincenzo FrascinoTEST_GEN_PROGS += $(OUTPUT)/vdso_test_clock_getres 1029ee9239SShuah Khan (Samsung OSG)ifeq ($(ARCH),x86) 1129ee9239SShuah Khan (Samsung OSG)TEST_GEN_PROGS += $(OUTPUT)/vdso_standalone_test_x86 1229ee9239SShuah Khan (Samsung OSG)endif 1329ee9239SShuah Khan (Samsung OSG) 14f9b6b0efSShuah KhanCFLAGS := -std=gnu99 15f9b6b0efSShuah KhanCFLAGS_vdso_standalone_test_x86 := -nostdlib -fno-asynchronous-unwind-tables -fno-stack-protector 16f9b6b0efSShuah Khanifeq ($(CONFIG_X86_32),y) 17f9b6b0efSShuah KhanLDLIBS += -lgcc_s 18f9b6b0efSShuah Khanendif 19f9b6b0efSShuah Khan 2029ee9239SShuah Khan (Samsung OSG)all: $(TEST_GEN_PROGS) 21babf8a97SMark Brown$(OUTPUT)/vdso_test_gettimeofday: parse_vdso.c vdso_test_gettimeofday.c 222e9a9725SMark Brown$(OUTPUT)/vdso_test_getcpu: parse_vdso.c vdso_test_getcpu.c 23693f5ca0SVincenzo Frascino$(OUTPUT)/vdso_test_abi: parse_vdso.c vdso_test_abi.c 24*03f55c79SVincenzo Frascino$(OUTPUT)/vdso_test_clock_getres: vdso_test_clock_getres.c 2570b574e7SDominik Brodowski$(OUTPUT)/vdso_standalone_test_x86: vdso_standalone_test_x86.c parse_vdso.c 26f9b6b0efSShuah Khan $(CC) $(CFLAGS) $(CFLAGS_vdso_standalone_test_x86) \ 27f9b6b0efSShuah Khan vdso_standalone_test_x86.c parse_vdso.c \ 2870b574e7SDominik Brodowski -o $@ 29f9b6b0efSShuah Khan 30