forked from jasmin-j/media-build-dkms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (27 loc) · 910 Bytes
/
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
#/usr/bin/make
SRC = $(DESTDIR)/usr/src
SHARE = $(DESTDIR)/usr/share/$(NAME)-dkms
FORCE = $(DESTDIR)/usr/share/dkms/modules_to_force_install/$(NAME)
all:
clean:
install:
#source tree
ifeq ("$(wildcard $(NAME)-$(VERSION))", "$(NAME)-$(VERSION)")
install -d "$(SRC)"
cp -a $(NAME)-$(VERSION) $(SRC)
endif
#module required forced installation
ifeq ("$(wildcard force_module_install)", "force_module_install")
install -d "$(dir $(FORCE))"
install -m 644 force_module_install $(FORCE)
endif
#tarball, possibly with binaries
ifeq ("$(wildcard $(NAME)-$(VERSION).dkms.tar.gz)", "$(NAME)-$(VERSION).dkms.tar.gz")
install -d "$(SHARE)"
install -m 644 $(NAME)-$(VERSION).dkms.tar.gz "$(SHARE)"
endif
#postinst, only if we are supporting legacy mode
ifeq ("$(wildcard common.postinst)", "common.postinst")
install -d "$(SHARE)"
install -m 755 $(PREFIX)/usr/lib/dkms/common.postinst $(SHARE)/postinst
endif