summaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2022-02-15 21:33:38 -0500
committerJeffrey Walton <noloader@gmail.com>2022-02-15 21:33:38 -0500
commit3d9245db91a4f46c279859a5394e3b2372d1553c (patch)
tree33280ecd7ef258fafc6785804030749fab276e81 /GNUmakefile
parent667df886703a1bd2a01cdb39baea36ba4bddb9ed (diff)
downloadcryptopp-git-3d9245db91a4f46c279859a5394e3b2372d1553c.tar.gz
Remove SIMD files when CRYPTOPP_DISABLE_ASM
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile
index c0607288..cac4fabf 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1219,6 +1219,17 @@ ifeq ($(IS_X86)$(IS_X64),00)
SRCS := $(filter-out %_avx.cpp,$(SRCS))
endif
+# If ASM is disabled we can remove the SIMD files, too.
+ifneq ($(findstring -DCRYPTOPP_DISABLE_ASM,$(CRYPTOPP_CPPFLAGS)$(CPPFLAGS)$(CXXFLAGS)),)
+ SRCS := $(filter-out arm_%,$(SRCS))
+ SRCS := $(filter-out ppc_%,$(SRCS))
+ SRCS := $(filter-out neon_%,$(SRCS))
+ SRCS := $(filter-out sse_%,$(SRCS))
+ SRCS := $(filter-out %_sse.cpp,$(SRCS))
+ SRCS := $(filter-out %_avx.cpp,$(SRCS))
+ SRCS := $(filter-out %_simd.cpp,$(SRCS))
+endif
+
# List cryptlib.cpp first, then cpu.cpp, then integer.cpp to tame C++ static initialization problems.
OBJS := $(SRCS:.cpp=.o)
OBJS := $(OBJS:.S=.o)