changing how computed includes are handled
parent
5b83e1f630
commit
1c6d31f012
|
@ -9,5 +9,14 @@
|
|||
* ------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#include MAKEFILE_KEYBOARD
|
||||
#undef _str
|
||||
#undef _expstr
|
||||
#undef _inc
|
||||
#define _str(s) #s // stringify
|
||||
#define _expstr(s) _str(s) // expand -> stringify
|
||||
#define _inc _expstr(keyboard/MAKEFILE_KEYBOARD.h) // inc(lude)
|
||||
#include _inc
|
||||
#undef _str
|
||||
#undef _expstr
|
||||
#undef _inc
|
||||
|
||||
|
|
|
@ -16,7 +16,18 @@
|
|||
|
||||
#include "matrix.h" // for number of rows and columns
|
||||
|
||||
#include MAKEFILE_KEYBOARD_LAYOUT // for number of layers
|
||||
// include the appropriate keyboard layout header;
|
||||
// for number of layers
|
||||
#undef _str
|
||||
#undef _expstr
|
||||
#undef _inc
|
||||
#define _str(s) #s // stringify
|
||||
#define _expstr(s) _str(s) // expand -> stringify
|
||||
#define _inc _expstr(layout/MAKEFILE_KEYBOARD_LAYOUT.h) // inc(lude)
|
||||
#include _inc
|
||||
#undef _str
|
||||
#undef _expstr
|
||||
#undef _inc
|
||||
|
||||
extern uint8_t
|
||||
kb_layout [KB_LAYERS][KB_ROWS][KB_COLUMNS];
|
||||
|
|
|
@ -10,11 +10,14 @@
|
|||
* ------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#define str(s) #s // stringify
|
||||
#define expstr(s) str(s) // expand -> stringify
|
||||
#define inc expstr(_twi/MAKEFILE_BOARD.h) // inc(lude)
|
||||
#include inc
|
||||
#undef str
|
||||
#undef expstr
|
||||
#undef inc
|
||||
#undef _str
|
||||
#undef _expstr
|
||||
#undef _inc
|
||||
#define _str(s) #s // stringify
|
||||
#define _expstr(s) _str(s) // expand -> stringify
|
||||
#define _inc _expstr(_twi/MAKEFILE_BOARD.h) // inc(lude)
|
||||
#include _inc
|
||||
#undef _str
|
||||
#undef _expstr
|
||||
#undef _inc
|
||||
|
||||
|
|
|
@ -48,8 +48,8 @@ CFLAGS += -DF_CPU=16000000 # processor frequency; must match initialization
|
|||
CFLAGS += -I. # search for includes in the current directory
|
||||
# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
CFLAGS += -DMAKEFILE_BOARD='$(strip $(BOARD))'
|
||||
CFLAGS += -DMAKEFILE_KEYBOARD='"keyboard/$(strip $(KEYBOARD)).h"'
|
||||
CFLAGS += -DMAKEFILE_KEYBOARD_LAYOUT='"layout/$(strip $(LAYOUT)).h"'
|
||||
CFLAGS += -DMAKEFILE_KEYBOARD='$(strip $(KEYBOARD))'
|
||||
CFLAGS += -DMAKEFILE_KEYBOARD_LAYOUT='$(strip $(LAYOUT))'
|
||||
# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
CFLAGS += -std=gnu99 # use C99 plus GCC extensions
|
||||
CFLAGS += -Os # optimize for size
|
||||
|
|
Loading…
Reference in New Issue