blob: e92a31a716d33f5da2c0958b4718dee280d12f97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
diff -Nur nvidia-persistenced-390.157.orig/Makefile nvidia-persistenced-390.157/Makefile
--- nvidia-persistenced-390.157.orig/Makefile 2022-10-12 05:30:58.000000000 -0400
+++ nvidia-persistenced-390.157/Makefile 2023-05-21 17:17:39.137443544 -0400
@@ -104,6 +104,17 @@
LIBS += -ldl
endif
+PKG_CONFIG ?= pkg-config
+
+USE_TIRPC ?= $(shell $(PKG_CONFIG) --exists libtirpc && echo 1)
+
+ifeq ($(USE_TIRPC),1)
+ TIRPC_LDFLAGS ?= $(shell $(PKG_CONFIG) --libs libtirpc)
+ TIRPC_CFLAGS ?= $(shell $(PKG_CONFIG) --cflags libtirpc)
+ $(call BUILD_OBJECT_LIST,$(SRC)): CFLAGS += $(TIRPC_CFLAGS)
+ LIBS += $(TIRPC_LDFLAGS)
+endif
+
##############################################################################
# build rules
##############################################################################
|