X-Git-Url: https://git.donarmstrong.com/?p=kiibohd-controller.git;a=blobdiff_plain;f=CMakeLists.txt;h=3b88e93b2b55e752b76e81cf03096efa987e7cb3;hp=304fde5800ae19f9c1f04082950014e7c8b788e8;hb=0013d7a4f31d35ad054369037e20b683085c6116;hpb=8a66563622a9c9f7d322860bd36e0e7b84abb184 diff --git a/CMakeLists.txt b/CMakeLists.txt index 304fde5..3b88e93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ ###| CMAKE Kiibohd Controller |### # -# Jacob Alexander 2011-2014 +# Jacob Alexander 2011-2015 # Due to this file's usefulness: # # Released into the Public Domain @@ -17,20 +17,37 @@ #| You _MUST_ clean the build directory if you change this value #| set( CHIP -# "at90usb162" # Teensy 1.0 (avr) -# "atmega32u4" # Teensy 2.0 (avr) -# "at90usb646" # Teensy++ 1.0 (avr) - "at90usb1286" # Teensy++ 2.0 (avr) -# "mk20dx128" # Teensy 3.0 (arm) -# "mk20dx256" # Teensy 3.1 (arm) -) +# "at90usb162" # Teensy 1.0 (avr) +# "atmega32u4" # Teensy 2.0 (avr) +# "at90usb646" # Teensy++ 1.0 (avr) +# "at90usb1286" # Teensy++ 2.0 (avr) +# "mk20dx128" # Teensy 3.0 (arm) + "mk20dx128vlf5" # McHCK mk20dx128vlf5 +# "mk20dx256" # Teensy 3.1 (arm) +# "mk20dx256vlh7" # Kiibohd-dfu mk20dx256vlh7 + CACHE STRING "Microcontroller Chip" ) + + + +### +# Compiler Selection +# + +#| *** EXPERIMENTAL *** +#| Stick with gcc unless you know what you're doing +#| Currently only arm is supported with clang +set( COMPILER + "gcc" # arm-none-eabi-gcc / avr-gcc - Default +# "clang" # arm-none-eabi + CACHE STRING "Compiler Type" ) ### # Compiler Intialization # -include( Lib/CMake/initialize.cmake ) +set ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/Lib/CMake ) +include( initialize ) @@ -46,34 +63,62 @@ include( Lib/CMake/initialize.cmake ) #| Please look at the {Scan,Macro,Output,Debug} for information on the modules and how to create new ones ##| Deals with acquiring the keypress information and turning it into a key index -set( ScanModule "DPH" ) +set( ScanModule "MD1" + CACHE STRING "Scan Module" ) ##| Provides the mapping functions for DefaultMap and handles any macro processing before sending to the OutputModule -set( MacroModule "PartialMap" ) +set( MacroModule "PartialMap" + CACHE STRING "Macro Module" ) ##| Sends the current list of usb key codes through USB HID -set( OutputModule "pjrcUSB" ) +set( OutputModule "pjrcUSB" + CACHE STRING "Output Module" ) ##| Debugging source to use, each module has it's own set of defines that it sets -set( DebugModule "full" ) +set( DebugModule "full" + CACHE STRING "Debug Module" ) ### -# Keymap Configuration (XXX - Not worky yet, currently ignored) +# Keymap Configuration (do not include the .kll extension) # -##| If there are multiple DefaultMaps, it is defined here. If, the specified DefaultMap is not found, defaultMap.h is used. -set( DefaultMap "kishsaver" ) +#| Do not include the .kll extension +#| * BaseMap maps the native keyboard scan codes to USB Codes so the layout is compatible with all other layouts +#| * DefaultMap allows the default keymap to be modified from the BaseMap +#| * PartialMaps is a set of dynamically set layers (there is no limit, but too many may use up too much RAM...) +#| BaseMap generally does not need to be changed from "defaultMap" +#| +#| Syntax: +#| myMap +#| * defines a single .kll layout file, double-quotes are needed to distinguish between layers +#| "myMap specialLayer" +#| * defines myMap to be the main layout, then replace specialLayers on top of it +#| +#| - Only for PartialMaps - +#| "myMap specialLayer" "myMap colemak" dvorak +#| * As before, but also generates a second layer at index 2 and third at index 3 +#| +#| NOTE: Remember to add key(s) to enable each Partial Layer +#| NOTE2: Layers are always based up the BaseMap (which should be an ANSI-like mapping) +#| NOTE3: Compiler looks in kll/layouts and the build directory for layout files (precedence on build directory) -##| PartialMap combined keymap layering. The first keymap has the "least" precedence. -set( CombinedMap colemak capslock2ctrl ) +##| Set the base keyboard .kll map, defaults to "defaultMap" if not found +##| Looks in Scan/ for the available BaseMaps +##| TODO Support layering in basemap +set( BaseMap "defaultMap" + CACHE STRING "KLL BaseMap/Scancode Keymapping" ) -##| ParitalMaps available on top of the CombinedMap. If there are input conflicts, the last PartialMap takes precedence. -set( PartialMaps hhkbnav kbdctrl ) +##| Layer additonal .kll maps on the BaseMap, layers are in order from 1st to nth +##| Can be set to "" +set( DefaultMap "md1Overlay stdFuncMap" + CACHE STRING "KLL DefaultMap" ) -##| MacroSets define extra capabilities that are not provided by the Scan or Output modules. Last MacroSet takes precedence. -set( MacroSets retype ) +##| ParitalMaps available on top of the BaseMap. See above for syntax on specifying multiple layers vs. layering +##| Can be set to "" +set( PartialMaps "hhkbpro2" + CACHE STRING "KLL PartialMaps/Layer Definitions" ) @@ -104,5 +149,7 @@ cmake_minimum_required( VERSION 2.8 ) ### # Module Initialization / Compilation / Targets # -include( Lib/CMake/modules.cmake ) +include( modules ) +include( kll ) # Generate kll layouts if necessary +include( build )