forked from sheepdog/sheepdog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
76 lines (55 loc) · 1.63 KB
/
Makefile.am
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
SPEC = $(PACKAGE_NAME).spec
TARFILE = $(PACKAGE_NAME)-$(VERSION).tar.gz
EXTRA_DIST = autogen.sh
AUTOMAKE_OPTIONS = foreign
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure depcomp \
config.guess config.sub missing install-sh \
autoheader automake autoconf config.status \
config.log
dist_doc_DATA =
sheepdogsysconfdir = ${SHEEPDOGCONFDIR}
sheepdogsysconf_DATA =
SUBDIRS = lib collie sheep include script man
if BUILD_SHEEPFS
SUBDIRS += sheepfs
endif
install-exec-local:
$(INSTALL) -d $(DESTDIR)/${localstatedir}/lib/sheepdog
uninstall-local:
rmdir $(DESTDIR)/${localstatedir}/lib/sheepdog || :;
dist-clean-local:
rm -f autoconf automake autoheader
clean-generic:
rm -rf $(SPEC) $(TARFILE) cscope*
find -name '*.orig' -or -name '*.rej' | xargs rm -f
cscope:
@echo create cscope.out
@find -name '*.[ch]' > cscope.files
@cscope -bq
$(SPEC): $(SPEC).in
rm -f $@-t $@
LC_ALL=C date="$(shell date "+%a %b %d %Y")" && \
sed \
-e "s#@version@#$(VERSION)#g" \
-e "s#@date@#$$date#g" \
$< > $@-t
chmod a-w $@-t
mv $@-t $@
RPMBUILDOPTS = --define "_sourcedir $(abs_builddir)" \
--define "_specdir $(abs_builddir)" \
--define "_builddir $(abs_builddir)" \
--define "_srcrpmdir $(abs_builddir)" \
--define "_rpmdir $(abs_builddir)"
$(TARFILE):
$(MAKE) dist
srpm: clean
$(MAKE) $(SPEC) $(TARFILE)
rpmbuild $(RPMBUILDOPTS) --nodeps -bs $(SPEC)
rpm: clean
$(MAKE) $(SPEC) $(TARFILE)
rpmbuild $(RPMBUILDOPTS) -ba $(SPEC)
CGCC=cgcc
CGCC_CFLAGS=-Wbitwise -Wno-return-void $(ARCH)
sparse-check: ARCH=$(shell sh script/checkarch.sh)
sparse-check:
$(MAKE) CC=$(CGCC) CFLAGS="$(CFLAGS) $(CGCC_CFLAGS)"