configure: Add conditional platform builds
[petitboot] / discover / Makefile.am
index cd5c95709d429617841dc3c73f269afb29cf78ac..2b7c7940b051752b02d4d55d246872ea686c0dc8 100644 (file)
@@ -24,10 +24,10 @@ discover_pb_discover_SOURCES = \
        discover/device-handler.h \
        discover/discover-server.c \
        discover/discover-server.h \
+       discover/devmapper.c \
+       discover/devmapper.h \
        discover/event.c \
        discover/event.h \
-       discover/file.c \
-       discover/file.h \
        discover/params.c \
        discover/params.h \
        discover/parser.c \
@@ -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 \
@@ -60,6 +61,10 @@ discover_pb_discover_LDADD = \
        $(core_lib) \
        $(UDEV_LIBS)
 
+discover_pb_discover_LDFLAGS = \
+       $(AM_LDFLAGS) \
+       $(DEVMAPPER_LIBS)
+
 discover_pb_discover_CPPFLAGS = \
        $(AM_CPPFLAGS) \
        -DLOCAL_STATE_DIR='"$(localstatedir)"' \
@@ -71,10 +76,31 @@ discover_pb_discover_CPPFLAGS = \
 discover_platform_ro_SOURCES = \
        discover/platform.c \
        discover/platform.h \
-       discover/platform-powerpc.c
+       discover/ipmi.c \
+       discover/ipmi.h \
+       discover/dt.c \
+       discover/dt.h \
+       discover/hostboot.h
 
-discover_platform_ro_LINK = \
-       $(LD) -r -o $@
+if PLATFORM_POWERPC
+discover_platform_ro_SOURCES += discover/platform-powerpc.c
+endif
 
-EXTRA_DIST += discover/native-parser.c
+# 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 += \
+       discover/hostboot.c
+
+discover_platform_ro_LDFLAGS = \
+       $(core_lib) \
+       $(UDEV_LIBS)
+
+endif
+
+discover_platform_ro_CPPFLAGS = \
+       $(AM_CPPFLAGS)
+
+discover_platform_ro_LINK = \
+       $(LD) -r -o $@