Skip to content

Commit

Permalink
buildsys: synthesize special rules for modules, since they have to be…
Browse files Browse the repository at this point in the history
… linked and compiled in one pass
  • Loading branch information
kaniini committed Apr 20, 2012
1 parent 2fc8859 commit 8e63d93
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions buildsys.module.mk
Expand Up @@ -7,8 +7,10 @@ PLUGIN=${SRCS:.c=$(PLUGIN_SUFFIX)}
all: $(PLUGIN)
install: $(PLUGIN)

phase_cmd_cc_plugin = CompileModule
phase_cmd_cc_module = CompileModule
quiet_cmd_cc_module = $@
cmd_cc_module = ${CC} ${CFLAGS} ${PLUGIN_CFLAGS} ${CPPFLAGS} ${PLUGIN_LDFLAGS} ${LDFLAGS} -o $@ $< ${LIBS}

.c$(PLUGIN_SUFFIX):
$(call echo-cmd,cmd_cc_plugin)
$(cmd_cc_plugin)
$(call echo-cmd,cmd_cc_module)
$(cmd_cc_module)

0 comments on commit 8e63d93

Please sign in to comment.