Skip to content

Commit

Permalink
Ooops, forgot the module magic
Browse files Browse the repository at this point in the history
  • Loading branch information
alyx committed Nov 12, 2011
1 parent 114812d commit 6290c17
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions buildsys.module.mk
@@ -0,0 +1,20 @@
# Additional extensions for building single-file modules.

.SUFFIXES: $(PLUGIN_SUFFIX)

plugindir = ${MODDIR}/modules/$(MODULE)
PLUGIN=${SRCS:.c=$(PLUGIN_SUFFIX)}

install: $(PLUGIN)

.c$(PLUGIN_SUFFIX):
${COMPILE_STATUS}
if ${CC} -MMD -MP ${CFLAGS} ${PLUGIN_CFLAGS} ${CPPFLAGS} ${PLUGIN_LDFLAGS} ${LDFLAGS} -o $@ $< ${LIBS}; then \
${COMPILE_OK}; \
else \
${COMPILE_FAILED}; \
fi

COMPILE_OK = printf "\033[K\033[0;32mSuccessfully compiled \033[1;32m$<\033[0;32m as \033[1;32m$@\033[0;32m.\033[0m\n"

-include *.d

0 comments on commit 6290c17

Please sign in to comment.