summaryrefslogtreecommitdiffstats
path: root/mount-deprecated/Makemodule.am
blob: 03fe51341e596dc71f58c08b65b6609e55be9a65 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
if BUILD_MOUNT

bin_PROGRAMS += mount umount
dist_man_MANS += \
	mount-deprecated/mount.8 \
	mount-deprecated/umount.8

mount_common_sources = \
	mount-deprecated/sundries.c \
	mount-deprecated/sundries.h \
	mount-deprecated/fstab.h \
	mount-deprecated/mount_mntent.h \
	mount-deprecated/mount_constants.h \
	mount-deprecated/getusername.h \
	mount-deprecated/fsprobe.h \
	mount-deprecated/devname.c \
	mount-deprecated/devname.h \
	mount-deprecated/fstab.c \
	mount-deprecated/getusername.c \
	mount-deprecated/mount_mntent.c \
	mount-deprecated/fsprobe.c \
	\
	lib/canonicalize.c \
	lib/at.c \
	lib/blkdev.c \
	lib/env.c \
	lib/linux_version.c \
	lib/loopdev.c \
	lib/mangle.c \
	lib/strutils.c \
	lib/xgetpass.c \
	lib/sysfs.c

mount_SOURCES = \
	mount-deprecated/mount.c \
	$(mount_common_sources) \
	lib/setproctitle.c
mount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) -I$(ul_libblkid_incdir)
mount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
mount_LDADD = libblkid.la

umount_SOURCES = \
	mount-deprecated/umount.c \
	$(mount_common_sources)
umount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) -I$(ul_libblkid_incdir)
umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
umount_LDADD = libblkid.la



mount_static_LDADD =

if HAVE_STATIC_MOUNT
bin_PROGRAMS += mount.static
mount_static_SOURCES = $(mount_SOURCES)
mount_static_CFLAGS = $(mount_CFLAGS)
mount_static_LDFLAGS = -all-static
mount_static_LDADD += libblkid.la
endif

if HAVE_STATIC_UMOUNT
bin_PROGRAMS += umount.static
umount_static_SOURCES = $(umount_SOURCES)
umount_static_CFLAGS = $(umount_CFLAGS)
umount_static_LDFLAGS = -all-static
umount_static_LDADD = libblkid.la
endif

if HAVE_SELINUX
mount_LDADD += $(SELINUX_LIBS)
mount_static_LDADD += $(SELINUX_LIBS_STATIC)
endif

# hybrid mount -- old mount + new code from libmount for mtab management
#
if BUILD_LIBMOUNT_MOUNT
mount_LDADD += libmount.la
mount_CFLAGS += $(AM_CFLAGS) -I$(ul_libmount_incdir)
umount_LDADD += libmount.la
umount_CFLAGS += $(AM_CFLAGS) -I$(ul_libmount_incdir)
if HAVE_STATIC_MOUNT
mount_static_LDADD += libmount.la
mount_static_CFLAGS += -I$(ul_libmount_incdir)
endif
if HAVE_STATIC_UMOUNT
umount_static_LDADD += libmount.la
umount_static_CFLAGS += -I$(ul_libmount_incdir)
endif
endif

if MAKEINSTALL_DO_SETUID
install-exec-hook-mount:
	chmod 4755 $(DESTDIR)$(bindir)/mount
	chmod 4755 $(DESTDIR)$(bindir)/umount

INSTALL_EXEC_HOOKS += install-exec-hook-mount
endif

endif # BUILD_MOUNT