summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 19 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5c87fc7..885955f 100644
--- a/Makefile
+++ b/Makefile
@@ -38,10 +38,13 @@ NCURSES_CFLAGS ?=
NCURSES_LDFLAGS ?=
NCURSES6_CFLAGS ?=
NCURSES6_LDFLAGS ?=
+NCURSESW6_CFLAGS ?=
+NCURSESW6_LDFLAGS ?=
PCI_CFLAGS ?=
PCI_LDFLAGS ?=
BUILD_NCURSES6 = $(if $(NCURSES6_CFLAGS)$(NCURSES6_LDFLAGS),1,)
+BUILD_NCURSESW6 = $(if $(NCURSESW6_CFLAGS)$(NCURSESW6_LDFLAGS),1,)
##############################################################################
# assign variables
@@ -70,6 +73,9 @@ NCURSES_UI_SO_C = $(OUTPUTDIR)/g_$(notdir $(NCURSES_UI_SO:.so=.c))
NCURSES6_UI_O = $(OUTPUTDIR)/ncurses6-ui.o
NCURSES6_UI_SO = $(OUTPUTDIR)/nvidia-installer-ncurses6-ui.so
NCURSES6_UI_SO_C = $(OUTPUTDIR)/g_$(notdir $(NCURSES6_UI_SO:.so=.c))
+NCURSESW6_UI_O = $(OUTPUTDIR)/ncursesw6-ui.o
+NCURSESW6_UI_SO = $(OUTPUTDIR)/nvidia-installer-ncursesw6-ui.so
+NCURSESW6_UI_SO_C = $(OUTPUTDIR)/g_$(notdir $(NCURSESW6_UI_SO:.so=.c))
ifneq ($(NEED_TLS_TEST),)
TLS_TEST_C = $(OUTPUTDIR)/g_tls_test.c
@@ -143,7 +149,9 @@ SRC += $(addprefix $(COMMON_UTILS_DIR)/,$(COMMON_UTILS_SRC))
NCURSES_UI_SO_SRC = $(NCURSES_UI_SO_C)
NCURSES_UI_SO_SRC += $(if $(BUILD_NCURSES6),$(NCURSES6_UI_SO_C),)
+NCURSES_UI_SO_SRC += $(if $(BUILD_NCURSESW6),$(NCURSESW6_UI_SO_C),)
CFLAGS += $(if $(BUILD_NCURSES6),-DNV_INSTALLER_NCURSES6,)
+CFLAGS += $(if $(BUILD_NCURSESW6),-DNV_INSTALLER_NCURSESW6,)
INSTALLER_SRC = $(SRC) $(NCURSES_UI_SO_SRC) $(TLS_TEST_C) $(TLS_TEST_DSO_C) \
$(RTLD_TEST_C) $(COMPAT_32_SRC) $(STAMP_C)
@@ -240,12 +248,19 @@ $(NCURSES6_UI_SO): $(NCURSES6_UI_O)
$(call quiet_cmd,LINK) -shared $(NCURSES6_LDFLAGS) \
$(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) $< -o $@ -lncurses $(LIBS)
+$(NCURSESW6_UI_SO): $(NCURSESW6_UI_O)
+ $(call quiet_cmd,LINK) -shared $(NCURSESW6_LDFLAGS) \
+ $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) $< -o $@ -lncursesw $(LIBS)
+
$(NCURSES_UI_SO_C): $(GEN_UI_ARRAY) $(NCURSES_UI_SO)
$(call quiet_cmd,GEN_UI_ARRAY) $(NCURSES_UI_SO) ncurses_ui_array > $@
$(NCURSES6_UI_SO_C): $(GEN_UI_ARRAY) $(NCURSES6_UI_SO)
$(call quiet_cmd,GEN_UI_ARRAY) $(NCURSES6_UI_SO) ncurses6_ui_array > $@
+$(NCURSESW6_UI_SO_C): $(GEN_UI_ARRAY) $(NCURSESW6_UI_SO)
+ $(call quiet_cmd,GEN_UI_ARRAY) $(NCURSESW6_UI_SO) ncursesw6_ui_array > $@
+
ifneq ($(NEED_TLS_TEST),)
$(TLS_TEST_C): $(GEN_UI_ARRAY) $(TLS_TEST)
$(call quiet_cmd,GEN_UI_ARRAY) $(TLS_TEST) tls_test_array > $@
@@ -274,13 +289,15 @@ $(call BUILD_OBJECT_LIST,misc.c): CFLAGS += $(PCI_CFLAGS)
# ncurses-ui.c includes ncurses.h
$(NCURSES_UI_O): CFLAGS += $(NCURSES_CFLAGS)
$(NCURSES6_UI_O): CFLAGS += $(NCURSES6_CFLAGS)
+$(NCURSESW6_UI_O): CFLAGS += $(NCURSESW6_CFLAGS)
# build the ncurses ui DSO as position-indpendent code
-$(NCURSES_UI_O) $(NCURSES6_UI_O): CFLAGS += -fPIC
+$(NCURSES_UI_O) $(NCURSES6_UI_O) $(NCURSESW6_UI_O): CFLAGS += -fPIC
# define the rule to build each object file
$(foreach src,$(ALL_SRC),$(eval $(call DEFINE_OBJECT_RULE,TARGET,$(src))))
$(eval $(call DEFINE_OBJECT_RULE_WITH_OBJECT_NAME,TARGET,$(NCURSES_UI_C),$(NCURSES6_UI_O)))
+$(eval $(call DEFINE_OBJECT_RULE_WITH_OBJECT_NAME,TARGET,$(NCURSES_UI_C),$(NCURSESW6_UI_O)))
# define a rule to build each makeself-help-script object file
$(foreach src,$(MAKESELF_HELP_SCRIPT_SRC),\
@@ -300,7 +317,7 @@ $(CONFIG_H): $(VERSION_MK)
@ $(ECHO) -n "#define PROGRAM_NAME " >> $@
@ $(ECHO) "\"$(NVIDIA_INSTALLER_PROGRAM_NAME)\"" >> $@
-$(call BUILD_OBJECT_LIST,$(ALL_SRC)) $(NCURSES6_UI_O): $(CONFIG_H)
+$(call BUILD_OBJECT_LIST,$(ALL_SRC)) $(NCURSES6_UI_O) $(NCURSESW6_UI_O): $(CONFIG_H)
$(call BUILD_MAKESELF_OBJECT_LIST,$(MAKESELF_HELP_SCRIPT_SRC)): $(CONFIG_H)
clean clobber: