2 PERL5DIR
=${DESTDIR}/usr
/share
/perl5
4 MAN
=${DESTDIR}/usr
/share
/man
5 BASHCOMPLETION
=${DESTDIR}/usr
/share
/bash-completion
/completions
6 ZSHCOMPLETION
=${DESTDIR}/usr
/share
/zsh
/vendor-completions
8 PERL_VENDORARCH
=$(shell perl
-MConfig
-e
'print $$Config{vendorarch};')
9 PVE_VENDORARCH
=${DESTDIR}/${PERL_VENDORARCH}/auto
/PVE
/IPCC
13 SUBDIRS
=Cluster CLI API2
14 SOURCES
=IPCC.pm Cluster.pm Corosync.pm RRD.pm DataCenterConfig.pm
19 install: pvecm
${SOURCES} IPCC.so pvecm
.1 pvecm.bash-completion pvecm.zsh-completion datacenter.cfg
.5
20 install -D
-m
0755 pvecm
${DESTDIR}/usr
/bin
/pvecm
22 for f in
${SOURCES}; do
install -m
0664 $$f ${PVEDIR}/$$f; done
23 install -D IPCC.so
${PVE_VENDORARCH}/IPCC.so
24 install -D pvecm
.1 ${MAN}/man1
/pvecm
.1
25 install -D datacenter.cfg
.5 ${MAN}/man5
/datacenter.cfg
.5
26 install -m
0644 -D pvecm.bash-completion
${BASHCOMPLETION}/pvecm
27 install -m
0644 -D pvecm.zsh-completion
${ZSHCOMPLETION}/_pvecm
28 for d in
${SUBDIRS}; do
$(MAKE
) -C
$$d install; done
31 perl
${PERL_DOC_INC} -T
-e
"use PVE::CLI::$*; PVE::CLI::$*->generate_bash_completions();" >$@.tmp
35 perl
${PERL_DOC_INC} -T
-e
"use PVE::CLI::$*; PVE::CLI::$*->generate_zsh_completions();" >$@.tmp
39 $(MAKE
) -C Cluster IPCConst.pm
41 check: IPCC.so Cluster
/IPCConst.pm
42 perl
${PERL_DOC_INC} -T
-e
"use PVE::CLI::pvecm; PVE::CLI::pvecm->verify_api();"
45 CFLAGS
+= -fPIC
-Wl
,-z
,relro
-Wall
-Werror
-Wno-strict-aliasing
-g
-O2
-shared
46 CFLAGS
+= $(shell perl
-MExtUtils
::Embed
-e perl_inc
)
47 LDFLAGS
= $(shell pkg-config
--libs libqb
)
50 $(CC
) $(CFLAGS
) -c
-o
$@
$<
52 IPCC.c
: IPCC.xs ppport.h
53 xsubpp
-noversioncheck IPCC.xs
> IPCC.xsc
57 $(CC
) ${CFLAGS} ${LDFLAGS} -shared
-o
$@
$<
60 -include /usr
/share
/pve-doc-generator
/pve-doc-generator.mk
64 $(MAKE
) cleanup-docgen
65 rm -f IPCC.so IPCC.o IPCC.c pvecm.bash-completion pvecm.zsh-completion
66 for d in
${SUBDIRS}; do
$(MAKE
) -C
$$d clean; done