From 9791919c9b88bd3d6041eee8e3fd71d401684d20 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 12 Aug 2017 21:53:59 -0400 Subject: [PATCH] include variables and .h files as pp directives --- build_keyboard.mk | 5 ++++- keyboards/planck/planck.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build_keyboard.mk b/build_keyboard.mk index 3ec389ac9f..cb482dd012 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -157,7 +157,10 @@ endif OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT) $(KEYMAP_OUTPUT)_SRC := $(SRC) -$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) $(GFXDEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\" +$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) $(GFXDEFS) \ +-DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(KEYBOARD).h\" \ +-DQMK_KEYMAP=\"$(KEYMAP)\" -DQMK_KEYMAP_H=\"$(KEYMAP).h\" \ +-DQMK_SUBPROJECT=\"$(SUBPROJECT)\" -DQMK_SUBPROJECT_H=\"$(SUBPROJECT).h\" $(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H) $(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC) $(GFXSRC) diff --git a/keyboards/planck/planck.c b/keyboards/planck/planck.c index 3980b02f50..caef2fe5fa 100644 --- a/keyboards/planck/planck.c +++ b/keyboards/planck/planck.c @@ -1,4 +1,4 @@ -#include "planck.h" +#include QMK_KEYBOARD_H #ifdef ONEHAND_ENABLE __attribute__ ((weak))