configure: Add conditional platform builds
[petitboot] / discover / Makefile.am
index 899c9a63efa231fc41ff87fabf4b49ff235f1d48..2b7c7940b051752b02d4d55d246872ea686c0dc8 100644 (file)
@@ -52,7 +52,8 @@ discover_pb_discover_SOURCES = \
        discover/user-event.h \
        discover/kboot-parser.c \
        discover/yaboot-parser.c \
-       discover/pxe-parser.c
+       discover/pxe-parser.c \
+       discover/syslinux-parser.c
 
 discover_pb_discover_LDADD = \
        discover/grub2/grub2-parser.ro \
@@ -79,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 += \
@@ -95,5 +99,8 @@ discover_platform_ro_LDFLAGS = \
 
 endif
 
+discover_platform_ro_CPPFLAGS = \
+       $(AM_CPPFLAGS)
+
 discover_platform_ro_LINK = \
        $(LD) -r -o $@