]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - keyboard/hhkb/Makefile
Merge pull request #164 from cub-uanic/patch-2
[max/tmk_keyboard.git] / keyboard / hhkb / Makefile
index c945467dd204f9bb5268d154881e663dba0139e9..dc5c06a948193f92afb1a04dcce9dc7ad25782c8 100644 (file)
@@ -121,11 +121,6 @@ NKRO_ENABLE = yes          # USB Nkey Rollover
 #HHKB_JP = yes                 # HHKB JP support
 
 
-ifdef HHKB_JP
-    OPT_DEFS += -DHHKB_JP
-endif
-
-
 #
 # Keymap file
 #
@@ -140,6 +135,11 @@ else
 endif
 
 
+ifneq (, $(or $(findstring keymap_jp.c, $(SRC)), $(findstring yes, $(HHKB_JP))))
+    OPT_DEFS += -DHHKB_JP
+endif
+
+
 # Search Path
 VPATH += $(TARGET_DIR)
 VPATH += $(TOP_DIR)
@@ -152,4 +152,5 @@ debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION
 debug-on: all
 
 debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT
+debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS))
 debug-off: all