diff --git a/Makefile b/Makefile index 557dad5..f271eaa 100644 --- a/Makefile +++ b/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 diff --git a/res/doc b/res/doc index ee501f6..889f2b0 100644 --- a/res/doc +++ b/res/doc @@ -7,10 +7,9 @@ # it has a lot of error checking, and a failsafe mechanism which automatically # uninstalls it as a last resort. # -# Place your configuration files in this folder (/mnt/onboard/.adds/nm). They -# can be named anything, and should consist of multiple lines either starting -# with # for a comment, or in one of the the following formats (spaces around -# fields are ignored): +# Place your configuration files in this folder. They can be named anything, and +# should consist of multiple lines either starting with # for a comment, or in +# one of the the following formats (spaces around fields are ignored): # # menu_item::