mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
6ae3052c06
According to the automake manual, CPPFLAGS (aka INCLUDES, as spelled in automake 1.9.6) should only include -I, -D, and -U directives; more generic directives like -Wall belong in CFLAGS since they affect more phases of the build process. Therefore, we should be sticking CFLAGS additions into a CFLAGS container, not a CPPFLAGS container. * src/Makefile.am (libvirt_driver_vmware_la_CFLAGS): Use AM_CFLAGS. (INCLUDES): Move CFLAGS items... (AM_CFLAGS): ...to their proper location. * python/Makefile.am (INCLUDES, AM_CFLAGS): Likewise. * tests/Makefile.am (INCLUDES, AM_CFLAGS): Likewise. (commandtest_CFLAGS, commandhelper_CFLAGS) (virnetmessagetest_CFLAGS, virnetsockettest_CFLAGS): Use AM_CFLAGS.
84 lines
1.9 KiB
Makefile
84 lines
1.9 KiB
Makefile
# Makefile for libvirt python library
|
|
|
|
SUBDIRS= . tests
|
|
|
|
INCLUDES = \
|
|
$(PYTHON_INCLUDES) \
|
|
-I$(top_srcdir)/include \
|
|
-I$(top_builddir)/include \
|
|
-I$(top_builddir)/$(subdir)
|
|
|
|
AM_CFLAGS = $(WARN_CFLAGS)
|
|
|
|
DOCS_DIR = $(datadir)/doc/libvirt-python-$(LIBVIRT_VERSION)
|
|
|
|
DOCS = ${srcdir}/TODO
|
|
|
|
CLASSES_EXTRA = \
|
|
libvirt-override-virConnect.py \
|
|
libvirt-override-virStream.py
|
|
|
|
EXTRA_DIST = \
|
|
generator.py \
|
|
typewrappers.c \
|
|
typewrappers.h \
|
|
libvirt-override.c \
|
|
libvirt-override.py \
|
|
libvirt-override-api.xml \
|
|
$(CLASSES_EXTRA) \
|
|
$(DOCS)
|
|
|
|
if WITH_PYTHON
|
|
mylibs = $(top_builddir)/src/libvirt.la
|
|
|
|
all-local: libvirt.py
|
|
|
|
pyexec_LTLIBRARIES = libvirtmod.la
|
|
|
|
libvirtmod_la_SOURCES = libvirt-override.c typewrappers.c
|
|
nodist_libvirtmod_la_SOURCES = libvirt.c libvirt.h
|
|
# Python <= 2.4 header files contain a redundant decl, hence we
|
|
# need extra flags here
|
|
libvirtmod_la_CFLAGS = $(WARN_PYTHON_CFLAGS)
|
|
|
|
libvirtmod_la_LDFLAGS = -module -avoid-version -shared -L$(top_builddir)/src/.libs \
|
|
$(CYGWIN_EXTRA_LDFLAGS)
|
|
libvirtmod_la_LIBADD = $(mylibs) \
|
|
$(CYGWIN_EXTRA_LIBADD) $(CYGWIN_EXTRA_PYTHON_LIBADD)
|
|
|
|
GENERATE = generator.py
|
|
API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-override-api.xml
|
|
GENERATED= libvirt-export.c \
|
|
libvirt.c \
|
|
libvirt.h \
|
|
libvirt.py
|
|
|
|
generated.stamp: $(srcdir)/$(GENERATE) $(API_DESC)
|
|
$(PYTHON) $(srcdir)/$(GENERATE) $(PYTHON)
|
|
touch $@
|
|
|
|
$(GENERATED): generated.stamp
|
|
|
|
$(libvirtmod_la_OBJECTS): $(GENERATED)
|
|
|
|
install-data-local:
|
|
$(mkinstalldirs) $(DESTDIR)$(pyexecdir)
|
|
$(INSTALL) -m 0644 libvirt.py $(DESTDIR)$(pyexecdir)
|
|
$(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
|
|
@(for doc in $(DOCS) ; \
|
|
do $(INSTALL) -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
|
|
|
|
uninstall-local:
|
|
rm -f $(DESTDIR)$(pyexecdir)/libvirt.py
|
|
|
|
CLEANFILES= $(GENERATED) generated.stamp
|
|
|
|
else
|
|
all:
|
|
endif
|
|
|
|
dummy:
|
|
|
|
tests test: all dummy
|
|
-@(cd tests && $(MAKE) MAKEFLAGS+=--silent tests)
|