diff src/CMakeLists.txt @ 53:435bfab09924

fix cmakefiles
author kono
date Mon, 03 Jun 2019 19:39:11 +0900
parents 214d21c891c7
children aa0095c4c2b0
line wrap: on
line diff
--- a/src/CMakeLists.txt	Mon Jun 03 18:12:44 2019 +0900
+++ b/src/CMakeLists.txt	Mon Jun 03 19:39:11 2019 +0900
@@ -11,15 +11,19 @@
              -Wno-macro-redefined -Wno-gnu-designator -Wno-sometimes-uninitialized -Wno-tautological-compare 
              -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include
              -Wno-nullability-completeness -Wno-expansion-to-defined")
+    set(CMAKE_EXE_LINKER_FLAGS "-L. -arch armv7 -T  kernel.ld -o  kernel.elf ")
 else (APPLE)
     set(CMAKE_C_COMPILER /mnt/dalmore-home/one/src/armgcc/cross/bin/arm-none-eabi-gcc)
-    add_definitions("-B/mnt/dalmore-home/one/src/armgcc/cross/bin/arm-none-eabi- 
+    set(CMAKE_ASM_COMPILER /mnt/dalmore-home/one/src/armgcc/cross/bin/arm-none-eabi-gcc)
+    add_definitions("-B/mnt/dalmore-home/one/src/armgcc/cross/bin/arm-none-eabi-  
              -DCBCXV6=1 -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -I. -g -O0")
+    set(CMAKE_EXE_LINKER_FLAGS "-L.  -T  kernel.ld  -o  kernel.elf -nostdlib ")
+
+
 endif (APPLE)
 
 # -DCMAKE_BUILD_TYPE=Debug
 set(CMAKE_C_FLAGS_DEBUG "-O0")
-set(CMAKE_EXE_LINKER_FLAGS "-L. -arch armv7 -T  kernel.ld -o  kernel.elf ")
 
 if (${USE_CUDA})
     include_directories("/usr/local/cuda/include")
@@ -71,18 +75,18 @@
           DEPENDS   ${_Gears_CBC_SOURCES}
           COMMAND  "perl" "gearsTools/generate_context.pl" "-o" ${_Gears_TARGET} ${_Gears_CBC_SOURCES}
     )
-    add_executable(${_Gears_TARGET} ${_Gears_CBC_SOURCES} ${_Gears_CSOURCES} c/${_Gears_TARGET}-context.c)
-    target_link_libraries(${_Gears_TARGET} m pthread)
+    add_executable(${_Gears_TARGET} ${_Gears_CBC_SOURCES} ${_Gears_CSOURCES} c/${_Gears_TARGET}-context.c )
+    #  target_link_libraries(${_Gears_TARGET} m pthread)
 endmacro()
 
 
-GearsCommand(
+GearsCommand (
   TARGET
       kernel
   SOURCES
 	lib/string.c arm.c asm.S bio.c buddy.c console.cbc exec.c file.cbc fs.c log.c main.c memide.c pipe.cbc proc.cbc spinlock.cbc
 	start.c swtch.S syscall.cbc sysfile.cbc sysproc.c trap_asm.S trap.c vm.c device/picirq.c device/timer.c device/uart.c
-        entry-osx.S 
+         entry.S 
 )