libspl support for conditional SUBDIRs based on target arch

This commit is contained in:
Brian Behlendorf 2009-06-08 16:10:12 -07:00
parent 4eb42caf81
commit 3f3cebdcda
2 changed files with 6 additions and 5 deletions

View File

@ -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

View File

@ -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}