forked from mellanox-hpc/libibprof
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
60 lines (48 loc) · 1.22 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
# Copyright (c) 2013-2015 Mellanox Technologies, Inc.
# All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
EXTRA_DIST = \
README \
LICENSE \
NEWS \
debian \
$(PACKAGE).pc.in
SUBDIRS = src
docdir=$(prefix)
dist_doc_DATA = README
ACLOCAL_FLAGS = -I config/m4
pkgconfigdir=$(libdir)/pkgconfig
pkgconfig_DATA=$(PACKAGE).pc
rpmspec = $(PACKAGE).spec
rpmmacros =\
--define='_rpmdir $(PWD)/rpm-dist'\
--define='_srcrpmdir $(PWD)/rpm-dist'\
--define='_sourcedir $(PWD)'\
--define='_specdir $(PWD)'\
--define='_builddir $(PWD)'
rpmopts = --nodeps --buildroot='$(PWD)/_rpm'
rpmcheck:
@which rpmbuild &> /dev/null; \
if [ $$? -ne 0 ]; then \
echo "*** This make target requires an rpm-based linux distribution."; \
(exit 1); exit 1; \
fi
-mkdir -p rpm-dist
srcrpm: distcheck rpmcheck $(rpmspec)
rpmbuild -bs $(rpmmacros) $(rpmopts) $(rpmspec); \
if [ $$? -ne 0 ]; then \
(exit 1); exit 1; \
fi
binrpm: distcheck rpmcheck $(rpmspec)
rpmbuild -bb $(rpmmacros) $(rpmopts) $(rpmspec); \
if [ $$? -ne 0 ]; then \
(exit 1); exit 1; \
fi
rpms: binrpm srcrpm
pack:
./autogen.sh && ./configure && make dist