Enable parallel tests.
[hoomd-blue.git] / packaging / Makefile
blob5fde55eb184afdb8143f23ba63355a180670f13e
1 default:
3 # This Makefile presumes that the spec file is located in ./SPECS/$SPECFILE
4 SPECFILE = hoomd.spec
5 # should we get a Working Directory from cmake instead?
6 WD ?= $(shell pwd)
8 RPMBUILD_ARGS = --define "_topdir $(WD)/rpmbuild"
9 RPMBUILD_ARGS += --define 'debug_package %{nil}'
11 # automatically specify settings appropriate to a tagged build
12 ifneq ($(origin TAGVER), undefined)
13 RPMBUILD_ARGS += --define "version $(TAGVER)"
14 RPMBUILD_ARGS += --define "refspec v$(TAGVER)"
15 RPMBUILD_ARGS += --define "release 0"
16 endif
18 # allow direct specification of the version, refspec, and release number
19 ifneq ($(origin VERSION), undefined)
20 RPMBUILD_ARGS += --define "version $(VERSION)"
21 endif
22 ifneq ($(origin REFSPEC), undefined)
23 RPMBUILD_ARGS += --define "refspec $(REFSPEC)"
24 endif
25 ifneq ($(origin RELEASE), undefined)
26 RPMBUILD_ARGS += --define "release $(RELEASE)"
27 endif
28 ifneq ($(origin QUIET),undefined)
29 RPMBUILD_ARGS += --quiet
30 endif
32 rpm:
33 #prepare build environment
34 mkdir -p rpmbuild/{SPECS,SOURCES,RPMS,SRPMS,BUILD}
35 cp SPECS/$(SPECFILE) rpmbuild/SPECS/
36 #call package builder
37 PATH=$$PATH:/usr/local/cuda/bin rpmbuild -ba $(RPMBUILD_ARGS) $(WD)/rpmbuild/SPECS/$(SPECFILE)
39 clean:
40 rm -rf rpmbuild