cp: define a FIXME macro that leaves a sclp message
[hvf.git] / CMakeLists.txt
blob947740d354014d6e8411b32376ab08837d556ce1
1 cmake_minimum_required(VERSION 2.8)
3 # we need to compile the build tools
4 include(ExternalProject)
5 ExternalProject_add(build
6         DOWNLOAD_COMMAND ""
7         SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build
8         CONFIGURE_COMMAND cmake <SOURCE_DIR>
9         INSTALL_COMMAND ""
10         BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/build
13 include(CMakeForceCompiler)
15 set(CMAKE_SYSTEM_NAME Linux)
16 enable_language(ASM-ATT)
18 set(CMAKE_LINKER "s390x-linux-ld")
19 set(CMAKE_OBJCOPY "s390x-linux-objcopy")
20 set(CMAKE_ASM "s390x-linux-as")
21 CMAKE_FORCE_C_COMPILER(s390x-linux-gcc GNU)
22 set(CMAKE_ASM-ATT_COMPILE_OBJECT
23         "${CMAKE_ASM} ${ASM_SYS_FLAGS} <FLAGS> -o <OBJECT> <SOURCE>")
25 set(CMAKE_C_FLAGS "-g -fno-strict-aliasing -fno-builtin -nostdlib -nostdinc -Wall -m64 -I ${PROJECT_SOURCE_DIR}/include/ -include ${PROJECT_SOURCE_DIR}/include/types.h -O2")
27 set(HVF_VERSION "0.16-rc3")
29 add_subdirectory(lib)
30 add_subdirectory(cp)
31 add_subdirectory(nss)
32 add_subdirectory(loader)
33 add_subdirectory(installer)
35 add_custom_command(
36         OUTPUT installer/archive.cpio
37         COMMAND ${CMAKE_CURRENT_BINARY_DIR}/build/mkarchive
38                 ${CMAKE_CURRENT_SOURCE_DIR}/cp/config/hvf.directory text 80
39                 ${CMAKE_CURRENT_SOURCE_DIR}/cp/config/system.config text 80
40                 ${CMAKE_CURRENT_SOURCE_DIR}/cp/config/local-3215.txt text 80
41                 ${CMAKE_CURRENT_BINARY_DIR}/cp/hvf bin
42                 ${CMAKE_CURRENT_BINARY_DIR}/loader/eckd.rto bin
43                 ${CMAKE_CURRENT_BINARY_DIR}/loader/loader.rto bin
44                 ${CMAKE_CURRENT_SOURCE_DIR}/doc/installed_files.txt text 80
45                 ${CMAKE_CURRENT_BINARY_DIR}/nss/8ball/8ball bin
46                 ${CMAKE_CURRENT_BINARY_DIR}/nss/ipldev/ipldev bin
47                 ${CMAKE_CURRENT_BINARY_DIR}/nss/login/login bin
48                 > installer/archive.cpio
49         DEPENDS hvf 8ball login ipldev loader-rto
51 add_custom_command(
52         OUTPUT installer.bin
53         COMMAND ./build/padcat installer/rdr.rto installer/installer.rto installer/archive.cpio > installer.bin
54         DEPENDS installer-rto installer/archive.cpio
57 add_custom_target(distro ALL DEPENDS installer.bin)