1#for x86 2HAVE_AVX2 := Yes 3 4ifneq ($(filter %86 x86_64, $(ARCH)),) 5include $(SRC_PATH)build/x86-common.mk 6ifeq ($(USE_ASM), Yes) 7ifeq ($(HAVE_AVX2), Yes) 8CFLAGS += -DHAVE_AVX2 9CXXFLAGS += -DHAVE_AVX2 10ASMFLAGS += -DHAVE_AVX2 11endif 12endif 13endif 14 15#for arm 16ifneq ($(filter-out arm64 arm64e, $(filter arm%, $(ARCH))),) 17ifeq ($(USE_ASM), Yes) 18ASM_ARCH = arm 19ASMFLAGS += -I$(SRC_PATH)codec/common/arm/ 20CFLAGS += -DHAVE_NEON 21endif 22endif 23 24#for arm64 25ifneq ($(filter arm64 aarch64 arm64e, $(ARCH)),) 26ifeq ($(USE_ASM), Yes) 27ASM_ARCH = arm64 28ASMFLAGS += -I$(SRC_PATH)codec/common/arm64/ 29CFLAGS += -DHAVE_NEON_AARCH64 30endif 31endif 32 33#for mips 34ifneq ($(filter mips mips64, $(ARCH)),) 35ifeq ($(USE_ASM), Yes) 36ENABLE_MMI=Yes 37ENABLE_MSA=Yes 38ASM_ARCH = mips 39ASMFLAGS += -I$(SRC_PATH)codec/common/mips/ 40#mmi 41ifeq ($(ENABLE_MMI), Yes) 42ENABLE_MMI = $(shell $(SRC_PATH)build/mips-simd-check.sh $(CC) mmi) 43ifeq ($(ENABLE_MMI), Yes) 44CFLAGS += -DHAVE_MMI -march=loongson3a 45endif 46endif 47#msa 48ifeq ($(ENABLE_MSA), Yes) 49ENABLE_MSA = $(shell $(SRC_PATH)build/mips-simd-check.sh $(CC) msa) 50ifeq ($(ENABLE_MSA), Yes) 51CFLAGS += -DHAVE_MSA -mmsa 52endif 53endif 54endif 55endif 56 57#for loongarch 58ifneq ($(filter loongarch64, $(ARCH)),) 59ifeq ($(USE_ASM), Yes) 60ENABLE_LSX=Yes 61ENABLE_LASX=Yes 62ASM_ARCH = loongarch 63ASMFLAGS += -I$(SRC_PATH)codec/common/loongarch/ 64#lsx 65ifeq ($(ENABLE_LSX), Yes) 66ENABLE_LSX = $(shell $(SRC_PATH)build/loongarch-simd-check.sh $(CC) lsx) 67ifeq ($(ENABLE_LSX), Yes) 68CFLAGS += -DHAVE_LSX -mlsx 69endif 70endif 71#lasx 72ifeq ($(ENABLE_LASX), Yes) 73ENABLE_LASX = $(shell $(SRC_PATH)build/loongarch-simd-check.sh $(CC) lasx) 74ifeq ($(ENABLE_LASX), Yes) 75CFLAGS += -DHAVE_LASX -mlasx 76endif 77endif 78endif 79endif 80