aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libspl/Makefile.am
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2020-01-17 12:40:09 -0800
committerGitHub <[email protected]>2020-01-17 12:40:09 -0800
commit70835c5b755e4fe1e16724e0a5d24e7e451f755c (patch)
tree9da58ece476b54ab6e0bda786f60c4da2dc2fc8d /lib/libspl/Makefile.am
parente5030fbc2846c347f58e3a0bae436da84b98ef16 (diff)
Unify target_cpu handling
Over the years several slightly different approaches were used in the Makefiles to determine the target architecture. This change updates both the build system and Makefile to handle this in a consistent fashion. TARGET_CPU is set to i386, x86_64, powerpc, aarch6 or sparc64 and made available in the Makefiles to be used as appropriate. Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #9848
Diffstat (limited to 'lib/libspl/Makefile.am')
-rw-r--r--lib/libspl/Makefile.am14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/libspl/Makefile.am b/lib/libspl/Makefile.am
index 313760175..3101b5fc5 100644
--- a/lib/libspl/Makefile.am
+++ b/lib/libspl/Makefile.am
@@ -1,10 +1,20 @@
include $(top_srcdir)/config/Rules.am
+if TARGET_CPU_I386
+TARGET_CPU_DIR = asm-i386
+else
+if TARGET_CPU_X86_64
+TARGET_CPU_DIR = asm-x86_64
+else
+TARGET_CPU_DIR = asm-generic
+endif
+endif
+
VPATH = \
$(top_srcdir)/lib/libspl \
- $(top_srcdir)/lib/libspl/$(TARGET_ASM_DIR)
+ $(top_srcdir)/lib/libspl/$(TARGET_CPU_DIR)
-SUBDIRS = include $(TARGET_ASM_DIR)
+SUBDIRS = include $(TARGET_CPU_DIR)
DIST_SUBDIRS = include asm-generic asm-i386 asm-x86_64
AM_CFLAGS += $(LIBTIRPC_CFLAGS)