fix compile warnings for gcc 6.2.0
[open-ath9k-htc-firmware.git] / target_firmware / CMakeLists.txt
index 7d2664057dc51b5445451abb0ed86ef0503ce6ba..3710617905ed965ab08a7f7843d981cfc1bccaff 100644 (file)
@@ -46,7 +46,7 @@ SET(SOURCES
 IF(TARGET_K2)
        SET(SOURCES ${SOURCES}
                magpie_fw_dev/target/hif/k2_HIF_usb_patch.c
-               magpie_fw_dev/target/hif/k2_fw_usb_api.c
+               magpie_fw_dev/target/hif/usb_api_k2_patch.c
        )
        SET(LIBS ${LIBS} hif)
        ADD_DEFINITIONS(-DPROJECT_K2)
@@ -63,14 +63,12 @@ ELSEIF(TARGET_MAGPIE)
                -DMAGPIE_MERLIN
        )
        SET(SOURCES ${SOURCES}
+               magpie_fw_dev/target/hif/usb_api_magpie_patch.c
                magpie_fw_dev/target/rompatch/cmnos_clock_patch.c
-               magpie_fw_dev/target/rompatch/usb_api_patch.c
                magpie_fw_dev/target/rompatch/HIF_usb_patch.c
        )
        INCLUDE_DIRECTORIES(
                ${CMAKE_SOURCE_DIR}/magpie_fw_dev/target/adf
-               magpie_fw_dev/build/magpie_1_1/inc
-               magpie_fw_dev/build/magpie_1_1/inc/magpie
        )
        SET(PLATFORM_NAME magpie)
        SET(FIRMWARE_NAME htc_7010.fw)
@@ -79,9 +77,10 @@ ELSE()
 ENDIF()
 
 INCLUDE_DIRECTORIES(
-       ${CMAKE_SOURCE_DIR}/magpie_fw_dev/build/include
-       ${CMAKE_SOURCE_DIR}/magpie_fw_dev/build/include/xtensa-elf
+       ${CMAKE_SOURCE_DIR}/include
+       ${CMAKE_SOURCE_DIR}/magpie_fw_dev/target/
        ${CMAKE_SOURCE_DIR}/magpie_fw_dev/target/inc
+       ${CMAKE_SOURCE_DIR}/magpie_fw_dev/target/inc/xtensa-elf
        ${CMAKE_SOURCE_DIR}/magpie_fw_dev/target/inc/${PLATFORM_NAME}
        ${CMAKE_SOURCE_DIR}/magpie_fw_dev/target/inc/${PLATFORM_NAME}/${PLATFORM_NAME}
        ${CMAKE_SOURCE_DIR}/wlan
@@ -113,6 +112,8 @@ ADD_CUSTOM_COMMAND(
        OUTPUT fw.bin
        DEPENDS fw.elf
        COMMAND ${CMAKE_OBJCOPY}
+               --change-section-lma .boot-0x400000
+               --change-section-vma .boot-0x400000
                --change-section-lma .text-0x400000
                --change-section-vma .text-0x400000
                -O binary fw.elf fw.bin