diff --git a/xzre_code/CMakeLists.txt b/xzre_code/CMakeLists.txt index 5bad8f7..7392cd5 100644 --- a/xzre_code/CMakeLists.txt +++ b/xzre_code/CMakeLists.txt @@ -15,4 +15,22 @@ add_library(xzre_code secret_data_get_decrypted.c sha256.c sshd_patch_variables.c -) \ No newline at end of file +) +target_compile_options(xzre_code PRIVATE + -Os -fomit-frame-pointer +) + +add_custom_command( + OUTPUT ${CMAKE_BINARY_DIR}/xzre_merged.o + DEPENDS $ + COMMAND ${CMAKE_LINKER} + -relocatable $ + -o ${CMAKE_BINARY_DIR}/xzre_merged.o + COMMAND_EXPAND_LISTS + VERBATIM +) + +add_custom_target(make_object_file ALL + DEPENDS ${CMAKE_BINARY_DIR}/xzre_merged.o +) +add_dependencies(make_object_file xzre_code)