configure: Add conditional platform builds
[petitboot] / discover / Makefile.am
index 3992a6659b3e7c5426b1a0be4c8b7e03b1a6bcf1..2b7c7940b051752b02d4d55d246872ea686c0dc8 100644 (file)
@@ -80,11 +80,14 @@ 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
 
 if ENABLE_MTD
 discover_platform_ro_SOURCES += \
@@ -96,5 +99,8 @@ discover_platform_ro_LDFLAGS = \
 
 endif
 
+discover_platform_ro_CPPFLAGS = \
+       $(AM_CPPFLAGS)
+
 discover_platform_ro_LINK = \
        $(LD) -r -o $@