1 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os")
3 add_executable(installer setmode.s loader_c.c loader_asm.s cpio.c malloc.c
5 target_link_libraries(installer string)
6 target_link_libraries(installer ebcdic)
7 set_target_properties(installer PROPERTIES LINK_FLAGS "-T ${CMAKE_CURRENT_SOURCE_DIR}/linker.script")
11 COMMAND ${CMAKE_OBJCOPY} -O binary -j .text -j .data -j .rodata -j .rodata.str1.2 installer installer.rto
17 COMMAND ../build/ccw_gen 00080000 80100000 `stat -c %s installer.rto` 100000 080000 > rdr.s
21 add_executable(rdr rdr.s)
22 set_target_properties(rdr PROPERTIES LINK_FLAGS "-T ${CMAKE_CURRENT_SOURCE_DIR}/linker-rdr.script")
25 COMMAND ${CMAKE_OBJCOPY} -O binary -j .text -j .data -j .rodata -j .rodata.str1.2 rdr rdr.rto
29 add_custom_target(installer-rto ALL DEPENDS rdr.rto installer.rto)