configure: Add conditional platform builds
[petitboot] / discover / Makefile.am
index f9625ec400b42811190ef2f31043371361714062..2b7c7940b051752b02d4d55d246872ea686c0dc8 100644 (file)
@@ -80,11 +80,11 @@ discover_platform_ro_SOURCES = \
        discover/ipmi.h \
        discover/dt.c \
        discover/dt.h \
-       discover/hostboot.h \
-       discover/platform-powerpc.c
+       discover/hostboot.h
 
-discover_platform_ro_CPPFLAGS = \
-       $(AM_CPPFLAGS)
+if PLATFORM_POWERPC
+discover_platform_ro_SOURCES += discover/platform-powerpc.c
+endif
 
 # Build dummy last to put it at the end of the platforms section.
 discover_platform_ro_SOURCES += discover/platform-dummy.c
@@ -99,5 +99,8 @@ discover_platform_ro_LDFLAGS = \
 
 endif
 
+discover_platform_ro_CPPFLAGS = \
+       $(AM_CPPFLAGS)
+
 discover_platform_ro_LINK = \
        $(LD) -r -o $@