From f24ead9bf2d3d247c125ced9e44405ab357dedda Mon Sep 17 00:00:00 2001 From: Filip <44641787+Filiprogrammer@users.noreply.github.com> Date: Mon, 17 Jul 2023 20:44:24 +0200 Subject: [PATCH] Ditch cecho in favour of ANSI escape sequences Ditch cecho in Windows build scripts in favour of ANSI escape sequences --- BUILD.BAT | 37 ++++++----- BUILD_IMAGE.BAT | 12 ++-- QEMU_BOOT.BAT | 2 +- efi_bootloader/BUILD.BAT | 22 +++---- efi_bootloader/lib/BUILD.BAT | 62 +++++++++++-------- .../lib/BaseDebugPrintErrorLevelLib/BUILD.BAT | 8 +-- efi_bootloader/lib/BaseLib/BUILD.BAT | 26 ++++---- efi_bootloader/lib/BaseMemoryLib/BUILD.BAT | 9 +-- efi_bootloader/lib/BasePcdLibNull/BUILD.BAT | 8 +-- efi_bootloader/lib/BasePrintLib/BUILD.BAT | 12 ++-- .../lib/UefiApplicationEntryPoint/BUILD.BAT | 8 +-- .../lib/UefiBootServicesTableLib/BUILD.BAT | 8 +-- .../lib/UefiDebugLibStdErr/BUILD.BAT | 12 ++-- .../lib/UefiDevicePathLib/BUILD.BAT | 20 +++--- efi_bootloader/lib/UefiLib/BUILD.BAT | 9 +-- .../lib/UefiMemoryAllocationLib/BUILD.BAT | 8 +-- .../lib/UefiRuntimeServicesTableLib/BUILD.BAT | 8 +-- kernel/BUILD.bat | 2 +- kernel/makefile | 24 +++---- user/user_programs/cpptest/makefile | 10 +-- user/user_programs/pcilist/makefile | 10 +-- user/user_programs/raycaster/makefile | 10 +-- user/user_programs/shell/makefile | 10 +-- user/user_programs/threadtest/makefile | 10 +-- 24 files changed, 184 insertions(+), 163 deletions(-) diff --git a/BUILD.BAT b/BUILD.BAT index ad96b4b..6e4fae7 100644 --- a/BUILD.BAT +++ b/BUILD.BAT @@ -35,28 +35,31 @@ cd %~d0%~p0 call SET_ENV_VARS.BAT cd mbr_bootloader -cecho {0A}Building Master Boot Record bootloader...{#}{\n} +echo Building Master Boot Record bootloader... call BUILD.BAT || goto ERROR -cecho {0A}Master Boot Record bootloader was built{#}{\n} +echo Master Boot Record bootloader was built echo. cd ..\stage2_bootloader -cecho {0A}Building second stage bootloader...{#}{\n} +echo Building second stage bootloader... call BUILD.BAT || goto ERROR -cecho {0A}Second stage bootloader was built{#}{\n\n} +echo Second stage bootloader was built +echo. cd ..\stage1_bootloader -cecho {0A}Building first stage bootloader...{#}{\n} +echo Building first stage bootloader... call BUILD.BAT || goto ERROR -cecho {0A}First stage bootloader was built{#}{\n\n} +echo First stage bootloader was built +echo. cd .. ::User Library cd user\user_tools -cecho {0A}Building user library...{#}{\n} +echo Building user library... call BUILD.bat || goto ERROR -cecho {0A}User library was built{#}{\n\n} +echo User library was built +echo. cd .. ::User Programs @@ -81,10 +84,11 @@ setlocal ENABLEDELAYEDEXPANSION set errorlevel=1 FOR /F "tokens=%i%" %%a IN ("%result%") DO ( set errorlevel=0 - cecho {0A}Building program "%%a"...{#}{\n} + echo Building program "%%a"... cd %%a - call BUILD.BAT || cecho {0C}Failed building program "%%a"{#}{\n}&&endlocal&&goto ERROR - cecho {0A}Program "%%a" was built{#}{\n\n} + call BUILD.BAT || echo Failed building program "%%a"&&endlocal&&goto ERROR + echo Program "%%a" was built + echo. FOR /F %%b IN ('dir *.ELF /B /A:A') DO ( set "usr_programs_paths=!usr_programs_paths! user/user_programs/%%a/%%b" ) @@ -96,21 +100,22 @@ goto user_programs_loop :user_programs_loop_end endlocal & set user_programs_paths=%usr_programs_paths% -cecho {0A}All selected programs were built{#}{\n\n} +echo All selected programs were built +echo. set errorlevel=0 ::Kernel cd ..\..\kernel -cecho {0A}Building kernel...{#}{\n} -call BUILD.BAT %BUILD_ARGS% || cecho {0C}Failed building kernel{#}{\n}&&goto ERROR -cecho {0A}Kernel was built{#}{\n} +echo Building kernel... +call BUILD.BAT %BUILD_ARGS% || echo Failed building kernel&&goto ERROR +echo Kernel was built cd .. goto eof :ERROR -cecho {0C}Build failed{#}{\n} +echo Build failed cd %~d0%~p0 EXIT /B 1 diff --git a/BUILD_IMAGE.BAT b/BUILD_IMAGE.BAT index 8411f44..1a80c07 100644 --- a/BUILD_IMAGE.BAT +++ b/BUILD_IMAGE.BAT @@ -47,13 +47,13 @@ call BUILD.BAT %BUILD_ARGS% || goto ERROR if "%EFI%"=="1" ( cd efi_bootloader - cecho {0A}Building EFI Bootloader...{#}{\n} + echo Building EFI Bootloader... call BUILD.BAT || goto ERROR - cecho {0A}EFI Bootloader was built{#}{\n} + echo EFI Bootloader was built cd .. ) -cecho {0A}Building %IMAGE_TYPE% Image...{#}{\n} +echo Building %IMAGE_TYPE% Image... if "%IMAGE_TYPE%"=="HD" ( if "%MBR%"=="1" ( @@ -88,13 +88,13 @@ for %%a in ("%user_programs_paths: =" "%") do ( :imageBuilt if "%IMAGE_TYPE%"=="HD" ( del HDImage.vdi >nul 2>&1 - VBoxManage convertfromraw --uuid d32a4d71-7ccb-4864-a684-c9d7c7a425f5 -format VDI HDImage.bin HDImage.vdi || cecho {0C}Failed building VDI HD image{#}{\n}&&goto ERROR + VBoxManage convertfromraw --uuid d32a4d71-7ccb-4864-a684-c9d7c7a425f5 -format VDI HDImage.bin HDImage.vdi || echo Failed building VDI HD image&&goto ERROR ) -cecho {0A}%IMAGE_TYPE% Image was built{#}{\n} +echo %IMAGE_TYPE% Image was built goto eof :ERROR -cecho {0C}Build failed{#}{\n} +echo Build failed cd %~d0%~p0 EXIT /B 1 diff --git a/QEMU_BOOT.BAT b/QEMU_BOOT.BAT index e62a38d..a6021f6 100644 --- a/QEMU_BOOT.BAT +++ b/QEMU_BOOT.BAT @@ -49,7 +49,7 @@ if "%IMAGE_TYPE%"=="HD" ( if "%DEBUG%"=="1" ( call SET_ENV_VARS.BAT - if not exist kernel\CHAOSKRN.SYS_debug cecho {0C}WARNING^^! CHAOSKRN.SYS_debug does not exist{#}{\n} + if not exist kernel\CHAOSKRN.SYS_debug echo WARNING^^! CHAOSKRN.SYS_debug does not exist start /b cmd /c %QEMU_CMD% %QEMU_ARGS% -S -s tools\gdb-multiarch.bat -x kernel_debug.gdb ) else ( diff --git a/efi_bootloader/BUILD.BAT b/efi_bootloader/BUILD.BAT index 1f6c272..859bfe4 100644 --- a/efi_bootloader/BUILD.BAT +++ b/efi_bootloader/BUILD.BAT @@ -5,12 +5,12 @@ mkdir obj >nul 2>&1 set CFLAGS=-g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -fno-common -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -fno-pic -fno-pie -Os -D DISABLE_NEW_DEPRECATED_INTERFACES -c -Ilib/MdePkg/Include -Ilib/MdePkg/Include/Ia32 -cecho {09}Compiling{0F}{\t}==^> AutoGen.c...{#} +echo|set /p dummy="Compiling ==> AutoGen.c..." i686-elf-gcc %CFLAGS% -include src/AutoGen.h -o obj/AutoGen.obj src/AutoGen.c || goto ERROR -cecho {0a}done{#}{\n} -cecho {09}Compiling{0F}{\t}==^> efiboot.c...{#} +echo done +echo|set /p dummy="Compiling ==> efiboot.c..." i686-elf-gcc %CFLAGS% -o obj/efiboot.obj src/efiboot.c || goto ERROR -cecho {0a}done{#}{\n} +echo done setlocal EnableDelayedExpansion @@ -21,9 +21,9 @@ FOR /R obj %%G IN (*.obj) DO ( endlocal -cecho {09}Creating Archive{0F}{\t}==^> efiboot.lib...{#} +echo|set /p dummy="Creating Archive ==> efiboot.lib..." i686-elf-ar cr efiboot.lib @obj/object_files.lst || goto ERROR -cecho {0a}done{#}{\n} +echo done for /F "tokens=*" %%A in (static_library_files.lst) do ( if not exist %%A ( @@ -35,22 +35,22 @@ for /F "tokens=*" %%A in (static_library_files.lst) do ( ) ) -cecho {09}Linking{0F}{\t}==^> efiboot.dll...{#} +echo|set /p dummy="Linking ==> efiboot.dll..." i686-elf-gcc -o efiboot.dll -nostdlib -Wl,-n,-q,--gc-sections -Wl,--entry,_ModuleEntryPoint -u _ModuleEntryPoint -Wl,-Map,efiboot.map,--whole-archive -Os -Wl,-m,elf_i386,--oformat=elf32-i386 -Wl,--start-group,@static_library_files.lst,--end-group -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -fno-common -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -fno-pic -fno-pie -Os -D DISABLE_NEW_DEPRECATED_INTERFACES -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 -Wl,--script=GccBase.lds -Wno-error || goto ERROR -cecho {0a}done{#}{\n} +echo done -cecho {09}Generating EFI App{0F}{\t}==^> BOOTIA32.EFI...{#} +echo|set /p dummy="Generating EFI App ==> BOOTIA32.EFI..." i686-elf-objcopy efiboot.dll || goto ERROR copy efiboot.dll efiboot.debug >nul 2>&1 i686-elf-objcopy --strip-unneeded -R .eh_frame efiboot.dll || goto ERROR i686-elf-objcopy --add-gnu-debuglink=efiboot.debug efiboot.dll || goto ERROR GenFw.exe -e UEFI_APPLICATION -o BOOTIA32.EFI efiboot.dll || goto ERROR -cecho {0a}done{#}{\n} +echo done goto EOF :ERROR -cecho {0C}Error{#}{\n} +echo Error EXIT /B 1 :EOF diff --git a/efi_bootloader/lib/BUILD.BAT b/efi_bootloader/lib/BUILD.BAT index 2e0fb3e..d3df5bd 100644 --- a/efi_bootloader/lib/BUILD.BAT +++ b/efi_bootloader/lib/BUILD.BAT @@ -1,82 +1,94 @@ @echo off cd %~d0%~p0 -cecho {0A}Building BaseDebugPrintErrorLevelLib...{#}{\n} +echo Building BaseDebugPrintErrorLevelLib... cd BaseDebugPrintErrorLevelLib call BUILD.BAT || goto ERROR cd .. -cecho {0A}BaseDebugPrintErrorLevelLib was built{#}{\n\n} +echo BaseDebugPrintErrorLevelLib was built +echo. -cecho {0A}Building BaseLib...{#}{\n} +echo Building BaseLib... cd BaseLib call BUILD.BAT || goto ERROR cd .. -cecho {0A}BaseLib was built{#}{\n\n} +echo BaseLib was built +echo. -cecho {0A}Building BaseMemoryLib...{#}{\n} +echo Building BaseMemoryLib... cd BaseMemoryLib call BUILD.BAT || goto ERROR cd .. -cecho {0A}BaseMemoryLib was built{#}{\n\n} +echo BaseMemoryLib was built +echo. -cecho {0A}Building BasePcdLibNull...{#}{\n} +echo Building BasePcdLibNull... cd BasePcdLibNull call BUILD.BAT || goto ERROR cd .. -cecho {0A}BasePcdLibNull was built{#}{\n\n} +echo BasePcdLibNull was built +echo. -cecho {0A}Building BasePrintLib...{#}{\n} +echo Building BasePrintLib... cd BasePrintLib call BUILD.BAT || goto ERROR cd .. -cecho {0A}BasePrintLib was built{#}{\n\n} +echo BasePrintLib was built +echo. -cecho {0A}Building UefiApplicationEntryPoint...{#}{\n} +echo Building UefiApplicationEntryPoint... cd UefiApplicationEntryPoint call BUILD.BAT || goto ERROR cd .. -cecho {0A}UefiApplicationEntryPoint was built{#}{\n\n} +echo UefiApplicationEntryPoint was built +echo. -cecho {0A}Building UefiBootServicesTableLib...{#}{\n} +echo Building UefiBootServicesTableLib... cd UefiBootServicesTableLib call BUILD.BAT || goto ERROR cd .. -cecho {0A}UefiBootServicesTableLib was built{#}{\n\n} +echo UefiBootServicesTableLib was built +echo. -cecho {0A}Building UefiDebugLibStdErr...{#}{\n} +echo Building UefiDebugLibStdErr... cd UefiDebugLibStdErr call BUILD.BAT || goto ERROR cd .. -cecho {0A}UefiDebugLibStdErr was built{#}{\n\n} +echo UefiDebugLibStdErr was built +echo. -cecho {0A}Building UefiDevicePathLib...{#}{\n} +echo Building UefiDevicePathLib... cd UefiDevicePathLib call BUILD.BAT || goto ERROR cd .. -cecho {0A}UefiDevicePathLib was built{#}{\n\n} +echo UefiDevicePathLib was built +echo. -cecho {0A}Building UefiLib...{#}{\n} +echo Building UefiLib... cd UefiLib call BUILD.BAT || goto ERROR cd .. -cecho {0A}UefiLib was built{#}{\n\n} +echo UefiLib was built +echo. -cecho {0A}Building UefiMemoryAllocationLib...{#}{\n} +echo Building UefiMemoryAllocationLib... cd UefiMemoryAllocationLib call BUILD.BAT || goto ERROR cd .. -cecho {0A}UefiMemoryAllocationLib was built{#}{\n\n} +echo UefiMemoryAllocationLib was built +echo. -cecho {0A}Building UefiRuntimeServicesTableLib...{#}{\n} +echo Building UefiRuntimeServicesTableLib... cd UefiRuntimeServicesTableLib call BUILD.BAT || goto ERROR cd .. -cecho {0A}UefiRuntimeServicesTableLib was built{#}{\n\n} +echo UefiRuntimeServicesTableLib was built +echo. goto EOF :ERROR -cecho {0C}Error{#}{\n} +echo Error EXIT /B 1 :EOF diff --git a/efi_bootloader/lib/BaseDebugPrintErrorLevelLib/BUILD.BAT b/efi_bootloader/lib/BaseDebugPrintErrorLevelLib/BUILD.BAT index 696d06e..bf6584e 100644 --- a/efi_bootloader/lib/BaseDebugPrintErrorLevelLib/BUILD.BAT +++ b/efi_bootloader/lib/BaseDebugPrintErrorLevelLib/BUILD.BAT @@ -3,10 +3,10 @@ cd %~d0%~p0 call CLEAN.BAT mkdir obj >nul 2>&1 -cecho {09}Compiling{0F}{\t}==^> BaseDebugPrintErrorLevelLib.c...{#} +echo|set /p dummy="Compiling ==> BaseDebugPrintErrorLevelLib.c..." i686-elf-gcc -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include src/AutoGen.h -fno-common -DSTRING_ARRAY_NAME=BaseDebugPrintErrorLevelLibStrings -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -fno-pic -fno-pie -Os -D DISABLE_NEW_DEPRECATED_INTERFACES -c -o obj/BaseDebugPrintErrorLevelLib.obj -I../MdePkg -I../MdePkg/Include -I../MdePkg/Include/Ia32 src/BaseDebugPrintErrorLevelLib.c || exit /B 1 -cecho {0a}done{#}{\n} +echo done -cecho {09}Creating Archive{0F}{\t}==^> BaseDebugPrintErrorLevelLib.lib...{#} +echo|set /p dummy="Creating Archive ==> BaseDebugPrintErrorLevelLib.lib..." i686-elf-ar cr BaseDebugPrintErrorLevelLib.lib obj/BaseDebugPrintErrorLevelLib.obj || exit /B 1 -cecho {0a}done{#}{\n} +echo done diff --git a/efi_bootloader/lib/BaseLib/BUILD.BAT b/efi_bootloader/lib/BaseLib/BUILD.BAT index 3bf7ea2..b558772 100644 --- a/efi_bootloader/lib/BaseLib/BUILD.BAT +++ b/efi_bootloader/lib/BaseLib/BUILD.BAT @@ -6,23 +6,24 @@ mkdir obj\Ia32 >nul 2>&1 set CFLAGS=-g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include src/AutoGen.h -fno-common -DSTRING_ARRAY_NAME=BaseLibStrings -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -fno-pic -fno-pie -Os -D DISABLE_NEW_DEPRECATED_INTERFACES -c -Isrc -Isrc/Ia32 -I../MdePkg/Include -I../MdePkg/Include/Ia32 -cecho {09}Compiling{0F}{\t}==^> DivS64x64Remainder.c...{#} +echo|set /p dummy="Compiling ==> DivS64x64Remainder.c..." i686-elf-gcc %CFLAGS% -o obj/Ia32/DivS64x64Remainder.obj src/Ia32/DivS64x64Remainder.c || exit /B 1 -cecho {0a}done{#}{\n} -cecho {09}Compiling{0F}{\t}==^> GccInline.c...{#} +echo done +echo|set /p dummy="Compiling ==> GccInline.c..." i686-elf-gcc %CFLAGS% -o obj/Ia32/GccInline.obj src/Ia32/GccInline.c || exit /B 1 -cecho {0a}done{#}{\n} -cecho {09}Compiling{0F}{\t}==^> Non-existing.c...{#} +echo done +echo|set /p dummy="Compiling ==> Non-existing.c..." i686-elf-gcc %CFLAGS% -o obj/Ia32/Non-existing.obj src/Ia32/Non-existing.c || exit /B 1 -cecho {0a}done{#}{\n} +echo done setlocal EnableDelayedExpansion FOR %%G IN (src/*.c) DO ( set "xyz=%%G" - cecho {09}Compiling{0F}{\t}==^> %%G...{#} + echo|set /p dummy="Compiling ==> %%G..." i686-elf-gcc %CFLAGS% -o obj/!xyz:~,-2!.obj src/%%G || exit /B 1 - cecho {0a}done{#}{\n} + echo|set /p dummy="done" + echo. ) endlocal @@ -36,11 +37,12 @@ setlocal EnableDelayedExpansion FOR %%G IN (src/Ia32/*.nasm) DO ( set "xyz=%%G" set "yz=!xyz:~,-5!" - cecho {09}Assembling{0F}{\t}==^> %%G...{#} + echo|set /p dummy="Assembling ==> %%G..." i686-elf-gcc %CFLAGS% src/Ia32/%%G > obj/Ia32/!yz!.i || exit /B 1 call Trim --trim-long --source-code -o obj/Ia32/!yz!.iii obj/Ia32/!yz!.i || exit /B 1 "nasm" %NASMFLAGS% -o obj/Ia32/!yz!.obj obj/Ia32/!yz!.iii || exit /B 1 - cecho {0a}done{#}{\n} + echo|set /p dummy="done" + echo. ) @@ -51,6 +53,6 @@ FOR /R obj %%G IN (*.obj) DO ( endlocal -cecho {09}Creating Archive{0F}{\t}==^> BaseLib.lib...{#} +echo|set /p dummy="Creating Archive ==> BaseLib.lib..." i686-elf-ar cr BaseLib.lib @obj/object_files.lst || exit /B 1 -cecho {0a}done{#}{\n} +echo done diff --git a/efi_bootloader/lib/BaseMemoryLib/BUILD.BAT b/efi_bootloader/lib/BaseMemoryLib/BUILD.BAT index 07755e0..edb2d4a 100644 --- a/efi_bootloader/lib/BaseMemoryLib/BUILD.BAT +++ b/efi_bootloader/lib/BaseMemoryLib/BUILD.BAT @@ -9,9 +9,10 @@ setlocal EnableDelayedExpansion FOR %%G IN (src/*.c) DO ( set "xyz=%%G" - cecho {09}Compiling {0F}{\t}==^> %%G...{#} + echo|set /p dummy="Compiling ==> %%G..." i686-elf-gcc %CFLAGS% -o obj/!xyz:~,-2!.obj src/%%G || exit /B 1 - cecho {0a}done{#}{\n} + echo|set /p dummy="done" + echo. ) @@ -22,6 +23,6 @@ FOR /R obj %%G IN (*.obj) DO ( endlocal -cecho {09}Creating Archive{0F}{\t}==^> BaseMemoryLib.lib...{#} +echo|set /p dummy="Creating Archive ==> BaseMemoryLib.lib..." i686-elf-ar cr BaseMemoryLib.lib @obj/object_files.lst || exit /B 1 -cecho {0a}done{#}{\n} +echo done diff --git a/efi_bootloader/lib/BasePcdLibNull/BUILD.BAT b/efi_bootloader/lib/BasePcdLibNull/BUILD.BAT index 2582f14..5e3cc71 100644 --- a/efi_bootloader/lib/BasePcdLibNull/BUILD.BAT +++ b/efi_bootloader/lib/BasePcdLibNull/BUILD.BAT @@ -3,10 +3,10 @@ cd %~d0%~p0 call CLEAN.BAT mkdir obj >nul 2>&1 -cecho {09}Compiling {0F}{\t}==^> PcdLib.c...{#} +echo|set /p dummy="Compiling ==> PcdLib.c..." i686-elf-gcc -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include src/AutoGen.h -fno-common -DSTRING_ARRAY_NAME=BasePcdLibNullStrings -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -fno-pic -fno-pie -Os -D DISABLE_NEW_DEPRECATED_INTERFACES -c -o obj/PcdLib.obj -I../MdePkg/Include -I../MdePkg/Include/Ia32 src/PcdLib.c || exit /B 1 -cecho {0a}done{#}{\n} +echo done -cecho {09}Creating Archive{0F}{\t}==^> BasePcdLibNull.lib...{#} +echo|set /p dummy="Creating Archive ==> BasePcdLibNull.lib..." i686-elf-ar cr BasePcdLibNull.lib obj/PcdLib.obj || exit /B 1 -cecho {0a}done{#}{\n} +echo done diff --git a/efi_bootloader/lib/BasePrintLib/BUILD.BAT b/efi_bootloader/lib/BasePrintLib/BUILD.BAT index 3414fc1..f306708 100644 --- a/efi_bootloader/lib/BasePrintLib/BUILD.BAT +++ b/efi_bootloader/lib/BasePrintLib/BUILD.BAT @@ -5,15 +5,15 @@ mkdir obj >nul 2>&1 set CFLAGS=-g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include src/AutoGen.h -fno-common -DSTRING_ARRAY_NAME=BasePrintLibStrings -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -fno-pic -fno-pie -Os -D DISABLE_NEW_DEPRECATED_INTERFACES -c -I../MdePkg/Include -I../MdePkg/Include/Ia32 -cecho {09}Compiling{0F}{\t}==^> PrintLib.c...{#} +echo|set /p dummy="Compiling ==> PrintLib.c..." i686-elf-gcc %CFLAGS% -o obj/PrintLib.obj src/PrintLib.c || exit /B 1 -cecho {0a}done{#}{\n} -cecho {09}Compiling{0F}{\t}==^> PrintLibInternal.c...{#} +echo done +echo|set /p dummy="Compiling ==> PrintLibInternal.c..." i686-elf-gcc %CFLAGS% -o obj/PrintLibInternal.obj src/PrintLibInternal.c || exit /B 1 -cecho {0a}done{#}{\n} +echo done -cecho {09}Creating Archive{0F}{\t}==^> BasePrintLib.lib...{#} +echo|set /p dummy="Creating Archive ==> BasePrintLib.lib..." i686-elf-ar cr BasePrintLib.lib obj/PrintLib.obj obj/PrintLibInternal.obj || exit /B 1 -cecho {0a}done{#}{\n} +echo done exit /B diff --git a/efi_bootloader/lib/UefiApplicationEntryPoint/BUILD.BAT b/efi_bootloader/lib/UefiApplicationEntryPoint/BUILD.BAT index c1993d6..6691a5a 100644 --- a/efi_bootloader/lib/UefiApplicationEntryPoint/BUILD.BAT +++ b/efi_bootloader/lib/UefiApplicationEntryPoint/BUILD.BAT @@ -3,10 +3,10 @@ cd %~d0%~p0 call CLEAN.BAT mkdir obj >nul 2>&1 -cecho {09}Compiling {0F}{\t}==^> ApplicationEntryPoint.c...{#} +echo|set /p dummy="Compiling ==> ApplicationEntryPoint.c..." i686-elf-gcc -g -fshort-wchar -fno-leading-underscore -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include src/AutoGen.h -fno-common -DSTRING_ARRAY_NAME=UefiApplicationEntryPointStrings -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -fno-pic -fno-pie -Os -D DISABLE_NEW_DEPRECATED_INTERFACES -c -o obj/ApplicationEntryPoint.obj -I../MdePkg/Include -I../MdePkg/Include/Ia32 src/ApplicationEntryPoint.c || exit /B 1 -cecho {0a}done{#}{\n} +echo done -cecho {09}Creating Archive{0F}{\t}==^> UefiApplicationEntryPoint.lib...{#} +echo|set /p dummy="Creating Archive ==> UefiApplicationEntryPoint.lib..." i686-elf-ar cr UefiApplicationEntryPoint.lib obj/ApplicationEntryPoint.obj || exit /B 1 -cecho {0a}done{#}{\n} +echo done diff --git a/efi_bootloader/lib/UefiBootServicesTableLib/BUILD.BAT b/efi_bootloader/lib/UefiBootServicesTableLib/BUILD.BAT index b15af86..71fd6ed 100644 --- a/efi_bootloader/lib/UefiBootServicesTableLib/BUILD.BAT +++ b/efi_bootloader/lib/UefiBootServicesTableLib/BUILD.BAT @@ -3,10 +3,10 @@ cd %~d0%~p0 call CLEAN.BAT mkdir obj >nul 2>&1 -cecho {09}Compiling {0F}{\t}==^> UefiBootServicesTableLib.c...{#} +echo|set /p dummy="Compiling ==> UefiBootServicesTableLib.c..." i686-elf-gcc -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include src/AutoGen.h -fno-common -DSTRING_ARRAY_NAME=UefiBootServicesTableLibStrings -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -fno-pic -fno-pie -Os -D DISABLE_NEW_DEPRECATED_INTERFACES -c -o obj/UefiBootServicesTableLib.obj -I../MdePkg/Include -I../MdePkg/Include/Ia32 src/UefiBootServicesTableLib.c || exit /B 1 -cecho {0a}done{#}{\n} +echo done -cecho {09}Creating Archive{0F}{\t}==^> UefiBootServicesTableLib.lib...{#} +echo|set /p dummy="Creating Archive ==> UefiBootServicesTableLib.lib..." i686-elf-ar cr UefiBootServicesTableLib.lib obj/UefiBootServicesTableLib.obj || exit /B 1 -cecho {0a}done{#}{\n} +echo done diff --git a/efi_bootloader/lib/UefiDebugLibStdErr/BUILD.BAT b/efi_bootloader/lib/UefiDebugLibStdErr/BUILD.BAT index d1cc5b4..3426d34 100644 --- a/efi_bootloader/lib/UefiDebugLibStdErr/BUILD.BAT +++ b/efi_bootloader/lib/UefiDebugLibStdErr/BUILD.BAT @@ -5,13 +5,13 @@ mkdir obj >nul 2>&1 set CFLAGS=-g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include src/AutoGen.h -fno-common -DSTRING_ARRAY_NAME=UefiBootServicesTableLibStrings -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -fno-pic -fno-pie -Os -D DISABLE_NEW_DEPRECATED_INTERFACES -c -I../MdePkg/Include -I../MdePkg/Include/Ia32 -cecho {09}Compiling {0F}{\t}==^> DebugLib.c...{#} +echo|set /p dummy="Compiling ==> DebugLib.c..." i686-elf-gcc %CFLAGS% -o obj/DebugLib.obj src/DebugLib.c || exit /B 1 -cecho {0a}done{#}{\n} -cecho {09}Compiling {0F}{\t}==^> DebugLibConstructor.c...{#} +echo done +echo|set /p dummy="Compiling ==> DebugLibConstructor.c..." i686-elf-gcc %CFLAGS% -o obj/DebugLibConstructor.obj src/DebugLibConstructor.c || exit /B 1 -cecho {0a}done{#}{\n} +echo done -cecho {09}Creating Archive{0F}{\t}==^> UefiDebugLibStdErr.lib...{#} +echo|set /p dummy="Creating Archive ==> UefiDebugLibStdErr.lib..." i686-elf-ar cr UefiDebugLibStdErr.lib obj/DebugLib.obj obj/DebugLibConstructor.obj || exit /B 1 -cecho {0a}done{#}{\n} +echo done diff --git a/efi_bootloader/lib/UefiDevicePathLib/BUILD.BAT b/efi_bootloader/lib/UefiDevicePathLib/BUILD.BAT index 3827b41..cb08893 100644 --- a/efi_bootloader/lib/UefiDevicePathLib/BUILD.BAT +++ b/efi_bootloader/lib/UefiDevicePathLib/BUILD.BAT @@ -5,19 +5,19 @@ mkdir obj >nul 2>&1 set CFLAGS=-g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include src/AutoGen.h -fno-common -DSTRING_ARRAY_NAME=UefiDevicePathLibStrings -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -fno-pic -fno-pie -Os -D DISABLE_NEW_DEPRECATED_INTERFACES -c -I../MdePkg/Library/UefiDevicePathLib -I../MdePkg/Include -I../MdePkg/Include/Ia32 -cecho {09}Compiling {0F}{\t}==^> DevicePathFromText.c...{#} +echo|set /p dummy="Compiling ==> DevicePathFromText.c..." i686-elf-gcc %CFLAGS% -o obj/DevicePathFromText.obj src/DevicePathFromText.c || exit /B 1 -cecho {0a}done{#}{\n} -cecho {09}Compiling {0F}{\t}==^> DevicePathToText.c...{#} +echo done +echo|set /p dummy="Compiling ==> DevicePathToText.c..." i686-elf-gcc %CFLAGS% -o obj/DevicePathToText.obj src/DevicePathToText.c || exit /B 1 -cecho {0a}done{#}{\n} -cecho {09}Compiling {0F}{\t}==^> DevicePathUtilities.c...{#} +echo done +echo|set /p dummy="Compiling ==> DevicePathUtilities.c..." i686-elf-gcc %CFLAGS% -o obj/DevicePathUtilities.obj src/DevicePathUtilities.c || exit /B 1 -cecho {0a}done{#}{\n} -cecho {09}Compiling {0F}{\t}==^> UefiDevicePathLib.c...{#} +echo done +echo|set /p dummy="Compiling ==> UefiDevicePathLib.c..." i686-elf-gcc %CFLAGS% -o obj/UefiDevicePathLib.obj src/UefiDevicePathLib.c || exit /B 1 -cecho {0a}done{#}{\n} +echo done -cecho {09}Creating Archive{0F}{\t}==^> UefiDevicePathLib.lib...{#} +echo|set /p dummy="Creating Archive ==> UefiDevicePathLib.lib..." i686-elf-ar cr UefiDevicePathLib.lib obj/DevicePathUtilities.obj obj/DevicePathToText.obj obj/DevicePathFromText.obj obj/UefiDevicePathLib.obj || exit /B 1 -cecho {0a}done{#}{\n} +echo done diff --git a/efi_bootloader/lib/UefiLib/BUILD.BAT b/efi_bootloader/lib/UefiLib/BUILD.BAT index 0d9a475..58a3bdc 100644 --- a/efi_bootloader/lib/UefiLib/BUILD.BAT +++ b/efi_bootloader/lib/UefiLib/BUILD.BAT @@ -9,9 +9,10 @@ setlocal EnableDelayedExpansion FOR %%G IN (src/*.c) DO ( set "xyz=%%G" - cecho {09}Compiling {0F}{\t}==^> %%G...{#} + echo|set /p dummy="Compiling ==> %%G..." i686-elf-gcc %CFLAGS% -o obj/!xyz:~,-2!.obj src/%%G || exit /B 1 - cecho {0a}done{#}{\n} + echo|set /p dummy="done" + echo. ) @@ -22,6 +23,6 @@ FOR /R obj %%G IN (*.obj) DO ( endlocal -cecho {09}Creating Archive{0F}{\t}==^> UefiLib.lib...{#} +echo|set /p dummy="Creating Archive ==> UefiLib.lib..." i686-elf-ar cr UefiLib.lib @obj/object_files.lst || exit /B 1 -cecho {0a}done{#}{\n} +echo done diff --git a/efi_bootloader/lib/UefiMemoryAllocationLib/BUILD.BAT b/efi_bootloader/lib/UefiMemoryAllocationLib/BUILD.BAT index c564a0b..9b5eb67 100644 --- a/efi_bootloader/lib/UefiMemoryAllocationLib/BUILD.BAT +++ b/efi_bootloader/lib/UefiMemoryAllocationLib/BUILD.BAT @@ -3,12 +3,12 @@ cd %~d0%~p0 call CLEAN.BAT mkdir obj >nul 2>&1 -cecho {09}Compiling {0F}{\t}==^> MemoryAllocationLib.c...{#} +echo|set /p dummy="Compiling ==> MemoryAllocationLib.c..." i686-elf-gcc -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include src/AutoGen.h -fno-common -DSTRING_ARRAY_NAME=UefiMemoryAllocationLibStrings -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -fno-pic -fno-pie -Os -D DISABLE_NEW_DEPRECATED_INTERFACES -c -o obj/MemoryAllocationLib.obj -I../MdePkg/Include -I../MdePkg/Include/Ia32 src/MemoryAllocationLib.c || exit /B 1 -cecho {0a}done{#}{\n} +echo done -cecho {09}Creating Archive{0F}{\t}==^> UefiMemoryAllocationLib.lib...{#} +echo|set /p dummy="Creating Archive ==> UefiMemoryAllocationLib.lib..." i686-elf-ar cr UefiMemoryAllocationLib.lib obj/MemoryAllocationLib.obj || exit /B 1 -cecho {0a}done{#}{\n} +echo done exit /B diff --git a/efi_bootloader/lib/UefiRuntimeServicesTableLib/BUILD.BAT b/efi_bootloader/lib/UefiRuntimeServicesTableLib/BUILD.BAT index e159f8b..6d23f62 100644 --- a/efi_bootloader/lib/UefiRuntimeServicesTableLib/BUILD.BAT +++ b/efi_bootloader/lib/UefiRuntimeServicesTableLib/BUILD.BAT @@ -3,10 +3,10 @@ cd %~d0%~p0 call CLEAN.BAT mkdir obj >nul 2>&1 -cecho {09}Compiling {0F}{\t}==^> UefiRuntimeServicesTableLib.c...{#} +echo|set /p dummy="Compiling ==> UefiRuntimeServicesTableLib.c..." i686-elf-gcc -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include src/AutoGen.h -fno-common -DSTRING_ARRAY_NAME=UefiRuntimeServicesTableLibStrings -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -fno-pic -fno-pie -Os -D DISABLE_NEW_DEPRECATED_INTERFACES -c -o obj/UefiRuntimeServicesTableLib.obj -I../MdePkg/Include -I../MdePkg/Include/Ia32 src/UefiRuntimeServicesTableLib.c || exit /B 1 -cecho {0a}done{#}{\n} +echo done -cecho {09}Creating Archive{0F}{\t}==^> UefiRuntimeServicesTableLib.lib...{#} +echo|set /p dummy="Creating Archive ==> UefiRuntimeServicesTableLib.lib..." i686-elf-ar cr UefiRuntimeServicesTableLib.lib obj/UefiRuntimeServicesTableLib.obj || exit /B 1 -cecho {0a}done{#}{\n} +echo done diff --git a/kernel/BUILD.bat b/kernel/BUILD.bat index bcd0db8..ef976d1 100644 --- a/kernel/BUILD.bat +++ b/kernel/BUILD.bat @@ -36,7 +36,7 @@ make DEBUG=%DEBUG% TEST=%TEST% VERSION_STRING="%version_string%" VERSION_CHECKSU goto EOF :ERROR -cecho {0C}Error{#}{\n} +echo Error EXIT /B 1 :USAGE diff --git a/kernel/makefile b/kernel/makefile index 36d13a7..3e32e20 100644 --- a/kernel/makefile +++ b/kernel/makefile @@ -22,7 +22,7 @@ OBJCOPY= i686-elf-objcopy obj/%.o: src/%.asm ifeq ($(OS),Windows_NT) - @cecho {09}Assembling{0F}{\t}==^> $<...{#} + @echo|set /p dummy="Assembling ==> $<..." else @printf "\033[1;34mAssembling\033[1;97m\t==> $<...\033[0m" endif @@ -32,14 +32,14 @@ else @$(NASM) $(ASFLAGSOBJ) $< -o $@ endif ifeq ($(OS),Windows_NT) - @cecho .{0a}done{#}{\n} + @echo done else @printf "\033[1;32mdone\033[0m\n" endif obj/%.o: src/%.c ifeq ($(OS),Windows_NT) - @cecho {09}Compiling{0F}{\t}==^> $<...{#} + @echo|set /p dummy="Compiling ==> $<..." else @printf "\033[1;34mCompiling\033[1;97m\t==> $<...\033[0m" endif @@ -57,14 +57,14 @@ else endif endif ifeq ($(OS),Windows_NT) - @cecho .{0a}done{#}{\n} + @echo done else @printf "\033[1;32mdone\033[0m\n" endif obj-test/%.o: src-test/%.c ifeq ($(OS),Windows_NT) - @cecho {09}Compiling test{0F}{\t}==^> $<...{#} + @echo|set /p dummy="Compiling test ==> $<..." else @printf "\033[1;34mCompiling test\033[1;97m\t==> $<...\033[0m" endif @@ -74,7 +74,7 @@ else @$(CC) $(CFLAGS) -Isrc-test/include -c -o $@ $< endif ifeq ($(OS),Windows_NT) - @cecho .{0a}done{#}{\n} + @echo done else @printf "\033[1;32mdone\033[0m\n" endif @@ -86,33 +86,33 @@ CHAOSKRN.SYS: $(OBJECTS) endif ifeq ($(DEBUG), 1) ifeq ($(OS),Windows_NT) - @cecho {09}Linking Kernel{0F}{\t}==^> CHAOSKRN.SYS_debug...{#} + @echo|set /p dummy="Linking Kernel ==> CHAOSKRN.SYS_debug..." else @printf "\033[1;34mLinking Kernel\033[1;97m\t==> CHAOSKRN.SYS_debug...\033[0m" endif @$(LD) $(LDFLAGSDEBUG) $+ -o $@_debug ifeq ($(OS),Windows_NT) - @cecho .{0a}done{#}{\n} - @cecho {09}Stripping CHAOSKRN.SYS_debug{0F}{\t}==^> CHAOSKRN.SYS...{#} + @echo done + @echo|set /p dummy="Stripping CHAOSKRN.SYS_debug ==> CHAOSKRN.SYS..." else @printf "\033[1;32mdone\033[0m\n" @printf "\033[1;34mStripping CHAOSKRN.SYS_debug\033[1;97m\t==> CHAOSKRN.SYS...\033[0m" endif @$(OBJCOPY) -O binary $@_debug $@ ifeq ($(OS),Windows_NT) - @cecho .{0a}done{#}{\n} + @echo done else @printf "\033[1;32mdone\033[0m\n" endif else ifeq ($(OS),Windows_NT) - @cecho {09}Linking Kernel{0F}{\t}==^> CHAOSKRN.SYS...{#} + @echo|set /p dummy="Linking Kernel ==> CHAOSKRN.SYS..." else @printf "\033[1;34mLinking Kernel\033[1;97m\t==> CHAOSKRN.SYS...\033[0m" endif @$(LD) $(LDFLAGS) $+ -o $@ ifeq ($(OS),Windows_NT) - @cecho .{0a}done{#}{\n} + @echo done else @printf "\033[1;32mdone\033[0m\n" endif diff --git a/user/user_programs/cpptest/makefile b/user/user_programs/cpptest/makefile index a30be39..a64e2c0 100644 --- a/user/user_programs/cpptest/makefile +++ b/user/user_programs/cpptest/makefile @@ -11,7 +11,7 @@ LD= i686-elf-ld all: CPPTEST.ELF ifeq ($(OS),Windows_NT) - @cecho .{09}Cleaning up...{#}{\n} + @echo Cleaning up... @del *.o else @printf "\033[1;34mCleaning up...\033[0m\n" @@ -20,26 +20,26 @@ endif CPPTEST.ELF: program.o ifeq ($(OS),Windows_NT) - @cecho {09}Linking program{0F}{\t}==^> $@...{#} + @echo|set /p dummy="Linking program ==> $@..." else @printf "\033[1;34mLinking program\033[1;97m\t==> $@...\033[0m" endif @$(LD) $(LDFLAGS) -L$(USERLIB) -luser $+ -o $@ ifeq ($(OS),Windows_NT) - @cecho .{0a}done{#}{\n} + @echo done else @printf "\033[1;32mdone\033[0m\n" endif program.o: program.cpp ifeq ($(OS),Windows_NT) - @cecho {09}Compiling{0F}{\t}==^> $<...{#} + @echo|set /p dummy="Compiling ==> $<..." else @printf "\033[1;34mCompiling\033[1;97m\t==> $<...\033[0m" endif @$(CC) -c $(CFLAGS) $< -o $@ ifeq ($(OS),Windows_NT) - @cecho .{0a}done{#}{\n} + @echo done else @printf "\033[1;32mdone\033[0m\n" endif diff --git a/user/user_programs/pcilist/makefile b/user/user_programs/pcilist/makefile index 36ef6b4..f0ab63a 100644 --- a/user/user_programs/pcilist/makefile +++ b/user/user_programs/pcilist/makefile @@ -11,7 +11,7 @@ LD= i686-elf-ld all: PCILIST.ELF ifeq ($(OS),Windows_NT) - @cecho .{09}Cleaning up...{#}{\n} + @echo Cleaning up... @del *.o else @printf "\033[1;34mCleaning up...\033[0m\n" @@ -20,26 +20,26 @@ endif PCILIST.ELF: program.o ifeq ($(OS),Windows_NT) - @cecho {09}Linking program{0F}{\t}==^> $@...{#} + @echo|set /p dummy="Linking program ==> $@..." else @printf "\033[1;34mLinking program\033[1;97m\t==> $@...\033[0m" endif @$(LD) $(LDFLAGS) -L$(USERLIB) -luser $+ -o $@ ifeq ($(OS),Windows_NT) - @cecho .{0a}done{#}{\n} + @echo done else @printf "\033[1;32mdone\033[0m\n" endif program.o: program.c ifeq ($(OS),Windows_NT) - @cecho {09}Compiling{0F}{\t}==^> $<...{#} + @echo|set /p dummy="Compiling ==> $<..." else @printf "\033[1;34mCompiling\033[1;97m\t==> $<...\033[0m" endif @$(CC) -c $(CFLAGS) $< -o $@ ifeq ($(OS),Windows_NT) - @cecho .{0a}done{#}{\n} + @echo done else @printf "\033[1;32mdone\033[0m\n" endif diff --git a/user/user_programs/raycaster/makefile b/user/user_programs/raycaster/makefile index da6e320..8acbdcd 100644 --- a/user/user_programs/raycaster/makefile +++ b/user/user_programs/raycaster/makefile @@ -11,7 +11,7 @@ LD= i686-elf-ld all: RAYCAST.ELF ifeq ($(OS),Windows_NT) - @cecho .{09}Cleaning up...{#}{\n} + @echo Cleaning up... @del *.o else @printf "\033[1;34mCleaning up...\033[0m\n" @@ -20,26 +20,26 @@ endif RAYCAST.ELF: program.o ifeq ($(OS),Windows_NT) - @cecho {09}Linking program{0F}{\t}==^> $@...{#} + @echo|set /p dummy="Linking program ==> $@..." else @printf "\033[1;34mLinking program\033[1;97m\t==> $@...\033[0m" endif @$(LD) $(LDFLAGS) -L$(USERLIB) -luser $+ -o $@ ifeq ($(OS),Windows_NT) - @cecho .{0a}done{#}{\n} + @echo done else @printf "\033[1;32mdone\033[0m\n" endif program.o: program.c ifeq ($(OS),Windows_NT) - @cecho {09}Compiling{0F}{\t}==^> $<...{#} + @echo|set /p dummy="Compiling ==> $<..." else @printf "\033[1;34mCompiling\033[1;97m\t==> $<...\033[0m" endif @$(CC) -c $(CFLAGS) $< -o $@ ifeq ($(OS),Windows_NT) - @cecho .{0a}done{#}{\n} + @echo done else @printf "\033[1;32mdone\033[0m\n" endif diff --git a/user/user_programs/shell/makefile b/user/user_programs/shell/makefile index 839c1a1..347f4af 100644 --- a/user/user_programs/shell/makefile +++ b/user/user_programs/shell/makefile @@ -11,7 +11,7 @@ LD= i686-elf-ld all: SHELL.ELF ifeq ($(OS),Windows_NT) - @cecho .{09}Cleaning up...{#}{\n} + @echo Cleaning up... @del *.o else @printf "\033[1;34mCleaning up...\033[0m\n" @@ -20,26 +20,26 @@ endif SHELL.ELF: program.o ifeq ($(OS),Windows_NT) - @cecho {09}Linking program{0F}{\t}==^> $@...{#} + @echo|set /p dummy="Linking program ==> $@..." else @printf "\033[1;34mLinking program\033[1;97m\t==> $@...\033[0m" endif @$(LD) $(LDFLAGS) -L$(USERLIB) -luser $+ -o $@ ifeq ($(OS),Windows_NT) - @cecho .{0a}done{#}{\n} + @echo done else @printf "\033[1;32mdone\033[0m\n" endif program.o: program.c ifeq ($(OS),Windows_NT) - @cecho {09}Compiling{0F}{\t}==^> $<...{#} + @echo|set /p dummy="Compiling ==> $<..." else @printf "\033[1;34mCompiling\033[1;97m\t==> $<...\033[0m" endif @$(CC) -c $(CFLAGS) $< -o $@ ifeq ($(OS),Windows_NT) - @cecho .{0a}done{#}{\n} + @echo done else @printf "\033[1;32mdone\033[0m\n" endif diff --git a/user/user_programs/threadtest/makefile b/user/user_programs/threadtest/makefile index 0e3f7d5..e2697b7 100644 --- a/user/user_programs/threadtest/makefile +++ b/user/user_programs/threadtest/makefile @@ -11,7 +11,7 @@ LD= i686-elf-ld all: THRDTEST.ELF ifeq ($(OS),Windows_NT) - @cecho .{09}Cleaning up...{#}{\n} + @echo Cleaning up... @del *.o else @printf "\033[1;34mCleaning up...\033[0m\n" @@ -20,26 +20,26 @@ endif THRDTEST.ELF: program.o ifeq ($(OS),Windows_NT) - @cecho {09}Linking program{0F}{\t}==^> $@...{#} + @echo|set /p dummy="Linking program ==> $@..." else @printf "\033[1;34mLinking program\033[1;97m\t==> $@...\033[0m" endif @$(LD) $(LDFLAGS) -L$(USERLIB) -luser $+ -o $@ ifeq ($(OS),Windows_NT) - @cecho .{0a}done{#}{\n} + @echo done else @printf "\033[1;32mdone\033[0m\n" endif program.o: program.c ifeq ($(OS),Windows_NT) - @cecho {09}Compiling{0F}{\t}==^> $<...{#} + @echo|set /p dummy="Compiling ==> $<..." else @printf "\033[1;34mCompiling\033[1;97m\t==> $<...\033[0m" endif @$(CC) -c $(CFLAGS) $< -o $@ ifeq ($(OS),Windows_NT) - @cecho .{0a}done{#}{\n} + @echo done else @printf "\033[1;32mdone\033[0m\n" endif