-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
CMakeLists.txt
64 lines (53 loc) · 2.88 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
58
59
60
61
62
63
64
#------------------------------------------------------------------------------#
# ELENA CMake file #
#------------------------------------------------------------------------------#
cmake_minimum_required(VERSION 3.10)
project(ELENA)
function(add_elena_target arch)
add_custom_target(elc_${arch}
COMMAND ${CMAKE_MAKE_PROGRAM} -C ${CMAKE_SOURCE_DIR}/elenasrc3/elc/codeblocks all -f elc_${arch}.mak
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
add_custom_target(sg_${arch}
COMMAND ${CMAKE_MAKE_PROGRAM} -C ${CMAKE_SOURCE_DIR}/elenasrc3/tools/sg/codeblocks all -f sg_${arch}.mak
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
add_custom_target(og_${arch}
COMMAND ${CMAKE_MAKE_PROGRAM} -C ${CMAKE_SOURCE_DIR}/elenasrc3/tools/og/codeblocks all -f og_${arch}.mak
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
add_custom_target(asmc_${arch}
COMMAND ${CMAKE_MAKE_PROGRAM} -C ${CMAKE_SOURCE_DIR}/elenasrc3/tools/asmc/codeblocks all -f asmc_${arch}.mak
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
add_custom_target(ecv_${arch}
COMMAND ${CMAKE_MAKE_PROGRAM} -C ${CMAKE_SOURCE_DIR}/elenasrc3/tools/ecv/codeblocks all -f ecv_${arch}.mak
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
add_custom_target(elenart_${arch}
COMMAND ${CMAKE_MAKE_PROGRAM} -C ${CMAKE_SOURCE_DIR}/elenasrc3/elenart/codeblocks all -f elenart_${arch}.mak
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
add_custom_target(elenasm_${arch}
COMMAND ${CMAKE_MAKE_PROGRAM} -C ${CMAKE_SOURCE_DIR}/elenasrc3/elenasm/codeblocks all -f elenasm_${arch}.mak
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
add_custom_target(all_${arch}
DEPENDS elc_${arch} sg_${arch} og_${arch} asmc_${arch} ecv_${arch} elenart_${arch} elenasm_${arch}
)
add_custom_target(clean_${arch}
COMMAND ${CMAKE_MAKE_PROGRAM} -C ${CMAKE_SOURCE_DIR}/elenasrc3/elc/codeblocks clean -f elc_${arch}.mak
COMMAND ${CMAKE_MAKE_PROGRAM} -C ${CMAKE_SOURCE_DIR}/elenasrc3/tools/sg/codeblocks clean -f sg_${arch}.mak
COMMAND ${CMAKE_MAKE_PROGRAM} -C ${CMAKE_SOURCE_DIR}/elenasrc3/tools/og/codeblocks clean -f og_${arch}.mak
COMMAND ${CMAKE_MAKE_PROGRAM} -C ${CMAKE_SOURCE_DIR}/elenasrc3/tools/asmc/codeblocks clean -f asmc_${arch}.mak
COMMAND ${CMAKE_MAKE_PROGRAM} -C ${CMAKE_SOURCE_DIR}/elenasrc3/tools/ecv/codeblocks clean -f ecv_${arch}.mak
COMMAND ${CMAKE_MAKE_PROGRAM} -C ${CMAKE_SOURCE_DIR}/elenasrc3/elenart/codeblocks clean -f elenart_${arch}.mak
COMMAND ${CMAKE_MAKE_PROGRAM} -C ${CMAKE_SOURCE_DIR}/elenasrc3/elenasm/codeblocks clean -f elenasm_${arch}.mak
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
endfunction()
# Add targets for each architecture
add_elena_target(i386)
add_elena_target(amd64)
add_elena_target(ppc64le)
add_elena_target(arm64)