Build system refactoring.
[lwext4.git] / toolchain / bf518.cmake
index 05ec46172f386aac9187cabcfc424fce75bc63e6..523919baa59e11c60746654975a37d00a0b67fff 100644 (file)
@@ -1,5 +1,5 @@
 # Name of the target\r
-SET(CMAKE_SYSTEM_NAME Generic)\r
+set(CMAKE_SYSTEM_NAME bfin-elf)\r
 set(CMAKE_SYSTEM_PROCESSOR bf518)\r
 \r
 # Toolchain settings\r
@@ -11,7 +11,16 @@ set(OBJCOPY             bfin-elf-objcopy)
 set(OBJDUMP             bfin-elf-objdump)\r
 set(SIZE                bfin-elf-size)\r
 \r
-set(CMAKE_C_FLAGS   "-mcpu=bf518 -Os -Wall -std=gnu99 -fdata-sections -ffunction-sections" CACHE INTERNAL "c compiler flags")\r
-set(CMAKE_CXX_FLAGS "-mcpu=bf518 -Os -fno-builtin -Wall -fdata-sections -ffunction-sections" CACHE INTERNAL "cxx compiler flags")\r
+set(CMAKE_C_FLAGS   "-mcpu=bf518 -Wall -std=gnu99 -fdata-sections -ffunction-sections" CACHE INTERNAL "c compiler flags")\r
+set(CMAKE_CXX_FLAGS "-mcpu=bf518 -Wall -fdata-sections -ffunction-sections" CACHE INTERNAL "cxx compiler flags")\r
 set(CMAKE_ASM_FLAGS "-mcpu=bf518 -x assembler-with-cpp" CACHE INTERNAL "asm compiler flags")\r
-set(CMAKE_EXE_LINKER_FLAGS "-nostartfiles -Wl,--gc-sections -mcpu=bf592" CACHE INTERNAL "exe link flags")\r
+set(CMAKE_EXE_LINKER_FLAGS "-mcpu=bf592 -nostartfiles -Wl,--gc-sections" CACHE INTERNAL "exe link flags")\r
+\r
+\r
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -ggdb3" CACHE INTERNAL "c debug compiler flags")\r
+SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -ggdb3" CACHE INTERNAL "cxx debug compiler flags")\r
+SET(CMAKE_ASM_FLAGS_DEBUG "-g -ggdb3" CACHE INTERNAL "asm debug compiler flags")\r
+\r
+SET(CMAKE_C_FLAGS_RELEASE "-Os" CACHE INTERNAL "c release compiler flags")\r
+SET(CMAKE_CXX_FLAGS_RELEASE "-Os" CACHE INTERNAL "cxx release compiler flags")\r
+SET(CMAKE_ASM_FLAGS_RELEASE "" CACHE INTERNAL "asm release compiler flags")
\ No newline at end of file