diff options
author | William Wilgus <wilgus.william@gmail.com> | 2021-11-12 20:50:20 -0500 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2021-11-22 21:39:45 -0500 |
commit | b39acee3abd199d80b84c68ebfa7301b7e7a957e (patch) | |
tree | 5e0ed2b152acd41d4b7e8335f31ba8b65d6e5f06 /apps/plugins/plugins.make | |
parent | 3d07ec46eed738e6dac6109598766f6568ac4669 (diff) | |
download | rockbox-b39acee3abd199d80b84c68ebfa7301b7e7a957e.tar.gz rockbox-b39acee3abd199d80b84c68ebfa7301b7e7a957e.zip |
rb_info plugin and button,action+context name helper
rb_info is just a test plugin
just some info from the running rockbox install
the real star here is the generator scripts to make actions_helper.c and button_helper.c
Change-Id: I23f7bbdae3f2cffca2490c4df40bb13b0b5d5064
Diffstat (limited to 'apps/plugins/plugins.make')
-rw-r--r-- | apps/plugins/plugins.make | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/apps/plugins/plugins.make b/apps/plugins/plugins.make index ac94a04c59..b430bd2792 100644 --- a/apps/plugins/plugins.make +++ b/apps/plugins/plugins.make | |||
@@ -101,8 +101,35 @@ else | |||
101 | PLUGINLIBFLAGS = $(PLUGINFLAGS) -ffunction-sections -fdata-sections | 101 | PLUGINLIBFLAGS = $(PLUGINFLAGS) -ffunction-sections -fdata-sections |
102 | endif | 102 | endif |
103 | 103 | ||
104 | ROOT_PLUGINSLIB_DIR := $(ROOTDIR)/apps/plugins/lib | ||
105 | BUILD_PLUGINSLIB_DIR := $(BUILDDIR)/apps/plugins/lib | ||
106 | |||
107 | # action_helper # | ||
108 | ACTION_REQ := $(addprefix $(ROOT_PLUGINSLIB_DIR)/,action_helper.pl action_helper.h) \ | ||
109 | $(BUILD_PLUGINSLIB_DIR)/pluginlib_actions.o | ||
110 | |||
111 | # special rule for generating and compiling action_helper | ||
112 | $(BUILD_PLUGINSLIB_DIR)/action_helper.o: $(ACTION_REQ) | ||
113 | $(SILENT)mkdir -p $(dir $@) | ||
114 | $(call PRINTS,GEN $(@F))$(CC) $(PLUGINFLAGS) $(INCLUDES) -E -P \ | ||
115 | $(ROOT_PLUGINSLIB_DIR)/pluginlib_actions.h - < /dev/null | $< > $(basename $@).c | ||
116 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(ROOT_PLUGINSLIB_DIR) \ | ||
117 | $(PLUGINLIBFLAGS) -c $(basename $@).c -o $@ | ||
118 | |||
119 | # button_helper # | ||
120 | BUTTON_REQ := $(addprefix $(ROOT_PLUGINSLIB_DIR)/,button_helper.pl button_helper.h) \ | ||
121 | $(BUILD_PLUGINSLIB_DIR)/action_helper.o | ||
122 | |||
123 | # special rule for generating and compiling button_helper | ||
124 | $(BUILD_PLUGINSLIB_DIR)/button_helper.o: $(BUTTON_REQ) $(ROOTDIR)/firmware/export/button.h | ||
125 | $(SILENT)mkdir -p $(dir $@) | ||
126 | $(call PRINTS,GEN $(@F))$(CC) $(PLUGINFLAGS) $(INCLUDES) -dM -E -P \ | ||
127 | $(addprefix -include ,button-target.h button.h) - < /dev/null | $< > $(basename $@).c | ||
128 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(ROOT_PLUGINSLIB_DIR) \ | ||
129 | $(PLUGINLIBFLAGS) -c $(basename $@).c -o $@ | ||
130 | |||
104 | # special pattern rule for compiling plugin lib (with function and data sections) | 131 | # special pattern rule for compiling plugin lib (with function and data sections) |
105 | $(BUILDDIR)/apps/plugins/lib/%.o: $(ROOTDIR)/apps/plugins/lib/%.c | 132 | $(BUILD_PLUGINSLIB_DIR)/%.o: $(ROOT_PLUGINSLIB_DIR)/%.c |
106 | $(SILENT)mkdir -p $(dir $@) | 133 | $(SILENT)mkdir -p $(dir $@) |
107 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PLUGINLIBFLAGS) -c $< -o $@ | 134 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PLUGINLIBFLAGS) -c $< -o $@ |
108 | 135 | ||