-
Notifications
You must be signed in to change notification settings - Fork 35
/
CMakeLists.txt
57 lines (45 loc) · 1.32 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
cmake_minimum_required(VERSION 2.8)
set(CMAKE_SYSTEM_NAME "Generic")
set(CMAKE_C_COMPILER "arm-vita-eabi-gcc")
set(CMAKE_CXX_COMPILER "arm-vita-eabi-g++")
project(ds4vita)
set(CMAKE_C_FLAGS "-Wl,-q -Wall -O3 -std=gnu99")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++11 -fno-rtti -fno-exceptions")
include_directories(
)
link_directories(
${CMAKE_CURRENT_BINARY_DIR}
)
option(RELEASE "Release build" OFF)
if (RELEASE)
add_definitions(-DRELEASE)
endif(RELEASE)
add_executable(${PROJECT_NAME}.elf
main.c
log.c
)
target_link_libraries(${PROJECT_NAME}.elf
gcc
taihenForKernel_stub
SceSysclibForDriver_stub
SceSysmemForDriver_stub
SceSysmemForKernel_stub
SceThreadmgrForDriver_stub
SceIofilemgrForDriver_stub
SceBtForDriver_stub
SceKernelSuspendForDriver_stub
SceCtrlForDriver_stub
)
set_target_properties(${PROJECT_NAME}.elf
PROPERTIES LINK_FLAGS "-nostdlib"
COMPILE_FLAGS "-D__VITA_KERNEL__"
)
add_custom_target(${PROJECT_NAME}.skprx ALL
COMMAND vita-elf-create -e ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.yml ${PROJECT_NAME}.elf ${PROJECT_NAME}.velf
COMMAND vita-make-fself -c ${PROJECT_NAME}.velf ${PROJECT_NAME}.skprx
)
add_dependencies(${PROJECT_NAME}.skprx ${PROJECT_NAME}.elf)
add_custom_target(send
COMMAND curl -T ${PROJECT_NAME}.skprx ftp://$(PSVITAIP):1337/ux0:/data/tai/kplugin.skprx
DEPENDS ${PROJECT_NAME}.skprx
)