summaryrefslogtreecommitdiffstats
path: root/libmount/python/Makemodule.am
blob: 89f756f6c971341b6e377d2bc3c50bb5bf233b78 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
if BUILD_PYLIBMOUNT

pylibmountexecdir = $(pyexecdir)/libmount

# Use a zz_ prefix to ensure this is last on `make install` (automake orders
# the entries in alphabetical order) since we need to ensure that the
# install-zz_pylibmountexecLTLIBRARIES step is only executed after the
# install-usrlib_execLTLIBRARIES step, otherwise libtool fails to find
# libmount under DESTDIR when it tries to relink pylibmount.so.
#
# Keep the pylibmountexecdir variable, in order to be backwards compatible with
# invocation of `make install` that override that variable in the command line.
zz_pylibmountexecdir = $(pylibmountexecdir)

# Please, don't use $pythondir for the scripts. We have to use the same
# directory for binary stuff as well as for the scripts otherwise it's
# not possible to install 32-bit and 64-bit version on the same system.
zz_pylibmountexec_LTLIBRARIES = pylibmount.la
zz_pylibmountexec_PYTHON = libmount/python/__init__.py

pylibmount_la_SOURCES = \
	libmount/python/pylibmount.c \
	libmount/python/pylibmount.h \
	libmount/python/fs.c \
	libmount/python/tab.c \
	libmount/python/context.c

pylibmount_la_LIBADD = libmount.la $(PYTHON_LIBS)

pylibmount_la_CFLAGS = \
	$(AM_CFLAGS) \
	$(PYTHON_CFLAGS) \
	-I$(ul_libmount_incdir) \
	-fno-strict-aliasing #-ggdb3 -O0

pylibmount_la_LDFLAGS = \
	-avoid-version -module -shared -export-dynamic

dist_check_SCRIPTS += libmount/python/test_mount_context.py
dist_check_SCRIPTS += libmount/python/test_mount_tab.py
dist_check_SCRIPTS += libmount/python/test_mount_tab_update.py

CLEANFILES += *.img

endif # BUILD_PYLIBMOUNT