]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - keyboard/hhkb/Makefile
Fix dfu-programmer parameters
[max/tmk_keyboard.git] / keyboard / hhkb / Makefile
index 5cf02d194ec05c9a87d2324f3818dfce5491feef..2f87d42fb7147e348c3f54016136febc49adc8ce 100644 (file)
@@ -42,7 +42,7 @@
 TARGET = hhkb_lufa
 
 # Directory common source filess exist
-TOP_DIR = ../..
+TMK_DIR = ../../tmk_core
 
 # Directory keyboard dependent files exist
 TARGET_DIR = .
@@ -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,13 +135,18 @@ 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)
+VPATH += $(TMK_DIR)
 
-include $(TOP_DIR)/protocol/lufa.mk
-include $(TOP_DIR)/common.mk
-include $(TOP_DIR)/rules.mk
+include $(TMK_DIR)/protocol/lufa.mk
+include $(TMK_DIR)/common.mk
+include $(TMK_DIR)/rules.mk
 
 debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION
 debug-on: all