xref: /dragonfly/gnu/sbin/lvm/Makefile (revision 7d2302ac)
1#	$NetBSD: Makefile,v 1.7 2009/12/01 23:12:51 haad Exp $
2
3PROG=		lvm
4
5LVM2_DIR=	${.CURDIR}/../../../contrib/lvm2/dist
6LIBDM_DIR=	${LVM2_DIR}/libdm
7
8.PATH:		${LVM2_DIR}/tools
9SRCS=		dumpconfig.c formats.c lvchange.c lvconvert.c lvcreate.c \
10		lvdisplay.c lvextend.c lvmchange.c lvmcmdline.c \
11		lvmdiskscan.c lvreduce.c lvremove.c lvrename.c lvresize.c \
12		lvscan.c polldaemon.c pvchange.c pvck.c pvcreate.c \
13		pvdisplay.c pvmove.c pvremove.c pvresize.c pvscan.c \
14		reporter.c segtypes.c toollib.c vgcfgbackup.c \
15		vgcfgrestore.c vgchange.c vgck.c vgconvert.c vgcreate.c \
16		vgdisplay.c vgexport.c vgextend.c vgimport.c vgmerge.c \
17		vgmknodes.c vgreduce.c vgremove.c vgrename.c vgscan.c \
18		vgsplit.c lvm.c
19
20CFLAGS+=	-I${LVM2_DIR}/lib -I${LVM2_DIR}/include \
21		-I. -I${LVM2_DIR}/tools -I${LIBDM_DIR}
22CFLAGS+=	-DLVM_SHARED_PATH=\"${BINDIR}/lvm\"
23
24LDADD+=		-llvm -ldevmapper -lprop -ldevattr
25DPADD+=		${LIBLVM} ${LIBDEVMAPPER} ${LIBPROP} ${LIBDEVATTR}
26
27# Some parts of the code can't be protected because if its
28# alloca() usage.
29#
30.if defined(USE_SSP)
31CFLAGS+=	-Wno-stack-protector
32.endif
33
34# Do not build readline support for the rescue version.
35#
36.if !defined(RESCUE)
37CFLAGS+=	-DREADLINE_SUPPORT
38# libedit api change for lvm.c
39CFLAGS+=	-DCPPFunction=rl_completion_func_t
40CFLAGS+=	${PRIVATELIB_CFLAGS}
41DPADD+=		${LIBEDIT} ${LIBNCURSES}
42LDADD+=		-lprivate_edit -lprivate_ncurses
43LDFLAGS+=	${PRIVATELIB_LDFLAGS}
44.endif
45
46.PATH:		${LVM2_DIR}/man
47MAN= 		lvchange.8 lvconvert.8 lvcreate.8 lvdisplay.8 lvextend.8 \
48		lvm.8 lvm.conf.5 lvmchange.8 lvmdiskscan.8 lvmdump.8 \
49		lvreduce.8 lvremove.8 lvrename.8 lvresize.8 lvs.8 \
50		lvscan.8 pvchange.8 pvck.8 pvcreate.8 pvdisplay.8 \
51		pvmove.8 pvremove.8 pvresize.8 pvs.8 pvscan.8 \
52		vgcfgbackup.8 vgcfgrestore.8 vgchange.8 vgck.8 vgconvert.8 \
53		vgcreate.8 vgdisplay.8 vgexport.8 vgextend.8 vgimport.8 \
54		vgmerge.8 vgmknodes.8 vgreduce.8 vgremove.8 vgrename.8 \
55		vgs.8 vgscan.8 vgsplit.8
56
57SYMLINKS+=	lvm ${BINDIR}/lvchange \
58		lvm ${BINDIR}/lvconvert \
59		lvm ${BINDIR}/lvcreate \
60		lvm ${BINDIR}/lvdisplay \
61		lvm ${BINDIR}/lvextend \
62		lvm ${BINDIR}/lvmchange \
63		lvm ${BINDIR}/lvmdiskscan \
64		lvm ${BINDIR}/lvmdump \
65		lvm ${BINDIR}/lvreduce \
66		lvm ${BINDIR}/lvremove \
67		lvm ${BINDIR}/lvrename \
68		lvm ${BINDIR}/lvresize \
69		lvm ${BINDIR}/lvs \
70		lvm ${BINDIR}/lvscan \
71		lvm ${BINDIR}/pvchange \
72		lvm ${BINDIR}/pvck \
73		lvm ${BINDIR}/pvcreate \
74		lvm ${BINDIR}/pvdisplay \
75		lvm ${BINDIR}/pvmove \
76		lvm ${BINDIR}/pvremove \
77		lvm ${BINDIR}/pvresize \
78		lvm ${BINDIR}/pvs \
79		lvm ${BINDIR}/pvscan \
80		lvm ${BINDIR}/vgcfgbackup \
81		lvm ${BINDIR}/vgcfgrestore \
82		lvm ${BINDIR}/vgchange \
83		lvm ${BINDIR}/vgck \
84		lvm ${BINDIR}/vgconvert \
85		lvm ${BINDIR}/vgcreate \
86		lvm ${BINDIR}/vgdisplay \
87		lvm ${BINDIR}/vgexport \
88		lvm ${BINDIR}/vgextend \
89		lvm ${BINDIR}/vgimport \
90		lvm ${BINDIR}/vgmerge \
91		lvm ${BINDIR}/vgmknodes \
92		lvm ${BINDIR}/vgreduce \
93		lvm ${BINDIR}/vgremove \
94		lvm ${BINDIR}/vgrename \
95		lvm ${BINDIR}/vgs \
96		lvm ${BINDIR}/vgscan \
97		lvm ${BINDIR}/vgsplit
98
99.include <bsd.prog.mk>
100