guestfs-structs.h \
guestfs-actions.h \
guestfs-internal-actions.h \
- guestfs-actions.c \
- guestfs-bindtests.c \
+ actions.c \
+ bindtests.c \
guestfs-actions.pod \
guestfs-availability.pod \
- guestfs-structs.pod
+ guestfs-structs.pod \
+ libguestfs.syms
$(generator_built): stamp-generator
MAX_PROC_NR \
stamp-generator \
generator.ml \
- libguestfs.3
+ libguestfs.3 \
+ guestfs.pod
# Rerun the generator if it has changed.
# Git removes empty directories, so in cases where the
# have to create the directory first.
noinst_DATA = stamp-generator
-stamp-generator: generator.ml
+stamp-generator: generator.ml ../images/test.iso
mkdir -p $(top_srcdir)/perl/lib/Sys
mkdir -p $(top_srcdir)/ruby/ext/guestfs
mkdir -p $(top_srcdir)/java/com/redhat/et/libguestfs
+ mkdir -p $(top_srcdir)/csharp
cd $(top_srcdir) && ocaml -warn-error A src/generator.ml
+../images/test.iso:
+ make -C ../images test.iso
+
include_HEADERS = guestfs.h guestfs-actions.h guestfs-structs.h
lib_LTLIBRARIES = libguestfs.la
#
# Note that this scheme means the real library version will always be
# 'libguestfs.so.0.$(MAX_PROC_NR).0'.
-
libguestfs_la_LDFLAGS = -version-info $(MAX_PROC_NR):0:$(MAX_PROC_NR)
+
+libguestfs_la_LDFLAGS += $(VERSION_SCRIPT_FLAGS)libguestfs.syms
+
libguestfs_la_SOURCES = \
guestfs.c \
guestfs.h \
guestfs-actions.h \
- guestfs-actions.c \
- guestfs-bindtests.c \
guestfs-internal.h \
+ guestfs-structs.h \
guestfs_protocol.h \
- gettext.h
+ gettext.h \
+ actions.c \
+ appliance.c \
+ bindtests.c \
+ inspect.c \
+ launch.c \
+ proto.c \
+ libguestfs.syms
-libguestfs_la_LIBADD = $(LTLIBTHREAD)
+libguestfs_la_LIBADD = $(HIVEX_LIBS) $(LIBPCRE) $(LIBMAGIC) $(LTLIBTHREAD) ../gnulib/lib/libgnu.la
# Make libguestfs include the convenience library.
noinst_LTLIBRARIES = libprotocol.la
libguestfs_la_CFLAGS = \
-DGUESTFS_DEFAULT_PATH='"$(libdir)/guestfs"' \
+ $(HIVEX_CFLAGS) \
$(WARN_CFLAGS) $(WERROR_CFLAGS)
libguestfs_la_CPPFLAGS = -I$(top_srcdir)/gnulib/lib
--name "guestfs" \
--release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
> $@
+
+# Check user doesn't try to do 'make all' or 'make check' as root.
+# https://www.redhat.com/archives/libguestfs/2010-April/msg00098.html
+
+all-local: checkroot
+check-local: checkroot
+checkroot:
+ @if [ "`id -u`" = 0 ]; then \
+ echo "*** Error: Don't run 'make' or 'make check' as root."; \
+ exit 1; \
+ fi