Move wrapgen to another directory

To support cross-compiled Darling, mldr and darling should be compiled
for target system wrapgen not. Split them for simpler build systems.
This commit is contained in:
Yen Chi Hsuan 2017-04-13 21:12:10 +08:00
parent cf5bf5a38d
commit f28d4a5a4b
7 changed files with 9 additions and 4 deletions

View File

@ -6,7 +6,7 @@ function(wrap_elf name elfname)
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/${name}.c
COMMAND
${CMAKE_BINARY_DIR}/src/startup/wrapgen
${CMAKE_BINARY_DIR}/src/wrapgen/wrapgen
${elfname}
${CMAKE_CURRENT_BINARY_DIR}/${name}.c
DEPENDS

View File

@ -42,6 +42,7 @@ add_subdirectory(external/cctools-port/cctools/misc)
#add_subdirectory(libmach-o)
#add_subdirectory(libdyld)
add_subdirectory(startup)
add_subdirectory(wrapgen)
set(CMAKE_AR "${CMAKE_BINARY_DIR}/src/external/cctools-port/cctools/ar/x86_64-apple-darwin11-ar")
set(CMAKE_RANLIB "${CMAKE_BINARY_DIR}/src/external/cctools-port/cctools/misc/ranlib")

View File

@ -36,9 +36,6 @@ set_target_properties(mldr32
LINK_FLAGS "-m32"
)
add_executable(wrapgen wrapgen/wrapgen.cpp)
target_link_libraries(wrapgen dl)
install(TARGETS mldr mldr32 DESTINATION libexec/darling/bin)
install(TARGETS darling DESTINATION bin
PERMISSIONS

View File

@ -0,0 +1,7 @@
project(wrapgen)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_executable(wrapgen wrapgen.cpp)
target_link_libraries(wrapgen dl)