forked from intel-gpu/intel-gpu-i915-backports
-
Notifications
You must be signed in to change notification settings - Fork 30
/
Makefile.real
165 lines (141 loc) · 4.26 KB
/
Makefile.real
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
include versions
export BACKPORTS_RELEASE_TAG DII_KERNEL_HEAD BASE_KERNEL_NAME DII_KERNEL_TAG
ifdef BACKPORTS_GIT_TRACKED
export BACKPORTS_GIT_TRACKER_DEF=-DBACKPORTS_GIT_TRACKED=\"$(BACKPORTS_GIT_TRACKED)\"
else
export BACKPORTS_GIT_TRACKER_DEF=
endif
# disable built-in rules for this file
.SUFFIXES:
export CONFIG_=CPTCFG_
.PHONY: menuconfig
menuconfig:
@$(MAKE) -C kconf mconf
@./kconf/mconf Kconfig
.PHONY: listnewconfig oldaskconfig oldconfig \
silentoldconfig olddefconfig oldnoconfig \
allnoconfig allyesconfig allmodconfig \
alldefconfig randconfig
listnewconfig oldaskconfig oldconfig \
silentoldconfig olddefconfig oldnoconfig \
allnoconfig allyesconfig allmodconfig \
alldefconfig randconfig:
@$(MAKE) -C kconf conf
@./kconf/conf --$@ Kconfig
.PHONY: usedefconfig
usedefconfig:
@$(MAKE) -C kconf conf
@./kconf/conf --defconfig=defconfig Kconfig
.PHONY:updateconfig
updateconfig:
ifeq ($(BUILD_CONFIG), disabledisplay)
sed -i 's/CPTCFG_DRM_I915_DISPLAY=y/CPTCFG_DRM_I915_DISPLAY=n/g' .config
endif
.PHONY: savedefconfig
savedefconfig:
@$(MAKE) -C kconf conf
@./kconf/conf --savedefconfig=defconfig Kconfig
defconfig-%::
@$(MAKE) -C kconf conf
@./kconf/conf --defconfig=defconfigs/$(@:defconfig-%=%) Kconfig
.config:
@test -f defconfig && $(MAKE) usedefconfig || ( \
echo "/--------------" ;\
echo "| Your backport package isn't configured, please configure it" ;\
echo "| using one of the following options:" ;\
echo "| To configure manually:" ;\
echo "| make oldconfig" ;\
echo "| make menuconfig" ;\
echo "|" ;\
echo "| To get defaults for certain drivers:" ;\
(cd defconfigs ; for f in $$(ls) ; do \
echo "| make defconfig-$$f" ;\
done ) ;\
echo "\--" ;\
false )
backport-include/backport/autoconf.h: .config Kconfig.versions Kconfig.kernel
@$(MAKE) oldconfig
@echo -n "Building backport-include/backport/autoconf.h ..."
@grep -f local-symbols .config | ( \
echo "#ifndef COMPAT_AUTOCONF_INCLUDED" ;\
echo "#define COMPAT_AUTOCONF_INCLUDED" ;\
echo "/*" ;\
echo " * Automatically generated file, don't edit!" ;\
echo " * Changes will be overwritten" ;\
echo " */" ;\
echo "" ;\
while read l ; do \
n=$${l%%=*} ;\
v=$${l#*=} ;\
case $$v in \
y) echo "#define $$n 1" ;; \
m) echo "#define $${n}_MODULE 1" ;; \
\"*) echo "#define $$n $$v" ;; \
[0-9]*) echo "#define $$n $$v" ;; \
*) echo "#warning unknown value for $$n";;\
esac ;\
done ;\
echo "#endif /* COMPAT_AUTOCONF_INCLUDED */" ;\
) > backport-include/backport/autoconf.h
@echo " done."
.PHONY: modules
modules: backport-include/backport/autoconf.h
@$(MAKE) -f Makefile.backport modules
@$(MAKE) -f Makefile.build modules
.PHONY: install
install: modules
@$(MAKE) -C $(KLIB_BUILD) M=$(BACKPORT_DIR) \
INSTALL_MOD_DIR=$(KMODDIR) $(KMODPATH_ARG) \
modules_install 2> /dev/null
@./scripts/blacklist.sh $(KLIB)/ $(KLIB)/$(KMODDIR)
@./scripts/compress_modules.sh $(KLIB)/$(KMODDIR)
@./scripts/check_depmod.sh
@/sbin/depmod -a
@./scripts/update-initramfs.sh $(KLIB)
@echo
@echo Your backported driver modules should be installed now.
@echo Reboot.
@echo
.PHONY: modules_install
modules_install: install
.PHONY: uninstall
uninstall:
@./scripts/uninstall.sh
@/sbin/depmod -a
@./scripts/update-initramfs.sh $(KLIB)
@echo
@echo Your backported driver modules should be uninstalled now.
@echo Reboot.
@echo
.PHONY: clean
clean:
@$(MAKE) -f Makefile.build clean
@$(MAKE) -C kconf clean
@$(MAKE) -f Makefile.backport clean
.PHONY: mrproper
mrproper:
@$(MAKE) -f Makefile.backport mrproper
.PHONY: dmadkmsrpm-pkg
dmadkmsrpm-pkg:
@$(MAKE) -f Makefile.backport dmadkmsrpm-pkg
.PHONY: i915dkmsrpm-pkg
i915dkmsrpm-pkg:
@$(MAKE) -f Makefile.backport i915dkmsrpm-pkg
.PHONY: dkmsrpm-pkg
dkmsrpm-pkg:
@$(MAKE) -f Makefile.backport dmadkmsrpm-pkg i915dkmsrpm-pkg
.PHONY: binrpm-pkg
binrpm-pkg:
@$(MAKE) -f Makefile.backport binrpm-pkg
.PHONY: dmadkmsdeb-pkg
dmadkmsdeb-pkg:
@$(MAKE) -f Makefile.backport dmadkmsdeb-pkg
.PHONY: i915dkmsdeb-pkg
i915dkmsdeb-pkg:
@$(MAKE) -f Makefile.backport i915dkmsdeb-pkg
.PHONY: dkmsdeb-pkg
dkmsdeb-pkg:
@$(MAKE) -f Makefile.backport dkmsdeb-pkg
.PHONY: bindeb-pkg
bindeb-pkg:
@$(MAKE) -f Makefile.backport bindeb-pkg