forked from RemixVSL/iomemory-vsl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (35 loc) · 1.04 KB
/
Makefile
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
all: help
.PHONY: dkms
dkms: clean
cd root/usr/src/$(shell ls root/usr/src) && \
$(MAKE) dkms
.PHONY: dpkg
dpkg: clean patch_module_version
# patch fio_version, fio_short_version in debian/fio_values
cd $(shell git rev-parse --show-toplevel) && \
dpkg-buildpackage -rfakeroot --no-check-builddeps --no-sign
.PHONY: rpm
rpm: clean patch_module_version
# patch fio_version in fio-driver.spec
mkdir -p ~/rpmbuild/SOURCES && \
tar -zcvf ~/rpmbuild/SOURCES/iomemory-vsl-3.2.16.1732.tar.gz \
--transform s/iomemory-vsl/iomemory-vsl-3.2.16.1732/ \
../iomemory-vsl && \
cd $(shell git rev-parse --show-toplevel) && \
rpmbuild -ba fio-driver.spec
.PHONY: module
module: clean
cd root/usr/src/$(shell ls root/usr/src) && \
$(MAKE) gpl
clean:
cd root/usr/src/$(shell ls root/usr/src) && \
$(MAKE) clean
patch_module_version:
cd root/usr/src/$(shell ls root/usr/src) && \
$(MAKE) patch_module_version
define usage
@echo Stub for making dkms, dpkg, the module and clean
@echo usage: make "(dkms|dpkg|rpm|module|clean)"
endef
help:
$(usage)