rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / openindiana / nvidia-390 / Makefile
blobd075e45c34c0759c4c24d99d38953ff2c01be6d5
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"). You may
4 # only use this file in accordance with the terms of the CDDL.
6 # A full copy of the text of the CDDL should have accompanied this
7 # source. A copy of the CDDL is also available via the Internet at
8 # http://www.illumos.org/license/CDDL.
12 # Copyright 2012, Andrzej Szeszo
13 # Copyright 2019, Michal Nowak
16 BUILD_STYLE = archive
17 BUILD_BITS = NO_ARCH
19 include ../../../make-rules/shared-macros.mk
21 # This is NVIDIA Legacy GPU driver
23 COMPONENT_MJR_VERSION = 390
24 COMPONENT_NAME = nvidia-$(COMPONENT_MJR_VERSION)
25 COMPONENT_VERSION = $(COMPONENT_MJR_VERSION).157
26 COMPONENT_FMRI = driver/graphics/nvidia-$(COMPONENT_MJR_VERSION)
27 COMPONENT_SUMMARY = NVIDIA Graphics System Software
28 COMPONENT_CLASSIFICATION = Drivers/Display
29 COMPONENT_PROJECT_URL = https://www.nvidia.com/en-us/drivers/unix/
30 COMPONENT_SRC = NVIDIA-Solaris-x86-$(HUMAN_VERSION)
31 COMPONENT_ARCHIVE = $(COMPONENT_SRC).run
32 COMPONENT_ARCHIVE_HASH = sha256:db240ddeff130faeb2dd7a0c5599b659b065e8cd463f18ec8e72e528a1d2735c
33 COMPONENT_ARCHIVE_URL = https://us.download.nvidia.com/solaris/$(HUMAN_VERSION)/$(COMPONENT_ARCHIVE)
34 COMPONENT_LICENSE = NVIDIA
35 COMPONENT_LICENSE_FILE = nvidia.license
37 BUILD_TARGET = $(BUILD_$(MK_BITS))
38 INSTALL_TARGET = $(INSTALL_$(MK_BITS))
39 TEST_TARGET = $(NO_TESTS)
41 include $(WS_MAKE_RULES)/common.mk
43 CLEAN_PATHS += $(BUILD_DIR)
45 # Hack to run proper unpack command
46 UNPACK := $(SHELL) $(USERLAND_ARCHIVES)$(COMPONENT_ARCHIVE)
47 UNPACK_ARGS = -x
48 USERLAND_ARCHIVES = \#
50 $(BUILD_$(MK_BITS)): $(SOURCE_DIR)/.prep
51 ($(RM) -rf $(@D) ; $(MKDIR) $(@D))
52 $(TOUCH) $@
54 $(INSTALL_$(MK_BITS)): $(BUILD_$(MK_BITS))
55 $(MKDIR) $(PROTO_DIR)/kernel/drv/amd64
56 for i in kernel/drv/amd64/nvidia kernel/drv/nvidia.conf kernel/drv/nvidia_modeset.conf kernel/drv/amd64/nvidia_modeset; do \
57 $(CP) $(SOURCE_DIR)/NVDAgraphicsr/reloc/$$i $(PROTO_DIR)/$$i; done
58 $(RM) -r $(PROTO_DIR)/usr
59 $(CP) -a $(SOURCE_DIR)/NVDAgraphics/reloc $(PROTO_DIR)/usr
60 $(CHMOD) u+w $(PROTO_DIR)/usr/X11/lib/modules/NVIDIA/libnvidia-wfb.so.1
61 $(CHMOD) u+w $(PROTO_DIR)/usr/X11/lib/modules/NVIDIA/$(MACH64)/libnvidia-wfb.so.1
62 /usr/bin/elfedit -e "dyn:rpath $(GCC_ROOT)/lib:/lib:/usr/lib" $(PROTO_DIR)/usr/X11/lib/modules/NVIDIA/libnvidia-wfb.so.1
63 /usr/bin/elfedit -e "dyn:rpath $(GCC_ROOT)/lib/$(MACH64):/lib/$(MACH64):/usr/lib/$(MACH64)" $(PROTO_DIR)/usr/X11/lib/modules/NVIDIA/$(MACH64)/libnvidia-wfb.so.1
64 $(TOUCH) $@
66 GENERATE_EXTRA_CMD += | \
67 $(CAT) - <( \
68 eval $$($(GNU_GREP) ^A $(SOURCE_DIR)/NVDAgraphicsr/install/postinstall) ; \
69 printf 'driver name=nvidia_modeset perms="* 0666 root root"\n' ; \
70 printf 'driver name=nvidia perms="* 0666 root root"' ; \
71 for i in $$ALIASES ; do \
72 printf ' \\\n\talias=%s' "$$i" ; \
73 done ; \
74 printf '\n' \
77 # Auto-generated dependencies
78 REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG)
79 REQUIRED_PACKAGES += library/desktop/atk
80 REQUIRED_PACKAGES += library/desktop/gdk-pixbuf
81 REQUIRED_PACKAGES += library/desktop/gtk2
82 REQUIRED_PACKAGES += library/desktop/pango
83 REQUIRED_PACKAGES += library/glib2
84 REQUIRED_PACKAGES += shell/ksh93
85 REQUIRED_PACKAGES += SUNWcs
86 REQUIRED_PACKAGES += system/library
87 REQUIRED_PACKAGES += system/library/math
88 REQUIRED_PACKAGES += x11/compatibility/links-xorg
89 REQUIRED_PACKAGES += x11/library/libx11
90 REQUIRED_PACKAGES += x11/library/libxext