-
Notifications
You must be signed in to change notification settings - Fork 56
/
Makefile.am
41 lines (35 loc) · 1.05 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
# SPDX-License-Identifier: BSD-2-Clause
# SPDX-License-Identifier: LGPL-3.0-or-later
#
# Copyright (c) 2009-2014, HGST, Inc. All rights reserved.
# Copyright (c) 2020 Western Digital Corporation or its affiliates.
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = lib tools
if BUILD_TEST
SUBDIRS += test/programs
endif
EXTRA_DIST = autogen.sh \
README.md \
LICENSES/BSD-2-Clause.txt \
LICENSES/LGPL-3.0-or-later.txt
if BUILDING_RPM
rpmdir = $(abs_top_builddir)/rpmbuild
EXTRA_DIST += libzbc.spec
RPMARCH=`$(RPM) --eval %_target_cpu`
rpm: dist
@echo "Building RPM packages..."
@mkdir -p $(rpmdir)
$(RPMBUILD) -ta --clean \
-D "_topdir $(rpmdir)" \
-D "pkg_name $(PACKAGE_NAME)" \
-D "pkg_version $(PACKAGE_VERSION)" \
libzbc-$(PACKAGE_VERSION).tar.gz
@mv -f $(rpmdir)/RPMS/$(RPMARCH)/*.rpm $(abs_top_builddir)
@mv -f $(rpmdir)/SRPMS/*.rpm $(abs_top_builddir)
@rm -rf $(rpmdir)
@rm -f libzbc-$(PACKAGE_VERSION).tar.gz
else
rpm:
@echo "Building RPM packages requires rpmbuild and rpm utilities"
exit 1
endif