Add new files to CMake
This commit is contained in:
parent
833562c7be
commit
78fb7f061f
|
@ -17,10 +17,17 @@ SET(src_files
|
|||
${CMAKE_SOURCE_DIR}/chroma/system/serial.c
|
||||
${CMAKE_SOURCE_DIR}/chroma/system/pci.c
|
||||
${CMAKE_SOURCE_DIR}/chroma/system/memory/paging.c
|
||||
${CMAKE_SOURCE_DIR}/chroma/system/memory/abstract_allocator.c
|
||||
${CMAKE_SOURCE_DIR}/chroma/system/memory/physmem.c
|
||||
${CMAKE_SOURCE_DIR}/chroma/system/drivers/keyboard.c
|
||||
)
|
||||
|
||||
SET(lib_files
|
||||
${CMAKE_SOURCE_DIR}/chroma/lainlib/list/basic_list.c
|
||||
${CMAKE_SOURCE_DIR}/chroma/lainlib/mutex/ticketlock.c
|
||||
${CMAKE_SOURCE_DIR}/chroma/lainlib/compression/lzgmini.c
|
||||
)
|
||||
|
||||
include_directories("chroma/inc")
|
||||
|
||||
SET(src_no_sse
|
||||
|
@ -31,7 +38,7 @@ SET(src_preamble
|
|||
${CMAKE_SOURCE_DIR}/global/crt0.o
|
||||
${CMAKE_SOURCE_DIR}/global/crti.o
|
||||
${CMAKE_SOURCE_DIR}/global/crtbegin.o
|
||||
)
|
||||
)
|
||||
|
||||
set(src_epilogue
|
||||
${CMAKE_SOURCE_DIR}/global/crtend.o
|
||||
|
@ -42,8 +49,8 @@ set_property(SOURCE ${src_no_sse} PROPERTY COMPILE_FLAGS -mgeneral-regs-only)
|
|||
|
||||
add_executable(kernel)
|
||||
|
||||
target_sources(kernel PUBLIC ${src_preamble} PUBLIC ${src_files} PUBLIC ${src_no_sse} PUBLIC ${CMAKE_SOURCE_DIR}/font.o PUBLIC ${src_epilogue})
|
||||
target_compile_options(kernel PRIVATE -ffreestanding -O2 -Wall -Wextra -Wall -Werror -pedantic -fPIC -fno-exceptions)
|
||||
target_sources(kernel PUBLIC ${src_preamble} PUBLIC ${src_files} PUBLIC ${src_no_sse} PUBLIC ${lib_files} PUBLIC ${CMAKE_SOURCE_DIR}/font.o PUBLIC ${src_epilogue})
|
||||
target_compile_options(kernel PRIVATE -ffreestanding -O2 -Wall -Wextra -Wall -Werror -pedantic -fPIC -fno-exceptions )
|
||||
target_link_options(kernel PRIVATE -T linker.ld -ffreestanding -O2 -nostdlib -nostartfiles -lgcc)
|
||||
|
||||
add_custom_command(
|
||||
|
|
Loading…
Reference in New Issue
Block a user