summaryrefslogtreecommitdiff
path: root/mount/Makefile.am
blob: 87ff57b2156cd019d31ff39e262ac2a458ab6e64 (plain)
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
include $(top_srcdir)/config/include-Makefile.am

EXTRA_DIST = README.mount swap.configure

AM_CPPFLAGS += -DHAVE_NFS

bin_PROGRAMS = mount umount
sbin_PROGRAMS = losetup swapon
man_MANS = fstab.5 nfs.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8

MNTHDRS = fstab.h linux_fs.h mntent.h mount_constants.h my_dev_t.h paths.h \
	get_label_uuid.h lomount.h mount_blkid.h mount_guess_fstype.h \
	nfs_mount4.h realpath.h xmalloc.h getusername.h loop.h mount_by_label.h \
	mount_guess_rootdev.h nfsmount.h sundries.h 

mount_SOURCES = mount.c fstab.c sundries.c xmalloc.c realpath.c mntent.c \
	get_label_uuid.c mount_by_label.c mount_blkid.c mount_guess_fstype.c \
	getusername.c \
	nfsmount.c nfsmount_xdr.c nfsmount_clnt.c \
	lomount.c \
	$(MNTHDRS)

mount_LDADD = $(top_srcdir)/lib/libenv.a $(top_srcdir)/lib/libsetproctitle.a

umount_SOURCES = umount.c fstab.c sundries.c xmalloc.c realpath.c mntent.c \
	getusername.c get_label_uuid.c mount_by_label.c mount_blkid.c \
	lomount.c \
	$(MNTHDRS)
	
umount_LDADD = $(top_srcdir)/lib/libenv.a

swapon_SOURCES = swapon.c xmalloc.c \
	get_label_uuid.c mount_by_label.c mount_blkid.c \
	swap_constants.h

losetup_SOURCES = lomount.c loop.h lomount.h
losetup_CFLAGS = -DMAIN

if HAVE_BLKID
mount_LDADD += -lblkid -luuid
umount_LDADD += -lblkid -luuid
swapon_LDADD = -lblkid -luuid
endif

if HAVE_PIVOT_ROOT
sbin_PROGRAMS += pivot_root
man_MANS += pivot_root.8
endif


swapon.c: swapargs.h

swapargs.h:
	sh swap.configure

clean-local:
	rm -f swapargs.h


install-exec-hook:
	chmod 4755 $(DESTDIR)$(bindir)/mount
	chmod 4755 $(DESTDIR)$(bindir)/umount
	cd $(DESTDIR)$(sbindir) && ln -sf swapon swapoff