-
Notifications
You must be signed in to change notification settings - Fork 202
/
arch_build.cmake
493 lines (412 loc) · 19.3 KB
/
arch_build.cmake
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
##################################################################
#
# Core Flight System architecture-specific build recipes
#
# This file is invoked by the top-level mission recipe for
# to build cFE/cFS for each target processor
#
# Note that the target CPUs may use different architectures, therefore each
# architecture must be done as a separate sub-build since none of the binaries
# can be shared.
#
##################################################################
##################################################################
#
# FUNCTION: initialize_globals
#
# Set up global mission configuration variables.
# This function determines the mission configuration directory and
# also reads any startup state info from file(s) on the disk
#
# In the CPU (cross) build this only reads a cache file that was
# generated by the mission (top-level) build. Therefore all
# architecture-specific cross builds will get the same settings.
#
function(initialize_globals)
# Sanity check -- the parent build script should have set MISSION_BINARY_DIR
if (NOT IS_DIRECTORY "${MISSION_BINARY_DIR}")
message(FATAL_ERROR "BUG -- MISSION_BINARY_DIR not a valid directory in arch_build.cmake")
endif()
# Read the variable values from the cache file.
set(MISSION_IMPORTED_VARS)
file(READ "${MISSION_BINARY_DIR}/mission_vars.cache" PARENTVARS)
string(REGEX REPLACE ";" "\\\\;" PARENTVARS "${PARENTVARS}")
string(REGEX REPLACE "\n" ";" PARENTVARS "${PARENTVARS}")
foreach(PV ${PARENTVARS})
if (VARNAME)
set(${VARNAME} ${PV} PARENT_SCOPE)
list(APPEND MISSION_IMPORTED_VARS ${VARNAME})
unset(VARNAME)
else()
set(VARNAME ${PV})
endif()
endforeach(PV ${PARENTVARS})
unset(VARNAME)
unset(PARENTVARS)
set(MISSION_IMPORTED_VARS ${MISSION_IMPORTED_VARS} PARENT_SCOPE)
endfunction(initialize_globals)
##################################################################
#
# FUNCTION: add_psp_module
#
# Simplified routine to add a driver to the PSP in use on this arch
# Called by module listfiles
#
function(add_psp_module MOD_NAME MOD_SRC_FILES)
# Include the PSP shared directory so it can get to cfe_psp_module.h
include_directories(${MISSION_SOURCE_DIR}/psp/fsw/shared)
add_definitions(-D_CFE_PSP_MODULE_)
# Create the module
add_library(${MOD_NAME} STATIC ${MOD_SRC_FILES} ${ARGN})
endfunction(add_psp_module)
##################################################################
#
# FUNCTION: add_cfe_app
#
# Simplified routine to add a CFS app or lib this arch
# Called by module listfiles
#
function(add_cfe_app APP_NAME APP_SRC_FILES)
# currently this will build an app with either static linkage or shared/module linkage,
# but this does not currently support both for a single arch (could be revised if that is needed)
if (APP_INSTALL_LIST)
set(APPTYPE "MODULE")
else()
set(APPTYPE "STATIC")
endif()
# Create the app module
add_library(${APP_NAME} ${APPTYPE} ${APP_SRC_FILES} ${ARGN})
if (APP_INSTALL_LIST)
cfs_app_do_install(${APP_NAME} ${APP_INSTALL_LIST})
endif (APP_INSTALL_LIST)
endfunction(add_cfe_app)
##################################################################
#
# FUNCTION: add_cfe_tables
#
# Simplified routine to add CFS tables to be built with an app
#
function(add_cfe_tables APP_NAME TBL_SRC_FILES)
# The table source must be compiled using the same "include_directories"
# as any other target, but it uses the "add_custom_command" so there is
# no automatic way to do this (at least in the older cmakes)
get_current_cflags(TBL_CFLAGS ${CMAKE_C_FLAGS})
# Create the intermediate table objects using the target compiler,
# then use "elf2cfetbl" to convert to a .tbl file
set(TBL_LIST)
foreach(TBL ${TBL_SRC_FILES} ${ARGN})
# Get name without extension (NAME_WE) and append to list of tables
get_filename_component(TBLWE ${TBL} NAME_WE)
foreach(TGT ${APP_INSTALL_LIST})
set(TABLE_DESTDIR "${CMAKE_CURRENT_BINARY_DIR}/tables_${TGT}")
file(MAKE_DIRECTORY ${TABLE_DESTDIR})
list(APPEND TBL_LIST "${TABLE_DESTDIR}/${TBLWE}.tbl")
# Check if an override exists at the mission level (recommended practice)
# This allows a mission to implement a customized table without modifying
# the original - this also makes for easier merging/updating if needed.
if (EXISTS "${MISSION_DEFS}/tables/${TGT}_${TBLWE}.c")
set(TBL_SRC "${MISSION_DEFS}/tables/${TGT}_${TBLWE}.c")
elseif (EXISTS "${MISSION_SOURCE_DIR}/tables/${TGT}_${TBLWE}.c")
set(TBL_SRC "${MISSION_SOURCE_DIR}/tables/${TGT}_${TBLWE}.c")
elseif (EXISTS "${MISSION_DEFS}/tables/${TBLWE}.c")
set(TBL_SRC "${MISSION_DEFS}/tables/${TBLWE}.c")
elseif (EXISTS "${MISSION_SOURCE_DIR}/tables/${TBLWE}.c")
set(TBL_SRC "${MISSION_SOURCE_DIR}/tables/${TBLWE}.c")
elseif (EXISTS "${MISSION_DEFS}/${TGT}/tables/${TBLWE}.c")
set(TBL_SRC "${MISSION_DEFS}/${TGT}/tables/${TBLWE}.c")
elseif (IS_ABSOLUTE "${TBL}")
set(TBL_SRC "${TBL}")
else()
set(TBL_SRC "${CMAKE_CURRENT_SOURCE_DIR}/${TBL}")
endif()
if (NOT EXISTS "${TBL_SRC}")
message(FATAL_ERROR "ERROR: No source file for table ${TBLWE}")
else()
message("NOTE: Selected ${TBL_SRC} as source for ${TBLWE}")
endif()
# IMPORTANT: This rule assumes that the output filename of elf2cfetbl matches
# the input file name but with a different extension (.o -> .tbl)
# The actual output filename is embedded in the source file (.c), however
# this must match and if it does not the build will break. That's just the
# way it is, because NO make system supports changing rules based on the
# current content of a dependency (rightfully so).
add_custom_command(
OUTPUT "${TABLE_DESTDIR}/${TBLWE}.tbl"
COMMAND ${CMAKE_C_COMPILER} ${TBL_CFLAGS}
-DCFE_PLATFORM_CPU_ID=${${TGT}_PROCESSORID}
-DCFE_PLATFORM_CPU_NAME="${TGT}"
-c -o ${TBLWE}.o ${TBL_SRC}
COMMAND ${MISSION_BINARY_DIR}/tools/elf2cfetbl/elf2cfetbl ${TBLWE}.o
DEPENDS ${MISSION_BINARY_DIR}/tools/elf2cfetbl/elf2cfetbl ${TBL_SRC}
WORKING_DIRECTORY ${TABLE_DESTDIR}
)
# Create the install targets for all the tables
install(FILES ${TABLE_DESTDIR}/${TBLWE}.tbl DESTINATION ${TGT}/${INSTALL_SUBDIR})
endforeach(TGT ${APP_INSTALL_LIST})
endforeach(TBL ${TBL_SRC_FILES} ${ARGN})
# Make a custom target that depends on all the tables
add_custom_target(${APP_NAME}_tables ALL DEPENDS ${TBL_LIST})
endfunction(add_cfe_tables)
##################################################################
#
# FUNCTION: add_unit_test_lib
#
# Add a library for unit testing. This is basically the same as the
# normal CMake "add_library" but enables the code coverage compiler options.
#
function(add_unit_test_lib UT_NAME UT_SRCS)
add_library(utl_${UT_NAME} STATIC ${UT_SRCS} ${ARGN})
set_target_properties(utl_${UT_NAME} PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} -pg --coverage")
endfunction(add_unit_test_lib)
##################################################################
#
# FUNCTION: add_unit_test_exe
#
# Create unit test executable. This links the UT main executive with
# a library that is placed under test (created via add_unit_test_lib)
# It also registers the final executable target with ctest so it will
# be run during the "make test" target or when ctest is run.
#
function(add_unit_test_exe UT_NAME UT_SRCS)
add_executable(${UT_NAME} ${utexec_MISSION_DIR}/src/utexec.c ${UT_SRCS} ${ARGN})
get_target_property(UTCDEFS ${UT_NAME} COMPILE_DEFINITIONS)
list(APPEND UTCDEFS "DEFAULT_REF_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}\"")
get_target_property(UTCFLAGS ${UT_NAME} COMPILE_FLAGS)
if (UTCFLAGS STREQUAL "UTCFLAGS-NOTFOUND")
set(UTCFLAGS)
endif()
set(UTCFLAGS "${UTCFLAGS} -I${utexec_MISSION_DIR}/inc -I${CMAKE_CURRENT_SOURCE_DIR}")
get_target_property(UTLFLAGS ${UT_NAME} LINK_FLAGS)
if (UTLFLAGS STREQUAL "UTLFLAGS-NOTFOUND")
set(UTLFLAGS)
endif()
set(UTLFLAGS "${UTLFLAGS} -pg --coverage")
set_target_properties(${UT_NAME} PROPERTIES LINK_FLAGS "${UTLFLAGS}" COMPILE_DEFINITIONS "${UTCDEFS}" COMPILE_FLAGS "${UTCFLAGS}")
target_link_libraries(${UT_NAME} utl_${UT_NAME})
add_test(${UT_NAME} ${UT_NAME})
endfunction(add_unit_test_exe)
##################################################################
#
# FUNCTION: cfe_exec_do_install
#
# Called to install a CFE core executable target to the staging area.
# Some architectures/OS's need special extra steps, and this
# function can be overridden in a custom cmake file for those platforms
#
function(cfe_exec_do_install CPU_NAME)
# By default just stage it to a directory of the same name
install(TARGETS core-${CPU_NAME} DESTINATION ${CPU_NAME})
endfunction(cfe_exec_do_install)
##################################################################
#
# FUNCTION: cfs_app_do_install
#
# Called to install a CFS application target to the staging area.
# Some architectures/OS's need special extra steps, and this
# function can be overridden in a custom cmake file for those platforms
#
function(cfs_app_do_install APP_NAME)
# override the default behavior of attaching a "lib" prefix
set_target_properties(${APP_NAME} PROPERTIES
PREFIX "" OUTPUT_NAME "${APP_NAME}")
# Create the install targets for this shared/modular app
foreach(TGT ${ARGN})
install(TARGETS ${APP_NAME} DESTINATION ${TGT}/${INSTALL_SUBDIR})
endforeach()
endfunction(cfs_app_do_install)
##################################################################
#
# FUNCTION: prepare
#
# Called by the top-level CMakeLists.txt to set up prerequisites
#
function(prepare)
# Choose the configuration file to use for OSAL on this system
set(OSAL_CONFIGURATION_FILE)
foreach(CONFIG ${BUILD_CONFIG_${TARGETSYSTEM}} ${OSAL_SYSTEM_OSCONFIG})
if (EXISTS "${MISSION_DEFS}/${CONFIG}_osconfig.cmake")
list(APPEND OSAL_CONFIGURATION_FILE "${MISSION_DEFS}/${CONFIG}_osconfig.cmake")
endif()
endforeach()
list(REVERSE OSAL_CONFIGURATION_FILE)
set(OSAL_CONFIGURATION_FILE ${OSAL_CONFIGURATION_FILE} PARENT_SCOPE)
# Allow sources to "ifdef" certain things if running on simulated hardware
# This should be used sparingly, typically to fake access to hardware that is not present
if (SIMULATION)
add_definitions(-DSIMULATION=${SIMULATION})
endif (SIMULATION)
# Check that PSPNAME is set properly for this arch
if (NOT CFE_SYSTEM_PSPNAME)
if (CMAKE_CROSSCOMPILING)
message(FATAL_ERROR "Cross-compile toolchain ${CMAKE_TOOLCHAIN_FILE} must define CFE_SYSTEM_PSPNAME")
elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR
"${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN")
# Export the variables determined here up to the parent scope
SET(CFE_SYSTEM_PSPNAME "pc-linux" PARENT_SCOPE)
else ()
# Not cross compiling and host system is not recognized
message(FATAL_ERROR "Do not know how to set CFE_SYSTEM_PSPNAME on ${CMAKE_SYSTEM_NAME} system")
endif()
endif (NOT CFE_SYSTEM_PSPNAME)
# Truncate the global TGTSYS_LIST to be only the target architecture
set(TGTSYS_LIST ${TARGETSYSTEM} PARENT_SCOPE)
# set the BUILD_CONFIG variable from the cached data
set(BUILD_CONFIG ${BUILD_CONFIG_${TARGETSYSTEM}})
list(REMOVE_AT BUILD_CONFIG 0)
set(BUILD_CONFIG ${BUILD_CONFIG} PARENT_SCOPE)
# Pull in any application-specific platform-scope configuration
# This may include user configuration files such as cfe_platform_cfg.h,
# or any other configuration/preparation that needs to happen at
# platform/arch scope.
foreach(DEP_NAME ${MISSION_DEPS})
include("${${DEP_NAME}_MISSION_DIR}/arch_build.cmake" OPTIONAL)
endforeach(DEP_NAME ${MISSION_DEPS})
endfunction(prepare)
##################################################################
#
# FUNCTION: process_arch
#
# Called by the top-level CMakeLists.txt to set up targets for this arch
# This is where the real work is done
#
function(process_arch SYSVAR)
# Check if something actually uses this arch;
# if this list is empty then do nothing, skip building osal/psp
if (NOT DEFINED TGTSYS_${SYSVAR})
return()
endif()
# Generate a list of targets that share this system architecture
set(INSTALL_TARGET_LIST ${TGTSYS_${SYSVAR}})
# Assume use of an OSAL BSP of the same name as the CFE PSP
# This can be overridden by the PSP-specific build_options but normally this is expected.
set(CFE_PSP_EXPECTED_OSAL_BSPTYPE ${CFE_SYSTEM_PSPNAME})
# Include any specific compiler flags or config from the selected PSP
include(${MISSION_SOURCE_DIR}/psp/fsw/${CFE_SYSTEM_PSPNAME}/make/build_options.cmake)
if (NOT DEFINED OSAL_SYSTEM_BSPTYPE)
# Implicitly use the OSAL BSP that corresponds with the CFE PSP
set(OSAL_SYSTEM_BSPTYPE ${CFE_PSP_EXPECTED_OSAL_BSPTYPE})
elseif (NOT OSAL_SYSTEM_BSPTYPE STREQUAL CFE_PSP_EXPECTED_OSAL_BSPTYPE)
# Generate a warning about the BSPTYPE not being expected.
# Not calling this a fatal error because it could possibly be intended during development
message(WARNING "Mismatched PSP/BSP: ${CFE_SYSTEM_PSPNAME} implies ${CFE_PSP_EXPECTED_OSAL_BSPTYPE}, but ${OSAL_SYSTEM_BSPTYPE} is configured")
endif()
# The "inc" directory in the binary dir contains the generated wrappers, if any
include_directories(${MISSION_BINARY_DIR}/inc)
include_directories(${CMAKE_BINARY_DIR}/inc)
# Configure OSAL target first, as it also determines important compiler flags
add_subdirectory("${osal_MISSION_DIR}" osal)
# The OSAL displays its selected OS, so it is logical to display the selected PSP
# This can help with debugging if things go wrong.
message(STATUS "PSP Selection: ${CFE_SYSTEM_PSPNAME}")
# Add all widely-used public headers to the include path chain
include_directories(${MISSION_SOURCE_DIR}/osal/src/os/inc)
include_directories(${MISSION_SOURCE_DIR}/psp/fsw/inc)
include_directories(${MISSION_SOURCE_DIR}/cfe/fsw/cfe-core/src/inc)
include_directories(${MISSION_SOURCE_DIR}/cfe/cmake/target/inc)
# propagate any OSAL interface compile definitions and include directories to this build
# This is set as a directory property here at the top level so it will apply to all code.
# This includes MODULE libraries that do not directly/statically link with OSAL but still
# should be compiled with these flags.
get_target_property(OSAL_COMPILE_DEFINITIONS osal INTERFACE_COMPILE_DEFINITIONS)
get_target_property(OSAL_INCLUDE_DIRECTORIES osal INTERFACE_INCLUDE_DIRECTORIES)
if (OSAL_COMPILE_DEFINITIONS)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "${OSAL_COMPILE_DEFINITIONS}")
endif (OSAL_COMPILE_DEFINITIONS)
if (OSAL_INCLUDE_DIRECTORIES)
include_directories(${OSAL_INCLUDE_DIRECTORIES})
endif (OSAL_INCLUDE_DIRECTORIES)
# Append the PSP and OSAL selections to the Doxyfile so it will be included
# in the generated documentation automatically.
# Also extract the "-D" options within CFLAGS and inform Doxygen about these
string(REGEX MATCHALL "-D[A-Za-z0-9_=]+" DOXYGEN_DEFINED_MACROS "${CMAKE_C_FLAGS}")
string(REGEX REPLACE "-D" " " DOXYGEN_DEFINED_MACROS "${DOXYGEN_DEFINED_MACROS}")
file(APPEND "${MISSION_BINARY_DIR}/doc/mission-content.doxyfile"
"PREDEFINED += ${DOXYGEN_DEFINED_MACROS}\n"
"INPUT += ${MISSION_SOURCE_DIR}/osal/src/os/${OSAL_SYSTEM_OSTYPE}\n"
"INPUT += ${MISSION_SOURCE_DIR}/psp/fsw/${CFE_SYSTEM_PSPNAME}\n"
"INPUT += ${CMAKE_BINARY_DIR}/inc")
# Append to usersguide.doxyfile
file(APPEND "${MISSION_BINARY_DIR}/doc/cfe-usersguide.doxyfile"
"INPUT += ${MISSION_SOURCE_DIR}/psp/fsw/${CFE_SYSTEM_PSPNAME}/src\n"
"INPUT += ${CMAKE_BINARY_DIR}/inc")
# The PSP and/or OSAL should have defined where to install the binaries.
# If not, just install them in /cf as a default (this can be modified
# by the packaging script if it is wrong for the target)
if (NOT INSTALL_SUBDIR)
set(INSTALL_SUBDIR cf)
endif (NOT INSTALL_SUBDIR)
# confirm that all dependencies have a MISSION_DIR defined that indicates the source.
# This should have been set up by the parent script. However, if any dir is not set,
# this may result in "add_subdirectory" of itself which causes a loop. This can happen
# if the variables/lists were modified unexpectedly.
foreach(DEP
${MISSION_CORE_MODULES}
${TGTSYS_${SYSVAR}_PSPMODULES}
${TGTSYS_${SYSVAR}_STATICAPPS}
${TGTSYS_${SYSVAR}_APPS})
if(NOT DEFINED ${DEP}_MISSION_DIR)
message(FATAL_ERROR "ERROR: core module ${DEP} has no MISSION_DIR defined")
endif()
endforeach()
# Add all core modules
# The osal is handled explicitly (above) since this has special extra config
foreach(DEP ${MISSION_CORE_MODULES})
if(NOT DEP STREQUAL "osal")
message(STATUS "Building Core Module: ${DEP}")
add_subdirectory("${${DEP}_MISSION_DIR}" ${DEP})
endif(NOT DEP STREQUAL "osal")
endforeach(DEP ${MISSION_CORE_MODULES})
# For the PSP it may define the FSW as either
# "psp-${CFE_SYSTEM_PSPNAME}" or just simply "psp"
if (NOT TARGET psp)
add_library(psp ALIAS psp-${CFE_SYSTEM_PSPNAME})
endif (NOT TARGET psp)
# Process each PSP module that is referenced on this system architecture (any cpu)
foreach(PSPMOD ${TGTSYS_${SYSVAR}_PSPMODULES})
message(STATUS "Building PSP Module: ${PSPMOD}")
add_subdirectory("${${PSPMOD}_MISSION_DIR}" psp/${PSPMOD})
endforeach()
# Process each app that is used on this system architecture
set(APP_INSTALL_LIST)
foreach(APP ${TGTSYS_${SYSVAR}_STATICAPPS})
message(STATUS "Building Static App: ${APP}")
add_subdirectory("${${APP}_MISSION_DIR}" apps/${APP})
endforeach()
# Process each target that shares this system architecture
# First Pass: Assemble the list of apps that should be compiled
foreach(APP ${TGTSYS_${SYSVAR}_APPS})
set(TGTLIST_${APP})
endforeach()
foreach(TGTNAME ${TGTSYS_${SYSVAR}})
# Append to the app install list for this CPU
foreach(APP ${${TGTNAME}_APPLIST})
list(APPEND TGTLIST_${APP} ${TGTNAME})
endforeach(APP ${${TGTNAME}_APPLIST})
endforeach(TGTNAME ${TGTSYS_${SYSVAR}})
# Process each app that is used on this system architecture
foreach(APP ${TGTSYS_${SYSVAR}_APPS})
set(APP_INSTALL_LIST ${TGTLIST_${APP}})
message(STATUS "Building App: ${APP} install=${APP_INSTALL_LIST}")
add_subdirectory("${${APP}_MISSION_DIR}" apps/${APP})
endforeach()
# Process each target that shares this system architecture
# Second Pass: Build and link final target executable
foreach(TGTNAME ${TGTSYS_${SYSVAR}})
# Target to generate the actual executable file
add_subdirectory(cmake/target ${TGTNAME})
foreach(INSTFILE ${${TGTNAME}_FILELIST})
if(EXISTS ${MISSION_DEFS}/${TGTNAME}_${INSTFILE})
set(FILESRC ${MISSION_DEFS}/${TGTNAME}_${INSTFILE})
elseif(EXISTS ${MISSION_DEFS}/${INSTFILE})
set(FILESRC ${MISSION_DEFS}/${INSTFILE})
else()
set(FILESRC)
endif()
if (FILESRC)
install(FILES ${FILESRC} DESTINATION ${TGTNAME}/${INSTALL_SUBDIR} RENAME ${INSTFILE})
else(FILESRC)
message("WARNING: Install file ${INSTFILE} for ${TGTNAME} not found")
endif (FILESRC)
endforeach(INSTFILE ${${TGTNAME}_FILELIST})
endforeach(TGTNAME ${TGTSYS_${SYSVAR}})
endfunction(process_arch SYSVAR)