From 69252dd603da19a607383be3b8688bb8622dd3a6 Mon Sep 17 00:00:00 2001 From: "Mihail Semenyako (mike.dld)" Date: Fri, 20 Apr 2007 03:21:48 +0000 Subject: [PATCH] Updated makefile to match build.bat (build with e.g. 'make all lang=en') Made small synt/func corrections in build.bat git-svn-id: svn://kolibrios.org@467 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/blkdev/hd_drv.inc | 2 +- kernel/trunk/build.bat | 28 ++++++++---------- kernel/trunk/fs/ntfs.inc | 2 +- kernel/trunk/makefile | 54 +++++++++++++++++++++++++++------- kernel/trunk/unpacker.inc | 2 +- 5 files changed, 59 insertions(+), 29 deletions(-) diff --git a/kernel/trunk/blkdev/hd_drv.inc b/kernel/trunk/blkdev/hd_drv.inc index b15fbdf61c..86e66d2b6e 100755 --- a/kernel/trunk/blkdev/hd_drv.inc +++ b/kernel/trunk/blkdev/hd_drv.inc @@ -6,7 +6,7 @@ $Revision$ ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Low-level driver for HDD access +; Low-level driver for HDD access ; DMA support by Mario79 ;************************************************************************** diff --git a/kernel/trunk/build.bat b/kernel/trunk/build.bat index 671f296168..858cfbcc5e 100644 --- a/kernel/trunk/build.bat +++ b/kernel/trunk/build.bat @@ -1,7 +1,7 @@ @echo off set languages=en ru ge et -set drivers=sound sis infinity ati2d +set drivers=sound sis infinity ati2d vmode set targets=all kernel drivers skins clean call :Check_Target %1 @@ -10,8 +10,8 @@ call :Target_%target% if ERRORLEVEL 0 goto Exit_OK -echo Probably at runing has been created error -echo For help send a report... +echo There was an error executing script. +echo For any help, please send a report. pause goto :eof @@ -24,9 +24,8 @@ goto :eof for %%a in (%languages%) do if %%a==%res% set lang=%res% if defined lang goto :eof - echo Language "%res%" is not founded - echo Enter valide languege - echo [%languages%] + echo Language '%res%' is incorrect + echo Enter valid language [ %languages% ]: set /P res="> goto Check_Lang_loop @@ -38,9 +37,8 @@ goto :eof for %%a in (%targets%) do if %%a==%res% set target=%res% if defined target goto :eof - echo Target "%res%" is not valide - echo Enter valide target - echo [%targets%] + echo Target '%res%' is incorrect + echo Enter valid target [ %targets% ]: set /P res="> goto Check_Target_loop @@ -48,7 +46,7 @@ goto :eof :Target_kernel - echo building kernel with language %lang% ... + echo *** building kernel with language '%lang%' ... if not exist bin mkdir bin echo lang fix %lang% > lang.inc @@ -59,7 +57,6 @@ goto :eof :Target_all - echo building all ... call :Target_kernel call :Target_drivers call :Target_skins @@ -67,7 +64,7 @@ goto :eof :Target_drivers - echo building drivers ... + echo *** building drivers ... if not exist bin\drivers mkdir bin\drivers cd drivers @@ -76,11 +73,12 @@ goto :eof if not %errorlevel%==0 goto :Error_FasmFailed ) cd .. + move bin\drivers\vmode.obj bin\drivers\vmode.mdr goto :eof :Target_skins - echo building skins ... + echo *** building skins ... if not exist bin\skins mkdir bin\skins cd skin @@ -91,7 +89,7 @@ goto :eof :Target_clean - echo cleaning ... + echo *** cleaning ... del /Q bin\drivers\*.* del /Q bin\skins\*.* @@ -111,4 +109,4 @@ exit 1 :Exit_OK echo all operations has been done pause -exit 0 \ No newline at end of file +exit 0 diff --git a/kernel/trunk/fs/ntfs.inc b/kernel/trunk/fs/ntfs.inc index 1926e9e1cb..97db658034 100755 --- a/kernel/trunk/fs/ntfs.inc +++ b/kernel/trunk/fs/ntfs.inc @@ -6,7 +6,7 @@ $Revision$ ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -ntfs_test_bootsec: +ntfs_test_bootsec: ; in: ebx->buffer, edx=size of partition ; out: CF set <=> invalid ; 1. Name=='NTFS ' diff --git a/kernel/trunk/makefile b/kernel/trunk/makefile index d07df1b9c9..1d6a1b3ad7 100644 --- a/kernel/trunk/makefile +++ b/kernel/trunk/makefile @@ -1,16 +1,48 @@ FASM=fasm -KSRC=kernel.asm -KOUT=kernel.mnt +FLAGS=-m 65536 +languages=en|ru|ge|et +drivers_src=sound sis infinity ati2d vmode +skins_src=default -en: kernel.asm - rm -f lang.inc - echo lang fix en > lang.inc - $(FASM) $(KSRC) $(KOUT) -ru: kernel.asm - rm -f lang.inc - echo lang fix ru > lang.inc - $(FASM) $(KSRC) $(KOUT) +.PHONY: all kernel drivers skins clean + +all: kernel drivers skins + +kernel: check_lang + @echo "*** building kernel with language '$(lang)' ..." + @mkdir -p bin + @echo "lang fix $(lang)" > lang.inc + @echo "--- building 'bin/kernel.mnt' ..." + @$(FASM) $(FLAGS) kernel.asm bin/kernel.mnt + @rm -f lang.inc + +drivers: + @echo "*** building drivers ..." + @mkdir -p bin/drivers + @cd drivers; for f in $(drivers_src); do \ + echo "--- building 'bin/drivers/$${f}.obj' ..."; \ + $(FASM) $(FLAGS) $${f}.asm ../bin/drivers/$${f}.obj; \ + done + @mv bin/drivers/vmode.obj bin/drivers/vmode.mdr + +skins: + @echo "*** building skins ..." + @mkdir -p bin/skins + @cd skin; for f in $(skins_src); do \ + echo "--- building 'bin/skins/$${f}.skn' ..."; \ + $(FASM) $(FLAGS) $${f}.asm ../bin/skins/$${f}.skn; \ + done + +check_lang: + @case "$(lang)" in \ + $(languages)) \ + ;; \ + *) \ + echo "*** error: language is incorrect or not specified"; \ + exit 1; \ + ;; \ + esac clean: - rm -f $(KOUT) + rm -rf bin rm -f lang.inc diff --git a/kernel/trunk/unpacker.inc b/kernel/trunk/unpacker.inc index 91d4e9503f..42cdfd5ca4 100755 --- a/kernel/trunk/unpacker.inc +++ b/kernel/trunk/unpacker.inc @@ -6,7 +6,7 @@ $Revision$ ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; void __stdcall unpack(void* packed_data, void* unpacked_data); +; void __stdcall unpack(void* packed_data, void* unpacked_data); unpack: pushad mov esi, [esp+32+4]