discover: Fix CDROM handling
[petitboot] / discover / Makefile.am
index ce8cff5b32b45e25a9c4a0bbe6153e229d9b82fc..84c0436a9ade56835d4a737dce769bcd47d084fb 100644 (file)
 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
+pkgsysconfdir = @sysconfdir@/@PACKAGE@
+
+SUBDIRS = grub2
+
 AM_CPPFLAGS = -I$(top_srcdir)/lib $(DEFAULT_CPPFLAGS)
 
 AM_CFLAGS = $(DEFAULT_CFLAGS)  \
        -DPREFIX='"$(prefix)"' \
        -DPKG_SHARE_DIR='"$(pkgdatadir)"' \
+       -DPKG_SYSCONF_DIR='"$(pkgsysconfdir)"' \
+       -DPKG_LIBEXEC_DIR='"$(pkglibexecdir)"' \
        -DLOCAL_STATE_DIR='"$(localstatedir)"'
 
-noinst_LIBRARIES = libparser.o
-
-libparser_o_SOURCES = \
-       parser.c \
-       parser.h \
-       parser-conf.c \
-       parser-conf.h \
-       paths.c \
-       paths.h \
-       resource.c \
-       resource.h \
-       kboot-parser.c \
-       grub2-parser.c \
-       yaboot-parser.c \
-       pxe-parser.c
-
-libparser.o: $(libparser_o_OBJECTS)
-       $(LD) -r -o $@ $^
-
 EXTRA_DIST = native-parser.c
 
 sbin_PROGRAMS = pb-discover
@@ -45,24 +32,44 @@ sbin_PROGRAMS = pb-discover
 pb_discover_SOURCES = \
        boot.c \
        boot.h \
+       cdrom.c \
+       cdrom.h \
        device-handler.c \
        device-handler.h \
        discover-server.c \
        discover-server.h \
        event.c \
        event.h \
-       event-parser.c \
+       file.c \
+       file.h \
        params.c \
        params.h \
+       parser.c \
+       parser.h \
+       parser-conf.c \
+       parser-conf.h \
        parser-utils.c \
        parser-utils.h \
+       paths.c \
+       paths.h \
        pb-discover.c \
        pb-discover.h \
+       resource.c \
+       resource.h \
+       sysinfo.c \
+       sysinfo.h \
+       network.c \
+       network.h \
        udev.c \
        udev.h \
        user-event.c \
-       user-event.h
+       user-event.h \
+       kboot-parser.c \
+       yaboot-parser.c \
+       pxe-parser.c
+
+pb_discover_LDADD = $(top_builddir)/lib/libpbcore.la grub2/grub2-parser.ro
 
-pb_discover_LDADD = libparser.o $(top_builddir)/lib/libpbcore.la
+pb_discover_LDFLAGS = -ludev
 
 MAINTAINERCLEANFILES = Makefile.in