From 3f3cebdcda4a9fdc145d50b3b90b1ca7a2aade22 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 8 Jun 2009 16:10:12 -0700 Subject: [PATCH] libspl support for conditional SUBDIRs based on target arch --- lib/libspl/Makefile.am | 7 ++++--- lib/libspl/asm-powerpc64/Makefile.am | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/libspl/Makefile.am b/lib/libspl/Makefile.am index 2fd80975b2..7b89baee86 100644 --- a/lib/libspl/Makefile.am +++ b/lib/libspl/Makefile.am @@ -1,7 +1,8 @@ include $(top_srcdir)/config/Rules.am -target_arch = $(shell echo ${target_cpu} | sed -e s/i.86/i386/) -SUBDIRS = asm-i386 asm-x86_64 asm-powerpc64 include +SUBDIRS = include $(TARGET_ARCH_DIR) +DIST_SUBDIRS = include asm-i386 asm-x86_64 asm-powerpc64 + DEFAULT_INCLUDES += \ -I${top_srcdir}/lib/libspl/include @@ -21,6 +22,6 @@ libspl_la_SOURCES = \ ${top_srcdir}/lib/libspl/strnlen.c \ ${top_srcdir}/lib/libspl/zone.c \ ${top_srcdir}/lib/libspl/xdr.c \ - ${top_srcdir}/lib/libspl/asm-${target_arch}/atomic.S \ + ${top_srcdir}/lib/libspl/${TARGET_ARCH_DIR}/atomic.S \ ${top_srcdir}/lib/libspl/include/sys/list.h \ ${top_srcdir}/lib/libspl/include/sys/list_impl.h diff --git a/lib/libspl/asm-powerpc64/Makefile.am b/lib/libspl/asm-powerpc64/Makefile.am index f8f5b28856..38f3be8bd9 100644 --- a/lib/libspl/asm-powerpc64/Makefile.am +++ b/lib/libspl/asm-powerpc64/Makefile.am @@ -4,12 +4,12 @@ DEFAULT_INCLUDES += \ -I${top_srcdir}/lib/libspl/include COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -atomic_SOURCES = atomic.c +atomic_SOURCE = atomic.c atomic_ASM = atomic.S # Generates assembly to simplify inclusion in ../Makefile.am all-am: - $(COMPILE) -c -S ${atomic_SOURCES} -o ${atomic_ASM} + $(COMPILE) -c -S ${atomic_SOURCE} -o ${atomic_ASM} clean-generic: rm ${atomic_ASM}