]> git.ozlabs.org Git - petitboot/blobdiff - discover/Makefile.am
discover: Avoid writing network overrides to NVRAM
[petitboot] / discover / Makefile.am
index a4498187170fd66a6d2e1368093565c433623704..4a6cbd094737a3b32ffd3205d844b4c08b0c0563 100644 (file)
 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
-AM_CPPFLAGS = -I$(top_srcdir)/lib $(DEFAULT_CPPFLAGS)
+sbin_PROGRAMS += discover/pb-discover
+noinst_PROGRAMS += discover/platform.ro
 
-AM_CFLAGS = $(DEFAULT_CFLAGS)  \
-       -DPREFIX='"$(prefix)"' \
-       -DPKG_SHARE_DIR='"$(pkgdatadir)"' \
-       -DLOCAL_STATE_DIR='"$(localstatedir)"'
+discover_pb_discover_SOURCES = \
+       discover/boot.c \
+       discover/boot.h \
+       discover/cdrom.c \
+       discover/cdrom.h \
+       discover/device-handler.c \
+       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/params.c \
+       discover/params.h \
+       discover/parser.c \
+       discover/parser.h \
+       discover/parser-conf.c \
+       discover/parser-conf.h \
+       discover/parser-utils.c \
+       discover/parser-utils.h \
+       discover/paths.c \
+       discover/paths.h \
+       discover/pb-discover.c \
+       discover/pb-discover.h \
+       discover/resource.c \
+       discover/resource.h \
+       discover/sysinfo.c \
+       discover/sysinfo.h \
+       discover/network.c \
+       discover/network.h \
+       discover/udev.c \
+       discover/udev.h \
+       discover/user-event.c \
+       discover/user-event.h \
+       discover/kboot-parser.c \
+       discover/yaboot-parser.c \
+       discover/pxe-parser.c
 
-noinst_LIBRARIES = libparser.o
+discover_pb_discover_LDADD = \
+       discover/grub2/grub2-parser.ro \
+       discover/platform.ro \
+       $(core_lib) \
+       $(UDEV_LIBS) \
+       $(GPGME_LIBS)
 
-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
+discover_pb_discover_LDFLAGS = \
+       $(AM_LDFLAGS) \
+       $(DEVMAPPER_LIBS)
 
-libparser.o: $(libparser_o_OBJECTS)
-       $(LD) -r -o $@ $^
+discover_pb_discover_CPPFLAGS = \
+       $(AM_CPPFLAGS) \
+       -DLOCAL_STATE_DIR='"$(localstatedir)"' \
+       -DLOCALEDIR='"$(localedir)"' \
+       -DPKG_LIBEXEC_DIR='"$(pkglibexecdir)"' \
+       -DPKG_SHARE_DIR='"$(pkgsharedir)"' \
+       -DPKG_SYSCONF_DIR='"$(pkgsysconfdir)"'
 
-EXTRA_DIST = native-parser.c
+discover_platform_ro_SOURCES = \
+       discover/platform.c \
+       discover/platform.h \
+       discover/ipmi.c \
+       discover/ipmi.h \
+       discover/dt.c \
+       discover/dt.h \
+       discover/hostboot.h \
+       discover/platform-powerpc.c
 
-sbin_PROGRAMS = pb-discover
+discover_platform_ro_CPPFLAGS = \
+       $(AM_CPPFLAGS)
 
-pb_discover_SOURCES = \
-       boot.c \
-       boot.h \
-       device-handler.c \
-       device-handler.h \
-       discover-server.c \
-       discover-server.h \
-       event.c \
-       event.h \
-       event-parser.c \
-       params.c \
-       params.h \
-       parser-utils.c \
-       parser-utils.h \
-       pb-discover.c \
-       pb-discover.h \
-       network.c \
-       network.h \
-       udev.c \
-       udev.h \
-       user-event.c \
-       user-event.h
+if ENABLE_MTD
+discover_platform_ro_SOURCES += \
+       discover/hostboot.c
 
-pb_discover_LDADD = libparser.o $(top_builddir)/lib/libpbcore.la
+discover_platform_ro_LDFLAGS = \
+       $(core_lib) \
+       $(UDEV_LIBS)
 
-pb_discover_LDFLAGS = -ludev
+endif
 
-MAINTAINERCLEANFILES = Makefile.in
+discover_platform_ro_LINK = \
+       $(LD) -r -o $@