Add new files to CMake

This commit is contained in:
Curle 2020-08-31 21:53:10 +01:00
parent 833562c7be
commit 78fb7f061f
Signed by: TheCurle
GPG Key ID: 5942F13718443F79

View File

@ -17,10 +17,17 @@ SET(src_files
${CMAKE_SOURCE_DIR}/chroma/system/serial.c ${CMAKE_SOURCE_DIR}/chroma/system/serial.c
${CMAKE_SOURCE_DIR}/chroma/system/pci.c ${CMAKE_SOURCE_DIR}/chroma/system/pci.c
${CMAKE_SOURCE_DIR}/chroma/system/memory/paging.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/memory/physmem.c
${CMAKE_SOURCE_DIR}/chroma/system/drivers/keyboard.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") include_directories("chroma/inc")
SET(src_no_sse SET(src_no_sse
@ -31,7 +38,7 @@ SET(src_preamble
${CMAKE_SOURCE_DIR}/global/crt0.o ${CMAKE_SOURCE_DIR}/global/crt0.o
${CMAKE_SOURCE_DIR}/global/crti.o ${CMAKE_SOURCE_DIR}/global/crti.o
${CMAKE_SOURCE_DIR}/global/crtbegin.o ${CMAKE_SOURCE_DIR}/global/crtbegin.o
) )
set(src_epilogue set(src_epilogue
${CMAKE_SOURCE_DIR}/global/crtend.o ${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) 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_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_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) target_link_options(kernel PRIVATE -T linker.ld -ffreestanding -O2 -nostdlib -nostartfiles -lgcc)
add_custom_command( add_custom_command(