Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmake_minimum_required(VERSION 2.8)
- project(vitastick)
- set(CMAKE_SYSTEM_NAME "Generic")
- set(CMAKE_C_COMPILER "arm-vita-eabi-gcc")
- set(CMAKE_CXX_COMPILER "arm-vita-eabi-g++")
- set(CMAKE_C_FLAGS "-Wl,-q -Wall -O2")
- set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++11 -fno-rtti -fno-exceptions")
- option(RELEASE "Release build" OFF)
- if (RELEASE)
- add_definitions(-DRELEASE)
- endif(RELEASE)
- link_directories(
- ${CMAKE_BINARY_DIR}
- )
- set(SOURCES
- main.c
- log.c
- )
- add_executable(${PROJECT_NAME}.elf
- ${SOURCES}
- )
- add_dependencies(${PROJECT_NAME}.elf
- hid_descriptor.h
- )
- target_link_libraries(${PROJECT_NAME}.elf
- SceSysclibForDriver_stub
- SceIofilemgrForDriver_stub
- )
- set_target_properties(${PROJECT_NAME}.elf
- PROPERTIES LINK_FLAGS "-nostdlib"
- COMPILE_FLAGS "-D__VITA_KERNEL__"
- )
- add_custom_command(OUTPUT ${PROJECT_NAME}.velf
- COMMAND vita-elf-create -e ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.yml ${PROJECT_NAME}.elf ${PROJECT_NAME}.velf
- DEPENDS ${PROJECT_NAME}.elf
- )
- add_custom_command(OUTPUT ${PROJECT_NAME}.skprx
- COMMAND vita-make-fself ${PROJECT_NAME}.velf ${PROJECT_NAME}.skprx
- DEPENDS ${PROJECT_NAME}.velf
- )
- add_custom_command(OUTPUT hid_descriptor.h
- COMMAND hidrd-convert -o code -i xml ${CMAKE_SOURCE_DIR}/hid_descriptor.xml hid_descriptor.h
- DEPENDS hid_descriptor.xml
- )
- add_custom_target(hid_descriptor.h DEPENDS ${CMAKE_SOURCE_DIR}/hid_descriptor.xml)
- add_custom_target(skprx
- DEPENDS ${PROJECT_NAME}.skprx
- )
- add_custom_target(send
- COMMAND curl -T ${PROJECT_NAME}.skprx ftp://$(PSVITAIP):1337/ux0:/data/tai/kplugin.skprx
- DEPENDS ${PROJECT_NAME}.skprx
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement