New Paste

 

Recent Pastes

Administrate




Pastebin on paste.luisaranguren.com

PasteID: 43
Pasted by Anonymous, 2017-03-08 12:25:49 GMT
Expires Never
Paste size 2.5 Kb
Tools Raw   Download
 
  1. ifneq (,$(wildcard /etc/os-release)) 
  2. OS_NAME = "$(shell sed -n 's/^ID=\(.*\)/\1/p' /etc/os-release | tr -d '\"')" 
  3. OS_VERSION = $(shell sed -n 's/^VERSION_ID=\(.*\)/\1/p' /etc/os-release) 
  4. else ifneq (,$(wildcard /etc/redhat-release)) 
  5. OS_NAME = "rhel" 
  6. OS_VERSION = "$(shell sed -n -e 's/[^0-9]*\([0-9]*.[0-9]*\).*/\1/p' /etc/redhat-release)" 
  7. else 
  8. OS_NAME = "unknown" 
  9. OS_VERSION = "0.0" 
  10. endif 
  11.  
  12. ifeq ("centos",$(OS_NAME)) 
  13. OS_NAME = "rhel" 
  14. OS_VERSION = "$(shell sed -n -e 's/[^0-9]*\([0-9]*.[0-9]*\).*/\1/p' /etc/centos-release-upstream)" 
  15. endif 
  16.  
  17. ifeq ("rhel",$(OS_NAME)) 
  18. subdir-ccflags-y += -DOS_NAME_RHEL 
  19. else ifeq ("ubuntu",$(OS_NAME)) 
  20. subdir-ccflags-y += -DOS_NAME_UBUNTU 
  21. else ifeq ("steamos",$(OS_NAME)) 
  22. subdir-ccflags-y += -DOS_NAME_STEAMOS 
  23. else ifeq ("sled",$(OS_NAME)) 
  24. subdir-ccflags-y += -DOS_NAME_SLE 
  25. else ifeq ("sles",$(OS_NAME)) 
  26. subdir-ccflags-y += -DOS_NAME_SLE 
  27. else ifeq ("arch",$(OS_NAME)) 
  28. subdir-ccflags-y += -DOS_NAME_ARCH 
  29. OS_VERSION = "0.0" 
  30. else 
  31. subdir-ccflags-y += -DOS_NAME_UNKNOWN 
  32. endif 
  33.  
  34. subdir-ccflags-y += \ 
  35. 	-DOS_VERSION_MAJOR=$(shell echo $(OS_VERSION).0 | cut -d. -f1) \ 
  36. 	-DOS_VERSION_MINOR=$(shell echo $(OS_VERSION).0 | cut -d. -f2) 
  37.  
  38. ifeq ($(OS_NAME),"ubuntu") 
  39. OS_BUILD_NUM = $(shell echo $(KERNELRELEASE) | cut -d '-' -f 2) 
  40. subdir-ccflags-y += -DUBUNTU_BUILD_NUM=$(OS_BUILD_NUM) 
  41. ifeq ($(OS_VERSION),"14.04") 
  42. subdir-ccflags-y += -DOS_NAME_UBUNTU_1404 
  43. else 
  44. subdir-ccflags-y += -DOS_NAME_UBUNTU_1604 
  45. endif 
  46. endif 
  47.  
  48. ifeq ($(OS_NAME),"rhel") 
  49. ifeq ($(OS_VERSION),"6.8") 
  50. subdir-ccflags-y += -DOS_NAME_RHEL_6 
  51. else ifeq ($(OS_VERSION),"7.2") 
  52. subdir-ccflags-y += -DOS_NAME_RHEL_7_2 
  53. else ifeq ($(OS_VERSION),"7.3") 
  54. subdir-ccflags-y += -DOS_NAME_RHEL_7_3 
  55. endif 
  56. subdir-ccflags-y += \ 
  57. 	-include /usr/src/kernels/$(KERNELRELEASE)/include/drm/drm_backport.h 
  58. endif 
  59.  
  60. DKMS_INCLUDE_PREFIX = \ 
  61. 	-I$(src)/include \ 
  62. 	-I$(src)/include/drm \ 
  63. 	-I$(src)/include/uapi \ 
  64. 	-include $(src)/include/rename_symbol.h 
  65.  
  66. export OS_NAME OS_VERSION DKMS_INCLUDE_PREFIX 
  67.  
  68. export CONFIG_DRM_TTM=m 
  69. export CONFIG_DRM_AMDGPU=m 
  70. export BUILD_AS_DKMS=y 
  71. export CONFIG_DRM_AMDGPU_CIK=y 
  72. export CONFIG_DRM_AMDGPU_SI=y 
  73. export CONFIG_DRM_AMDGPU_USERPTR=y 
  74. export CONFIG_DRM_AMD_POWERPLAY=y 
  75. export CONFIG_DRM_AMD_DC=y 
  76.  
  77. subdir-ccflags-y += -DBUILD_AS_DKMS 
  78. subdir-ccflags-y += -DCONFIG_DRM_AMDGPU_CIK 
  79. subdir-ccflags-y += -DCONFIG_DRM_AMDGPU_SI 
  80. subdir-ccflags-y += -DCONFIG_DRM_AMDGPU_USERPTR 
  81. subdir-ccflags-y += -DCONFIG_DRM_AMD_POWERPLAY 
  82. subdir-ccflags-y += -DCONFIG_DRM_AMD_DC=y 
  83.  
  84. obj-m += amd/amdgpu/ ttm/ amd/amdkcl/ 
  85.  
 
 
 
 
Written by Xan Manning, 2010.