Added NM_CONFIG_DIR option to the Makefile (closes #68)
This should not be used in most cases, as it will break compatibility with existing mods which depend on adding a config to NM. This option is meant as a better option than find/replace for people who do private builds of NM for themselves and want to change the config dir. It will also affect the path used for installing the documentation and shown in the default menu item.
This commit is contained in:
12
Makefile
12
Makefile
@@ -5,7 +5,7 @@ override LIBRARY := src/libnm.so
|
||||
override SOURCES += src/action.c src/action_c.c src/action_cc.cc src/config.c src/generator.c src/generator_c.c src/kfmon.c src/nickelmenu.cc src/util.c
|
||||
override CFLAGS += -Wall -Wextra -Werror -fvisibility=hidden
|
||||
override CXXFLAGS += -Wall -Wextra -Werror -Wno-missing-field-initializers -isystemlib -fvisibility=hidden -fvisibility-inlines-hidden
|
||||
override KOBOROOT += res/doc:/mnt/onboard/.adds/nm/doc
|
||||
override KOBOROOT += res/doc:$(NM_CONFIG_DIR)/doc
|
||||
|
||||
override SKIPCONFIGURE += strip
|
||||
strip:
|
||||
@@ -16,4 +16,14 @@ ifeq ($(NM_UNINSTALL_CONFIGDIR),1)
|
||||
override CPPFLAGS += -DNM_UNINSTALL_CONFIGDIR
|
||||
endif
|
||||
|
||||
ifeq ($(NM_CONFIG_DIR),)
|
||||
override NM_CONFIG_DIR := /mnt/onboard/.adds/nm
|
||||
endif
|
||||
|
||||
ifneq ($(NM_CONFIG_DIR),/mnt/onboard/.adds/nm)
|
||||
$(info -- Warning: NM_CONFIG_DIR is set to a non-default value; this will cause issues with other mods using it!)
|
||||
endif
|
||||
|
||||
override CPPFLAGS += -DNM_CONFIG_DIR='"$(NM_CONFIG_DIR)"' -DNM_CONFIG_DIR_DISP='"$(patsubst /mnt/onboard/%,KOBOeReader/%,$(NM_CONFIG_DIR))"'
|
||||
|
||||
include NickelHook/NickelHook.mk
|
||||
|
||||
Reference in New Issue
Block a user