Mercurial > hg > CbC > CbC_xv6
diff src/usr/CMakeLists.txt @ 59:8f435de13b91
fix cmakefiles
author | tobaru |
---|---|
date | Fri, 05 Jul 2019 17:06:31 +0900 |
parents | f1b965f53d3b |
children | e5f099108a6e |
line wrap: on
line diff
--- a/src/usr/CMakeLists.txt Fri Jul 05 16:39:01 2019 +0900 +++ b/src/usr/CMakeLists.txt Fri Jul 05 17:06:31 2019 +0900 @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 3.8) +set(CMAKE_C_COMPILER "/usr/bin/cc") project(usr C ASM) @@ -48,13 +49,13 @@ target_link_libraries(${_Gears_TARGET} ulib) endmacro() -add_library(ulib STATIC ulib.c usys.c printf.c umalloc.c) +add_library(ulib STATIC ulib.c usys.S printf.c umalloc.c) -set(USR_COMMANDS _cat _echo _grep _init _kill _ln _ls _mkdir _rm _sh _stressfs _usertests _wc _zombie _hello) +set(USRCOMMANDS cat echo grep init kill ln ls mkdir rm sh stressfs usertests wc zombie hello) -foreach(cmd ${USR_COMMANDS) - GearsCommand (TARGET ${cmd} SOURCES ${cmd}.c) -end foreach(cmd) +foreach(cmd ${USR_COMMANDS}) + GearsCommand (TARGET _${cmd} SOURCES ${cmd}.c) +endforeach(cmd) add_custom_command(OUTPUT fs.img COMMAND ./mkfs fs.img ${USR_COMMAND} UNIX