1 2list(APPEND HAL_SMP_SOURCE 3 generic/buildtype.c 4 generic/spinlock.c 5 smp/ipi.c 6 smp/smp.c) 7 8if(ARCH STREQUAL "i386") 9 list(APPEND HAL_SMP_ASM_SOURCE 10 smp/i386/apentry.S) 11 list(APPEND HAL_SMP_SOURCE 12 smp/i386/spinup.c) 13elseif(ARCH STREQUAL "amd64") 14 list(APPEND HAL_SMP_ASM_SOURCE 15 smp/amd64/apentry.S) 16 list(APPEND HAL_SMP_SOURCE 17 smp/amd64/spinup.c) 18endif() 19 20add_asm_files(lib_hal_smp_asm ${HAL_SMP_ASM_SOURCE}) 21add_library(lib_hal_smp OBJECT ${HAL_SMP_SOURCE} ${lib_hal_smp_asm}) 22add_dependencies(lib_hal_smp bugcodes asm xdk) 23target_compile_definitions(lib_hal_smp PRIVATE CONFIG_SMP) 24