feat: added support for constructors/desctructors
This commit is contained in:
@@ -67,12 +67,22 @@ if (NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/${CMAKE_SYSTEM_PRO
|
||||
message(FATAL_ERROR "Unknown architecture ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/${CMAKE_SYSTEM_PROCESSOR}")
|
||||
endif ()
|
||||
|
||||
file(GLOB PLATFORM_SPECIFIC_SOURCES src/platform/x86_64/*.c)
|
||||
file(GLOB PLATFORM_SPECIFIC_SOURCES src/platform/${CMAKE_SYSTEM_PROCESSOR}/*.c)
|
||||
file(GLOB PLATFORM_SPECIFIC_ASM_SOURCES src/platform/${CMAKE_SYSTEM_PROCESSOR}/*.asm)
|
||||
|
||||
file(GLOB CRTI src/platform/generic/crt/crti.c)
|
||||
file(GLOB CRTN src/platform/generic/crt/crtn.c)
|
||||
|
||||
# Define aggregate sources
|
||||
set(KERNEL_SOURCE_FILES ${KERNEL_SOURCES} ${LIMINE_KERNEL_SOURCES} ${PLATFORM_GENERIC_SOURCES} ${PLATFORM_SPECIFIC_SOURCES})
|
||||
set(KERNEL_SOURCE_FILES
|
||||
${KERNEL_SOURCES}
|
||||
${LIMINE_KERNEL_SOURCES}
|
||||
${PLATFORM_GENERIC_SOURCES}
|
||||
${PLATFORM_SPECIFIC_SOURCES}
|
||||
${PLATFORM_SPECIFIC_ASM_SOURCES}
|
||||
)
|
||||
|
||||
# Define executable
|
||||
add_executable(yak.elf ${KERNEL_SOURCE_FILES})
|
||||
add_executable(yak.elf ${CRTI} ${KERNEL_SOURCE_FILES} ${CRTN})
|
||||
target_link_libraries(yak.elf PRIVATE ${BUILTINS_LIB})
|
||||
target_include_directories(yak.elf PRIVATE include ../limine/include ${printf_library_SOURCE_DIR}/src)# ${printf_library_SOURCE_DIR}/src)
|
||||
Reference in New Issue
Block a user