]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - converter/ps2_usb/Makefile.vusb
Merge branch 'action_fix'
[qmk_firmware.git] / converter / ps2_usb / Makefile.vusb
index 4d5240c30948f44b20484d3b126945b1b85b0994..ddf186845949d997322028b3c4423314914c0f44 100644 (file)
@@ -1,8 +1,3 @@
-#
-# Makefile for V-USB
-#
-
-
 # Target file name (without extension).
 TARGET = ps2_usb_vusb
 
@@ -13,18 +8,26 @@ TOP_DIR = ../..
 TARGET_DIR = .
 
 # keyboard dependent files
-SRC =  main.c \
-       keymap.c \
+SRC = keymap_common.c \
        matrix.c \
-       led.c \
-       ps2_usart.c
+       led.c
+
+ifdef KEYMAP
+    SRC := keymap_$(KEYMAP).c $(SRC)
+else
+    SRC := keymap_plain.c $(SRC)
+endif
+
+# Use USART for PS/2. With V-USB INT and BUSYWAIT code is not useful.
+SRC += protocol/ps2_usart.c
+OPT_DEFS += -DPS2_USE_USART
 
-CONFIG_H = config_vusb.h
+CONFIG_H = config.h
 
 
 # V-USB debug level: To use ps2_usart.c level must be 0
 # ps2_usart.c requires USART to receive PS/2 signal.
-OPT_DEFS = -DDEBUG_LEVEL=0
+OPT_DEFS += -DDEBUG_LEVEL=0
 
 
 # MCU name, you MUST set this to match the board you are using
@@ -85,8 +88,20 @@ AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
 PROGRAM_CMD = $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
 
 
+# Boot Section Size in bytes
+#   Teensy halfKay   512
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBasp           2048
+OPT_DEFS += -DBOOTLOADER_SIZE=2048
+
+
+# Search Path
+VPATH += $(TARGET_DIR)
+VPATH += $(TOP_DIR)
+
 
-include $(TOP_DIR)/protocol/vusb.mk
 include $(TOP_DIR)/protocol.mk
 include $(TOP_DIR)/common.mk
+include $(TOP_DIR)/protocol/vusb.mk
 include $(TOP_DIR)/rules.mk