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