MicroBit as BLE gamepad
Dependencies: BLE_API mbed-dev-bin nRF51822
Fork of microbit-dal by
source/CMakeLists.txt@37:b624ae5e94a5, 2016-07-13 (annotated)
- Committer:
- LancasterUniversity
- Date:
- Wed Jul 13 12:18:16 2016 +0100
- Revision:
- 37:b624ae5e94a5
- Parent:
- 35:8ce23bc1af38
- Child:
- 49:88f03f3feff1
Synchronized with git rev 7443b783
Author: Joe Finney
Fix typos
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jonathan Austin |
1:8aa5cdb4ab67 | 1 | # This file is no longer auto-generated to make the repository builds with GCC |
Jonathan Austin |
1:8aa5cdb4ab67 | 2 | # and ARMCC no matter what. |
Jonathan Austin |
1:8aa5cdb4ab67 | 3 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 4 | cmake_minimum_required(VERSION 2.8.12) |
Jonathan Austin |
1:8aa5cdb4ab67 | 5 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 6 | enable_language(ASM) |
Jonathan Austin |
1:8aa5cdb4ab67 | 7 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 8 | set(YOTTA_AUTO_MICROBIT-DAL_CPP_FILES |
Jonathan Austin |
1:8aa5cdb4ab67 | 9 | "core/MemberFunctionCallback.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 10 | "core/MicroBitCompat.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 11 | "core/MicroBitDevice.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 12 | "core/MicroBitFiber.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 13 | "core/MicroBitFont.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 14 | "core/MicroBitHeapAllocator.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 15 | "core/MicroBitListener.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 16 | "core/MicroBitSystemTimer.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 17 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 18 | "types/ManagedString.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 19 | "types/Matrix4.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 20 | "types/MicroBitEvent.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 21 | "types/MicroBitImage.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 22 | "types/PacketBuffer.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 23 | "types/RefCounted.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 24 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 25 | "drivers/DynamicPwm.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 26 | "drivers/MicroBitAccelerometer.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 27 | "drivers/MicroBitButton.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 28 | "drivers/MicroBitCompass.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 29 | "drivers/MicroBitCompassCalibrator.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 30 | "drivers/MicroBitDisplay.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 31 | "drivers/MicroBitI2C.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 32 | "drivers/MicroBitIO.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 33 | "drivers/MicroBitLightSensor.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 34 | "drivers/MicroBitMessageBus.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 35 | "drivers/MicroBitMultiButton.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 36 | "drivers/MicroBitPin.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 37 | "drivers/MicroBitRadio.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 38 | "drivers/MicroBitRadioDatagram.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 39 | "drivers/MicroBitRadioEvent.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 40 | "drivers/MicroBitSerial.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 41 | "drivers/MicroBitStorage.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 42 | "drivers/MicroBitThermometer.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 43 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 44 | "bluetooth/MicroBitAccelerometerService.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 45 | "bluetooth/MicroBitBLEManager.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 46 | "bluetooth/MicroBitButtonService.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 47 | "bluetooth/MicroBitDFUService.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 48 | "bluetooth/MicroBitEventService.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 49 | "bluetooth/MicroBitIOPinService.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 50 | "bluetooth/MicroBitLEDService.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 51 | "bluetooth/MicroBitMagnetometerService.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 52 | "bluetooth/MicroBitTemperatureService.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 53 | "bluetooth/MicroBitUARTService.cpp" |
Jonathan Austin |
1:8aa5cdb4ab67 | 54 | ) |
Jonathan Austin |
1:8aa5cdb4ab67 | 55 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 56 | execute_process(WORKING_DIRECTORY "../../yotta_modules/${PROJECT_NAME}" COMMAND "git" "log" "--pretty=format:%h" "-n" "1" OUTPUT_VARIABLE git_hash) |
Jonathan Austin |
1:8aa5cdb4ab67 | 57 | execute_process(WORKING_DIRECTORY "../../yotta_modules/${PROJECT_NAME}" COMMAND "git" "rev-parse" "--abbrev-ref" "HEAD" OUTPUT_VARIABLE git_branch OUTPUT_STRIP_TRAILING_WHITESPACE) |
Jonathan Austin |
1:8aa5cdb4ab67 | 58 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 59 | if ("${git_branch}" STREQUAL "master") |
Jonathan Austin |
1:8aa5cdb4ab67 | 60 | set(MICROBIT_DAL_VERSION_STRING "${YOTTA_MICROBIT_DAL_VERSION_STRING}") |
Jonathan Austin |
1:8aa5cdb4ab67 | 61 | else() |
Jonathan Austin |
1:8aa5cdb4ab67 | 62 | set(MICROBIT_DAL_VERSION_STRING "${YOTTA_MICROBIT_DAL_VERSION_STRING}-${git_branch}-g${git_hash}") |
Jonathan Austin |
1:8aa5cdb4ab67 | 63 | endif() |
Jonathan Austin |
1:8aa5cdb4ab67 | 64 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 65 | set(MICROBIT_DAL_VERSION_FLAGS "-DMICROBIT_DAL_VERSION=\\\"${MICROBIT_DAL_VERSION_STRING}\\\"") |
Jonathan Austin |
1:8aa5cdb4ab67 | 66 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 67 | set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MICROBIT_DAL_VERSION_FLAGS}") |
Jonathan Austin |
1:8aa5cdb4ab67 | 68 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 69 | if (YOTTA_CFG_MICROBIT_CONFIGFILE) |
Jonathan Austin |
1:8aa5cdb4ab67 | 70 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${YOTTA_FORCE_INCLUDE_FLAG} \"${YOTTA_CFG_MICROBIT_CONFIGFILE}\"") |
Jonathan Austin |
1:8aa5cdb4ab67 | 71 | endif () |
Jonathan Austin |
1:8aa5cdb4ab67 | 72 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 73 | if(CMAKE_COMPILER_IS_GNUCC) |
Jonathan Austin |
1:8aa5cdb4ab67 | 74 | file(REMOVE "asm/CortexContextSwitch.s") |
Jonathan Austin |
1:8aa5cdb4ab67 | 75 | configure_file("asm/CortexContextSwitch.s.gcc" "asm/CortexContextSwitch.s" COPYONLY) |
Jonathan Austin |
1:8aa5cdb4ab67 | 76 | else() |
Jonathan Austin |
1:8aa5cdb4ab67 | 77 | file(REMOVE "asm/CortexContextSwitch.s") |
Jonathan Austin |
1:8aa5cdb4ab67 | 78 | configure_file("asm/CortexContextSwitch.s.armcc" "asm/CortexContextSwitch.s" COPYONLY) |
Jonathan Austin |
1:8aa5cdb4ab67 | 79 | endif() |
Jonathan Austin |
1:8aa5cdb4ab67 | 80 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 81 | set(YOTTA_AUTO_MICROBIT-DAL_S_FILES |
Jonathan Austin |
1:8aa5cdb4ab67 | 82 | "asm/CortexContextSwitch.s" |
Jonathan Austin |
1:8aa5cdb4ab67 | 83 | ) |
Jonathan Austin |
1:8aa5cdb4ab67 | 84 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 85 | add_library(microbit-dal |
Jonathan Austin |
1:8aa5cdb4ab67 | 86 | ${YOTTA_AUTO_MICROBIT-DAL_CPP_FILES} |
Jonathan Austin |
1:8aa5cdb4ab67 | 87 | ${YOTTA_AUTO_MICROBIT-DAL_S_FILES} |
Jonathan Austin |
1:8aa5cdb4ab67 | 88 | ) |
Jonathan Austin |
1:8aa5cdb4ab67 | 89 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 90 | yotta_postprocess_target(LIBRARY microbit-dal) |
Jonathan Austin |
1:8aa5cdb4ab67 | 91 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 92 | target_link_libraries(microbit-dal |
Jonathan Austin |
1:8aa5cdb4ab67 | 93 | mbed-classic |
Jonathan Austin |
1:8aa5cdb4ab67 | 94 | ble |
Jonathan Austin |
1:8aa5cdb4ab67 | 95 | ble-nrf51822 |
Jonathan Austin |
1:8aa5cdb4ab67 | 96 | ) |
Jonathan Austin |
1:8aa5cdb4ab67 | 97 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 98 | if(CMAKE_COMPILER_IS_GNUCC) |
Jonathan Austin |
1:8aa5cdb4ab67 | 99 | message("suppressing ALL warnings from mbed-classic, ble, ble-nrf51822 & nrf51-sdk") |
Jonathan Austin |
1:8aa5cdb4ab67 | 100 | target_compile_options(mbed-classic PRIVATE "-w") |
Jonathan Austin |
1:8aa5cdb4ab67 | 101 | target_compile_options(ble PRIVATE "-w") |
Jonathan Austin |
1:8aa5cdb4ab67 | 102 | target_compile_options(ble-nrf51822 PRIVATE "-w") |
Jonathan Austin |
1:8aa5cdb4ab67 | 103 | target_compile_options(nrf51-sdk PRIVATE "-w") |
LancasterUniversity | 35:8ce23bc1af38 | 104 | endif() |