18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ciinclude ../lib.mk 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ciuname_M := $(shell uname -m 2>/dev/null || echo not) 58c2ecf20Sopenharmony_ciARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ciTEST_GEN_PROGS := $(OUTPUT)/vdso_test_gettimeofday $(OUTPUT)/vdso_test_getcpu 88c2ecf20Sopenharmony_ciifeq ($(ARCH),x86) 98c2ecf20Sopenharmony_ciTEST_GEN_PROGS += $(OUTPUT)/vdso_standalone_test_x86 108c2ecf20Sopenharmony_ciendif 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ciifndef CROSS_COMPILE 138c2ecf20Sopenharmony_ciCFLAGS := -std=gnu99 148c2ecf20Sopenharmony_ciCFLAGS_vdso_standalone_test_x86 := -nostdlib -fno-asynchronous-unwind-tables -fno-stack-protector 158c2ecf20Sopenharmony_ciifeq ($(CONFIG_X86_32),y) 168c2ecf20Sopenharmony_ciLDLIBS += -lgcc_s 178c2ecf20Sopenharmony_ciendif 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ciall: $(TEST_GEN_PROGS) 208c2ecf20Sopenharmony_ci$(OUTPUT)/vdso_test_gettimeofday: parse_vdso.c vdso_test_gettimeofday.c 218c2ecf20Sopenharmony_ci$(OUTPUT)/vdso_test_getcpu: parse_vdso.c vdso_test_getcpu.c 228c2ecf20Sopenharmony_ci$(OUTPUT)/vdso_standalone_test_x86: vdso_standalone_test_x86.c parse_vdso.c 238c2ecf20Sopenharmony_ci $(CC) $(CFLAGS) $(CFLAGS_vdso_standalone_test_x86) \ 248c2ecf20Sopenharmony_ci vdso_standalone_test_x86.c parse_vdso.c \ 258c2ecf20Sopenharmony_ci -o $@ 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ciendif 28