From b14aaf5e03e7f42f955e034ae6dc6ae1f1749b47 Mon Sep 17 00:00:00 2001 From: IgorA Date: Fri, 22 Jun 2012 11:36:29 +0000 Subject: [PATCH] update 't_edit', add file 't_edit.ini' git-svn-id: svn://kolibrios.org@2817 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/Vortex86MX-eng/Makefile | 1053 +++++++++++----------- data/eng/Makefile | 1279 +++++++++++++------------- data/new-stack/Makefile | 1 + data/rus/Makefile | 1329 ++++++++++++++-------------- programs/other/t_edit/t_button.inc | 18 +- programs/other/t_edit/t_data.inc | 106 ++- programs/other/t_edit/t_edit.asm | 36 +- programs/other/t_edit/t_edit.ini | 9 + 8 files changed, 1934 insertions(+), 1897 deletions(-) create mode 100644 programs/other/t_edit/t_edit.ini diff --git a/data/Vortex86MX-eng/Makefile b/data/Vortex86MX-eng/Makefile index 55e69c70f..1a3a1cad8 100644 --- a/data/Vortex86MX-eng/Makefile +++ b/data/Vortex86MX-eng/Makefile @@ -1,526 +1,527 @@ -# General rule for naming: variables with CAPITALIZED names hold settings, -# you can - and are expected - to modify it; variables with lowercase names -# are intermediate variables and macroses not to be modified unless you -# know what you're doing. - -# Define directories for destination, source repository, sources of kernel, sources of programs. -BUILD_DIR:=build -REPOSITORY:=../.. -KERNEL:=$(REPOSITORY)/kernel/trunk -PROGS:=$(REPOSITORY)/programs - -# Docpak requires some documents; we place them -# into 'docs' subdir and communicate with FASM -# through environment var DOCDIR. -DOCDIR:=docs/ -export DOCDIR - -# Because most programs are written in FASM and have -# the common structure of one main .asm file possibly including -# several .inc files, we handle this case separately. -# Namely, we organize one big list of such programs -# (FASM_PROGRAMS, see below) containing name of local binary file, -# name of file inside kolibri.img and name of the source file. -# This list is maintained by hand, and the rest is done with some macroses... -# well, slightly complicated macroses - however, you do not need to -# understand them in order to maintain the list. -# To add a FASM program with one .asm file, just -# add the corresponding item to the list and enjoy -# the power of GNU make. - -# The list of all FASM programs with one main FASM file. -# Every item consists of three parts, separated by ':'. -# First part is the real name of binary file in $(BUILD_DIR) -# as it should be produced by make. -# Second part is the name of a file inside kolibri.img, -# usually uppercased version of first part - to save space -# for FAT filesystem. -# Third part is the name of the source file. -# Spaces separate items, so spaces in names should be -# represented as '|'. -FASM_PROGRAMS:=\ - @clip:@CLIP:$(PROGS)/system/clip/trunk/@clip.ASM \ - @menu:@MENU:$(PROGS)/system/menu/trunk/menu.asm \ - @notify:@NOTIFY:$(PROGS)/system/notify/trunk/@notify.asm \ - @panel:@PANEL:$(PROGS)/system/panel/trunk/@PANEL.ASM \ - @rb:@RB:$(PROGS)/system/rb/trunk/@RB.ASM \ - @ss:@SS:$(PROGS)/system/ss/trunk/@ss.asm\ - refrscrn:REFRSCRN:$(PROGS)/system/refrscrn/refrscrn.asm \ - asciivju:ASCIIVJU:$(PROGS)/develop/asciivju/trunk/asciivju.asm \ - calc:CALC:$(PROGS)/other/calc/trunk/calc.asm \ - calendar:CALENDAR:$(PROGS)/system/calendar/trunk/calendar.asm \ - commouse:COMMOUSE:$(PROGS)/system/commouse/trunk/commouse.asm \ - cpu:CPU:$(PROGS)/system/cpu/trunk/cpu.asm \ - cpuid:CPUID:$(PROGS)/system/cpuid/trunk/CPUID.ASM \ - desktop:DESKTOP:$(PROGS)/system/desktop/trunk/desktop.asm \ - disptest:DISPTEST:$(PROGS)/system/disptest/trunk/disptest.ASM \ - docpack:DOCPACK:$(PROGS)/system/docpack/trunk/docpack.asm \ - end:END:$(PROGS)/system/end/light/end.asm \ - gmon:GMON:$(PROGS)/system/gmon/gmon.asm \ - hdd_info:HDD_INFO:$(PROGS)/system/hdd_info/trunk/hdd_info.asm \ - icon:ICON:$(PROGS)/system/icon/trunk/icon.asm \ - cropflat:CROPFLAT:$(PROGS)/system/cropflat/cropflat.asm \ - kbd:KBD:$(PROGS)/system/kbd/trunk/kbd.ASM \ - kpack:KPACK:$(PROGS)/other/kpack/trunk/kpack.asm \ - launcher:LAUNCHER:$(PROGS)/system/launcher/trunk/launcher.asm \ - magnify:MAGNIFY:$(PROGS)/demos/magnify/trunk/magnify.asm \ - mgb:MGB:$(PROGS)/system/mgb/trunk/mgb.asm \ - mousemul:MOUSEMUL:$(PROGS)/system/mousemul/trunk/mousemul.asm \ - madmouse:MADMOUSE:$(PROGS)/other/madmouse/madmouse.asm \ - mykey:MYKEY:$(PROGS)/system/MyKey/trunk/MyKey.asm \ - pcidev:PCIDEV:$(PROGS)/system/pcidev/trunk/PCIDEV.ASM \ - pic4:PIC4:$(PROGS)/media/pic4/trunk/pic4.asm \ - rdsave:RDSAVE:$(PROGS)/system/rdsave/trunk/rdsave.asm \ - rtfread:RTFREAD:$(PROGS)/other/rtfread/trunk/rtfread.asm \ - run:RUN:$(PROGS)/system/run/trunk/run.asm \ - scrshoot:SCRSHOOT:$(PROGS)/media/scrshoot/scrshoot.asm \ - setup:SETUP:$(PROGS)/system/setup/trunk/setup.asm \ - test:TEST:$(PROGS)/system/test/trunk/test.asm \ - tinypad:TINYPAD:$(PROGS)/develop/tinypad/trunk/tinypad.asm \ - zkey:ZKEY:$(PROGS)/system/zkey/trunk/ZKEY.ASM \ - 3d/3dcube2:3D/3DCUBE2:$(PROGS)/demos/3dcube2/trunk/3DCUBE2.ASM \ - 3d/3dsheart:3D/3DSHEART:$(PROGS)/demos/3dsheart/trunk/3dsheart.asm \ - 3d/3dwav:3D/3DWAV:$(PROGS)/demos/3dwav/trunk/3dwav.asm \ - 3d/crownscr:3D/CROWNSCR:$(PROGS)/demos/crownscr/trunk/crownscr.asm \ - 3d/flatwav:3D/FLATWAV:$(PROGS)/demos/flatwav/trunk/FLATWAV.ASM \ - 3d/free3d04:3D/FREE3D04:$(PROGS)/demos/free3d04/trunk/free3d04.asm \ - 3d/view3ds:3D/VIEW3DS:$(PROGS)/demos/3DS/VIEW3DS.ASM \ - demos/bcdclk:DEMOS/BCDCLK:$(PROGS)/demos/bcdclk/trunk/bcdclk.asm \ - demos/circle:DEMOS/CIRCLE:$(PROGS)/develop/examples/circle/trunk/circle.asm \ - demos/colorref:DEMOS/COLORREF:$(PROGS)/demos/colorref/trunk/colorref.asm \ - demos/cslide:DEMOS/CSLIDE:$(PROGS)/demos/cslide/trunk/cslide.asm \ - demos/eyes:DEMOS/EYES:$(PROGS)/demos/eyes/trunk/eyes.asm \ - demos/fire:DEMOS/FIRE:$(PROGS)/demos/fire/trunk/fire.asm \ - demos/firework:DEMOS/FIREWORK:$(PROGS)/demos/firework/trunk/firework.asm \ - demos/movback:DEMOS/MOVBACK:$(PROGS)/demos/movback/trunk/movback.asm \ - demos/plasma:DEMOS/PLASMA:$(PROGS)/demos/plasma/trunk/plasma.asm \ - demos/timer:DEMOS/TIMER:$(PROGS)/demos/timer/trunk/timer.asm \ - demos/tinyfrac:DEMOS/TINYFRAC:$(PROGS)/demos/tinyfrac/trunk/tinyfrac.asm \ - demos/trantest:DEMOS/TRANTEST:$(PROGS)/demos/trantest/trunk/trantest.asm \ - demos/tube:DEMOS/TUBE:$(PROGS)/demos/tube/trunk/tube.asm \ - demos/unvwater:DEMOS/UNVWATER:$(PROGS)/demos/unvwater/trunk/unvwater.asm \ - demos/web:DEMOS/WEB:$(PROGS)/demos/web/trunk/web.asm \ - develop/board:DEVELOP/BOARD:$(PROGS)/system/board/trunk/board.asm \ - develop/cObj:DEVELOP/cObj:$(PROGS)/develop/cObj/trunk/cObj.asm \ - develop/fasm:DEVELOP/FASM:$(PROGS)/develop/fasm/trunk/fasm.asm \ - develop/h2d2b:DEVELOP/H2D2B:$(PROGS)/develop/h2d2b/trunk/h2d2b.asm \ - develop/heed:DEVELOP/HEED:$(PROGS)/develop/heed/trunk/heed.asm \ - develop/ipc:DEVELOP/IPC:$(PROGS)/network/ipc/trunk/ipc.asm \ - develop/keyascii:DEVELOP/KEYASCII:$(PROGS)/develop/keyascii/trunk/keyascii.asm \ - develop/mtdbg:DEVELOP/MTDBG:$(PROGS)/develop/mtdbg/mtdbg.asm \ - develop/scancode:DEVELOP/SCANCODE:$(PROGS)/develop/scancode/trunk/scancode.asm \ - develop/t_edit:DEVELOP/T_EDIT:$(PROGS)/other/t_edit/t_edit.asm \ - develop/test_gets:DEVELOP/test_gets:$(PROGS)/develop/libraries/console/examples/test_gets.asm \ - develop/testcon2:DEVELOP/TESTCON2:$(PROGS)/develop/libraries/console/examples/testcon2.asm \ - develop/thread:DEVELOP/THREAD:$(PROGS)/develop/examples/thread/trunk/thread.asm \ - develop/info/asm.syn:DEVELOP/INFO/ASM.SYN:$(PROGS)/other/t_edit/info/asm_syn.asm \ - develop/info/cpp_kol_cla.syn:DEVELOP/INFO/CPP_KOL_CLA.SYN:$(PROGS)/other/t_edit/info/cpp_kol_cla_syn.asm \ - develop/info/cpp_kol_dar.syn:DEVELOP/INFO/CPP_KOL_DAR.SYN:$(PROGS)/other/t_edit/info/cpp_kol_dar_syn.asm \ - develop/info/cpp_kol_def.syn:DEVELOP/INFO/CPP_KOL_DEF.SYN:$(PROGS)/other/t_edit/info/cpp_kol_def_syn.asm \ - develop/info/default.syn:DEVELOP/INFO/DEFAULT.SYN:$(PROGS)/other/t_edit/info/default_syn.asm \ - develop/info/html.syn:DEVELOP/INFO/HTML.SYN:$(PROGS)/other/t_edit/info/html_syn.asm \ - develop/info/ini_files.syn:DEVELOP/INFO/INI_FILES.SYN:$(PROGS)/other/t_edit/info/ini_files_syn.asm \ - develop/info/win_const.syn:DEVELOP/INFO/WIN_CONST.SYN:$(PROGS)/other/t_edit/info/win_const_syn.asm \ - drivers/com_mouse.obj:DRIVERS/COM_MOUSE.OBJ:$(KERNEL)/drivers/com_mouse.asm \ - drivers/emu10k1x.obj:DRIVERS/EMU10K1X.OBJ:$(KERNEL)/drivers/emu10k1x.asm \ - drivers/fm801.obj:DRIVERS/FM801.OBJ:$(KERNEL)/drivers/fm801.asm \ - drivers/infinity.obj:DRIVERS/INFINITY.OBJ:$(KERNEL)/drivers/infinity.asm \ - drivers/ps2mouse.obj:DRIVERS/PS2MOUSE.OBJ:$(REPOSITORY)/drivers/mouse/ps2mouse4d/trunk/ps2mouse.asm \ - drivers/sb16.obj:DRIVERS/SB16.OBJ:$(KERNEL)/drivers/sb16/sb16.asm \ - drivers/sound.obj:DRIVERS/SOUND.OBJ:$(KERNEL)/drivers/sound.asm \ - drivers/vt8235.obj:DRIVERS/VT8235.OBJ:$(KERNEL)/drivers/vt823x.asm \ - File|Managers/kfar:File|Managers/KFAR:$(PROGS)/fs/kfar/trunk/kfar.asm \ - File|Managers/kfm:File|Managers/KFM:$(PROGS)/fs/kfm/trunk/kfm.asm \ - File|Managers/opendial:File|Managers/OPENDIAL:$(PROGS)/fs/opendial/opendial.asm \ - games/15:GAMES/15:$(PROGS)/games/15/trunk/15.ASM \ - games/arcanii:GAMES/ARCANII:$(PROGS)/games/arcanii/trunk/arcanii.asm \ - games/freecell:GAMES/FREECELL:$(PROGS)/games/freecell/freecell.asm \ - games/gomoku:GAMES/GOMOKU:$(PROGS)/games/gomoku/trunk/gomoku.asm \ - games/invaders:GAMES/INVADERS:$(PROGS)/games/invaders/invaders.asm \ - games/klavisha:GAMES/KLAVISHA:$(PROGS)/games/klavisha/trunk/klavisha.asm \ - games/lines:GAMES/LINES:$(PROGS)/games/lines/lines.asm \ - games/mblocks:GAMES/MBLOCKS:$(PROGS)/games/mblocks/trunk/mblocks.asm \ - games/msquare:GAMES/MSQUARE:$(PROGS)/games/MSquare/trunk/MSquare.asm \ - games/phenix:GAMES/PHENIX:$(PROGS)/games/phenix/trunk/phenix.asm \ - games/pipes:GAMES/PIPES:$(PROGS)/games/pipes/pipes.asm \ - games/pong:GAMES/PONG:$(PROGS)/games/pong/trunk/pong.asm \ - games/pong3:GAMES/PONG3:$(PROGS)/games/pong3/trunk/pong3.asm \ - games/rsquare:GAMES/RSQUARE:$(PROGS)/games/rsquare/trunk/rsquare.asm \ - games/soko:GAMES/SOKO:$(PROGS)/games/soko/trunk/SOKO.ASM \ - games/snake:GAMES/SNAKE:$(PROGS)/games/snake/trunk/snake.asm \ - games/sq_game:GAMES/SQ_GAME:$(PROGS)/games/sq_game/trunk/SQ_GAME.ASM \ - games/sudoku:GAMES/SUDOKU:$(PROGS)/games/sudoku/trunk/sudoku.asm \ - games/sw:GAMES/SW:$(PROGS)/games/sw/trunk/sw.asm \ - games/tanks:GAMES/TANKS:$(PROGS)/games/tanks/trunk/tanks.asm \ - games/tetris:GAMES/TETRIS:$(PROGS)/games/tetris/trunk/tetris.asm \ - lib/archiver.obj:LIB/ARCHIVER.OBJ:$(PROGS)/fs/kfar/trunk/kfar_arc/kfar_arc.asm \ - lib/box_lib.obj:LIB/BOX_LIB.OBJ:$(PROGS)/develop/libraries/box_lib/trunk/box_lib.asm \ - lib/console.obj:LIB/CONSOLE.OBJ:$(PROGS)/develop/libraries/console/console.asm \ - lib/libgfx.obj:LIB/LIBGFX.OBJ:$(PROGS)/develop/libraries/libs-dev/libgfx/libgfx.asm \ - lib/libimg.obj:LIB/LIBIMG.OBJ:$(PROGS)/develop/libraries/libs-dev/libimg/libimg.asm \ - lib/libini.obj:LIB/LIBINI.OBJ:$(PROGS)/develop/libraries/libs-dev/libini/libini.asm \ - lib/libio.obj:LIB/LIBIO.OBJ:$(PROGS)/develop/libraries/libs-dev/libio/libio.asm \ - lib/network.obj:LIB/NETWORK.OBJ:$(PROGS)/develop/libraries/network/network.asm \ - lib/proc_lib.obj:LIB/PROC_LIB.OBJ:$(PROGS)/develop/libraries/proc_lib/trunk/proc_lib.asm \ - lib/cnv_png.obj:LIB/CNV_PNG.OBJ:$(PROGS)/media/zsea/plugins/png/cnv_png.asm \ - media/animage:MEDIA/ANIMAGE:$(PROGS)/media/animage/trunk/animage.asm \ - media/cdp:MEDIA/CDP:$(PROGS)/media/cdp/trunk/cdp.asm \ - media/kiv:MEDIA/KIV:$(PROGS)/media/kiv/trunk/kiv.asm \ - media/listplay:MEDIA/LISTPLAY:$(PROGS)/media/listplay/trunk/listplay.asm \ - media/midamp:MEDIA/MIDAMP:$(PROGS)/media/midamp/trunk/midamp.asm \ - media/startmus:MEDIA/STARTMUS:$(PROGS)/media/startmus/trunk/STARTMUS.ASM \ - network/airc:NETWORK/AIRC:$(PROGS)/network/airc/trunk/airc.asm \ - network/arpstat:NETWORK/ARPSTAT:$(PROGS)/network/arpstat/trunk/arpstat.asm \ - network/chess:NETWORK/CHESS:$(PROGS)/network/chess/trunk/chess.asm \ - network/downloader:NETWORK/DOWNLOADER:$(PROGS)/network/downloader/trunk/downloader.asm \ - network/ethstat:NETWORK/ETHSTAT:$(PROGS)/network/ethstat/trunk/ethstat.asm \ - network/ftps:NETWORK/FTPS:$(PROGS)/network/ftps/trunk/FTPS.ASM \ - network/https:NETWORK/HTTPS:$(PROGS)/network/https/trunk/https.asm \ - network/nntpc:NETWORK/NNTPC:$(PROGS)/network/nntpc/trunk/nntpc.asm \ - network/nslookup:NETWORK/NSLOOKUP:$(PROGS)/develop/libraries/network/examples/nslookup.asm \ - network/popc:NETWORK/POPC:$(PROGS)/network/popc/trunk/popc.asm \ - network/smtps:NETWORK/SMTPS:$(PROGS)/network/smtps/trunk/smtps.asm \ - network/stackcfg:NETWORK/STACKCFG:$(PROGS)/network/stackcfg/trunk/stackcfg.asm \ - network/telnet:NETWORK/TELNET:$(PROGS)/network/telnet/trunk/telnet.asm \ - network/tftpc:NETWORK/TFTPC:$(PROGS)/network/tftpc/trunk/tftpc.asm \ - network/VNCclient:NETWORK/VNCclient:$(PROGS)/network/VNCclient/VNCclient.asm \ - network/ym:NETWORK/YM:$(PROGS)/network/ym/trunk/ym.asm \ - network/zeroconf:NETWORK/ZEROCONF:$(PROGS)/network/zeroconf/trunk/zeroconf.asm \ -# end of list - -# The list of all NASM programs with one main NASM file. -# Format of an item is exactly the same as in the previous list. -NASM_PROGRAMS:=\ - demos/aclock:DEMOS/ACLOCK:$(PROGS)/demos/aclock/trunk/aclock.asm \ - games/c4:GAMES/C4:$(PROGS)/games/c4/trunk/c4.asm \ -# end of list - -# The list of files which should be copied from somewhere. -# Format of an item is exactly the same as in the previous list. -COPY_FILES:=\ - macros.inc:MACROS.INC:$(PROGS)/macros.inc \ - config.inc:CONFIG.INC:$(PROGS)/config.inc \ - struct.inc:STRUCT.INC:$(PROGS)/struct.inc \ - develop/te_icon.png:DEVELOP/TE_ICON.PNG:$(PROGS)/other/t_edit/te_icon.png \ - develop/tl_nod_16.png:DEVELOP/TL_NOD_16.PNG:$(PROGS)/other/t_edit/tl_nod_16.png \ - develop/tl_sys_16.png:DEVELOP/TL_SYS_16.PNG:$(PROGS)/media/log_el/trunk/tl_sys_16.png \ - File|Managers/z_icons.png:File|Managers/Z_ICONS.PNG:$(PROGS)/fs/opendial/z_icons.png \ - File|Managers/kfm_keys.txt:File|Managers/KFM_KEYS.TXT:$(PROGS)/fs/kfm/trunk/docs/english/kfm_keys.txt \ - File|Managers/buttons.bmp:File|Managers/BUTTONS.BMP:$(PROGS)/fs/kfm/trunk/buttons.bmp \ - File|Managers/icons.bmp:File|Managers/ICONS.BMP:$(PROGS)/fs/kfm/trunk/icons.bmp \ - fonts/litt.chr:FONTS/LITT.CHR:$(PROGS)/demos/bgitest/trunk/FONTS/LITT.CHR \ - games/snake.ini:GAMES/SNAKE.INI:$(PROGS)/games/snake/trunk/snake.ini \ - games/skin.raw:GAMES/SKIN.RAW:$(PROGS)/games/soko/trunk/SKIN.RAW \ - games/soko-4.lev:GAMES/SOKO-4.LEV:$(PROGS)/games/soko/trunk/SOKO-4.LEV \ - games/soko-5.lev:GAMES/SOKO-5.LEV:$(PROGS)/games/soko/trunk/SOKO-5.LEV \ - games/soko-6.lev:GAMES/SOKO-6.LEV:$(PROGS)/games/soko/trunk/SOKO-6.LEV \ - games/soko-7.lev:GAMES/SOKO-7.LEV:$(PROGS)/games/soko/trunk/SOKO-7.LEV \ - games/soko-8.lev:GAMES/SOKO-8.LEV:$(PROGS)/games/soko/trunk/SOKO-8.LEV \ - games/soko-9.lev:GAMES/SOKO-9.LEV:$(PROGS)/games/soko/trunk/SOKO-9.LEV \ - media/kiv.ini:MEDIA/KIV.INI:$(PROGS)/media/kiv/trunk/kiv.ini \ - .shell:.shell:$(PROGS)/system/shell/bin/eng/.shell \ - mykey.ini:MYKEY.INI:$(PROGS)/system/MyKey/trunk/mykey.ini \ -# end of list - -# The list of all C-- programs with one main C-- file. -# Format of an item is exactly the same as in the previous list, -# except that there can be fourth field with parameters for a compiler. -CMM_PROGRAMS:=\ - File|Managers/eolite:File|Managers/EOLITE:$(PROGS)/fs/Eolite/trunk/Eolite.c-- \ - games/clicks:GAMES/CLICKS:$(PROGS)/games/clicks/trunk/clicks.c \ - games/FindNumbers:GAMES/FindNumbers:$(PROGS)/games/FindNumbers/trunk/FindNumbers.c-- \ - games/flood-it:GAMES/flood-it:$(PROGS)/games/flood-it/trunk/flood-it.c \ - games/mine:GAMES/MINE:$(PROGS)/games/mine/trunk/mine.c--:/MEOS \ - HTMLv:HTMLv:$(PROGS)/network/htmlv/browser/HTMLv.c \ -#develop/c--:DEVELOP/C--:$(PROGS)/develop/c--/trunk/32.c-- \ -# end of list - -# List of other files to be included in the image file. -# Some of them are auto-built with special rules, some just exist before build. -# Each item is of the form :. -# Spaces should be represented as |. -OTHER_FILES:=autorun.dat:AUTORUN.DAT \ - background.gif:background.gif default.skn:DEFAULT.SKN \ - e80:E80 graph:GRAPH hdread:HDREAD \ - icons.dat:ICONS.DAT iconstrp.png:ICONSTRP.PNG index_htm:INDEX.HTM \ - kernel.mnt:KERNEL.MNT kerpack:KERPACK keymap.key:KEYMAP.KEY \ - kuzkina.mid:KUZKINA.MID lang.inc:LANG.INC lang.ini:LANG.INI \ - menu.dat:MENU.DAT \ - panel.ini:PANEL.INI setup.dat:SETUP.DAT \ - shell:SHELL table:TABLE \ - vmode:VMODE 3d/3dsheart:3D/3DSHEART \ - 3d/cubeline:3D/CUBELINE 3d/gears:3D/GEARS 3d/house.3ds:3D/HOUSE.3DS \ - demos/use_mb:DEMOS/USE_MB \ - File|Managers/eolite.ini:File|Managers/EOLITE.INI \ - File|Managers/icons.ini:File|Managers/ICONS.INI \ - File|Managers/kfar.ini:File|Managers/KFAR.INI \ - File|Managers/kfm.ini:File|Managers/KFM.INI \ - games/kosilka:GAMES/KOSILKA games/kosskin.gfx:GAMES/KOSSKIN.GFX \ - games/reversi:GAMES/REVERSI games/rforces:GAMES/RFORCES \ - games/xonix:GAMES/XONIX games/megamaze:GAMES/MEGAMAZE \ - lib/msgbox.obj:LIB/MSGBOX.OBJ \ - lib/pixlib.obj:LIB/PIXLIB.OBJ lib/sort.obj:LIB/SORT.OBJ \ - drivers/intel_hda.obj:DRIVERS/intel_hda.obj \ - media/ac97snd:MEDIA/AC97SND \ - network/jmail:NETWORK/JMAIL network/zeroconf.ini:NETWORK/ZEROCONF.INI \ -#end of list -#3d/logio.bmp:3D/LOGIO.BMP 3d/cubetext:3D/CUBETEXT - -# Extra targets for LiveCD image in the syntax of mkisofs -MKISOFS_EXTRA:=\ - dosbox/=$(PROGS)/emulator/DosBox/dosbox \ - dosbox/=$(PROGS)/emulator/DosBox/dosbox.conf \ - dosbox/=$(PROGS)/emulator/DosBox/readme.txt \ -#end of list - -# Some macro for convenient work. -# Macros for replacing '|' to escaped space '\ '. -space:=\ #plus space -respace=$(subst |,$(space),$(1)) -# Macro for selecting different parts of ':'-separated items. -binarypart=$(word 1,$(subst :, ,$(1))) -imagepart=$(word 2,$(subst :, ,$(1))) -sourcepart=$(word 3,$(subst :, ,$(1))) -parampart=$(word 4,$(subst :, ,$(1))) -# Get file names, possibly with spaces inside, from an item. -# Here $(f) is an item - in fact, macro argument. -fbinary=$(call respace,$(call binarypart,$(f))) -fimage=$(call respace,$(call imagepart,$(f))) -fsource=$(call respace,$(call sourcepart,$(f))) -fparam=$(call respace,$(call parampart,$(f))) - -# Define targets for image file. -# Join all the lists above. -targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS) -# For each item in the united list call fbinary. -targets:=$(foreach f,$(targets_full),$(fbinary)) - -# Define a command for copying a file inside the image. -# mcopy_command is a macro with two parameters, -# local file name $(1) and image file name $(2). -# Note that spaces in these have to be escaped with backslashes. -mcopy_command=mcopy -moi $(BUILD_DIR)/kolibri.img $(1) ::$(2) -# Specialize a previous command for an item $(f) in one of lists. -mcopy_item_command=$(call mcopy_command,$(fbinary),$(fimage)) - -# Join all $(mcopy_item_command) for all items, -# append newline after each item. -# The first newline character after "define" line and -# the last newline character before "endef" line get away -# with define/endef, so we make three newline characters, -# that is two empty lines, in order to get one in $(newline). -define newline - - -endef -mcopy_all_items:=$(foreach f,$(targets_full),$(mcopy_item_command)$(newline)) - -# dependencies of MKISOFS_EXTRA; we iterate through $(MKISOFS_EXTRA), -# substitute "=" with space, get the 2nd word and join all results -mkisofs_extra_targets:=$(foreach f,$(MKISOFS_EXTRA),$(word 2,$(subst =, ,$(f)))) - -# The main goal: build kolibri.img and kolibri.iso -all: $(BUILD_DIR)/kolibri.img $(BUILD_DIR)/kolibri.iso - -# The first goal: floppy image. -$(BUILD_DIR)/kolibri.img: $(BUILD_DIR)/.dir \ - Makefile \ - $(BUILD_DIR)/boot_fat12.bin \ - $(targets) -# SYSXTREE -# 3d/CUBETEXT -# 3d/LOGIO.BMP - str=`date -u +"[auto-build %d %b %Y %R, r$(REV)]"`; \ - echo -n $$str|dd of=kernel.mnt bs=1 seek=`expr 279 - length "$$str"` conv=notrunc 2>/dev/null - dd if=/dev/zero of=$(BUILD_DIR)/kolibri.img count=2880 bs=512 2>&1 - mformat -f 1440 -i $(BUILD_DIR)/kolibri.img :: - dd if=$(BUILD_DIR)/boot_fat12.bin of=$(BUILD_DIR)/kolibri.img count=1 bs=512 conv=notrunc 2>&1 - mmd -i $(BUILD_DIR)/kolibri.img ::3D - mmd -i $(BUILD_DIR)/kolibri.img ::DEMOS - mmd -i $(BUILD_DIR)/kolibri.img ::DEVELOP - mmd -i $(BUILD_DIR)/kolibri.img ::DEVELOP/INFO - mmd -i $(BUILD_DIR)/kolibri.img ::DRIVERS - mmd -i $(BUILD_DIR)/kolibri.img ::File\ Managers - mmd -i $(BUILD_DIR)/kolibri.img ::FONTS - mmd -i $(BUILD_DIR)/kolibri.img ::GAMES - mmd -i $(BUILD_DIR)/kolibri.img ::LIB - mmd -i $(BUILD_DIR)/kolibri.img ::MEDIA - mmd -i $(BUILD_DIR)/kolibri.img ::NETWORK - $(mcopy_all_items) - -# The second goal: LiveCD image. -$(BUILD_DIR)/kolibri.iso: $(BUILD_DIR)/kolibri.img $(mkisofs_extra_targets) - mkisofs -U -J -pad -b kolibri.img -c boot.catalog -hide-joliet boot.catalog -hide-joliet kolibri.img -graft-points \ - -A "KolibriOS AutoBuilder" -p "CleverMouse" -publisher "KolibriOS Team" -V "KolibriOS r$(REV)" -sysid "KOLIBRI" \ - -iso-level 3 -o $(BUILD_DIR)/kolibri.iso $(BUILD_DIR)/kolibri.img $(MKISOFS_EXTRA) 2>&1 - -# Special targets to modify behaviour of make. -.DELETE_ON_ERROR: -.SUFFIXES: # delete all predefined rules - -# The floppy bootsector. -$(BUILD_DIR)/boot_fat12.bin: $(KERNEL)/bootloader/boot_fat12.asm $(KERNEL)/bootloader/floppy1440.inc - fasm $(KERNEL)/bootloader/boot_fat12.asm $(BUILD_DIR)/boot_fat12.bin - -$(BUILD_DIR)/.dir 3d/.dir demos/.dir develop/.dir develop/info/.dir drivers/.dir fonts/.dir \ - games/.dir lib/.dir media/.dir network/.dir .deps/.dir: - mkdir -p $(dir $@) - touch $@ -develop/info/.dir: develop/.dir -File\ Managers/.dir: - mkdir -p "File Managers" - touch "File Managers/.dir" - -# FASM black magic goes to Makefile.fasm. -include Makefile.fasm - -# Similar for NASM. -include Makefile.nasm - -# Similar for copying files. -include Makefile.copy - -# Special rules for copying sysfuncs.txt - it isn't directly included in the image. -docpack: $(DOCDIR)SYSFUNCS.TXT -$(DOCDIR)SYSFUNCS.TXT: $(KERNEL)/docs/sysfuncs.txt - cp $(KERNEL)/docs/sysfuncs.txt $(DOCDIR)SYSFUNCS.TXT - -# Similar for C--. -include Makefile.cmm - -# Sorry, even black magic seems to be insufficient for -# auto-handling all subtle effects. So we just define -# command lines for compiling and linking, and -# maintain the list of sources and objects by hand. -include Makefile.msvc - -# Rules for table -table: .obj.table/table.exe - $(msvc_final) -TABLE_OBJECTS:=.obj.table/calc.obj .obj.table/func.obj .obj.table/hello.obj \ - .obj.table/KosFile.obj .obj.table/kosSyst.obj .obj.table/math2.obj \ - .obj.table/mcsmemm.obj .obj.table/parser.obj -TABLE_H_FILES:=$(wildcard $(PROGS)/other/table/*.h) -.obj.table/table.exe: $(TABLE_OBJECTS) - $(msvc_link) -$(TABLE_OBJECTS): .obj.table/%.obj: $(PROGS)/other/table/%.cpp $(TABLE_H_FILES) Makefile.msvc | .obj.table - $(msvc_compile) -.obj.table: - mkdir -p .obj.table - -# Rules for graph -graph: .obj.graph/graph.exe - $(msvc_final) -GRAPH_CPP_OBJECTS:=.obj.graph/func.obj .obj.graph/hello.obj .obj.graph/kolibri.obj \ - .obj.graph/KosFile.obj .obj.graph/kosSyst.obj .obj.graph/math2.obj \ - .obj.graph/mcsmemm.obj .obj.graph/parser.obj -GRAPH_C_OBJECTS:=.obj.graph/string.obj -GRAPH_H_FILES:=$(wildcard $(PROGS)/other/graph/*.h) -GRAPH_FASM_OBJECTS:=.obj.graph/memcpy.obj .obj.graph/memset.obj -.obj.graph/graph.exe: $(GRAPH_CPP_OBJECTS) $(GRAPH_C_OBJECTS) $(GRAPH_FASM_OBJECTS) - $(msvc_link) -$(GRAPH_CPP_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.cpp $(GRAPH_H_FILES) Makefile.msvc | .obj.graph - $(msvc_compile) -$(GRAPH_C_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.c $(GRAPH_H_FILES) Makefile.msvc | .obj.graph - $(msvc_compile) -$(GRAPH_FASM_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.asm Makefile.msvc | .obj.graph - fasm $< $@ -.obj.graph: - mkdir -p .obj.graph - -# Rules for kosilka -games/kosilka: .obj.kosilka/kosilka.exe - $(msvc_final) -KOSILKA_OBJECTS:=.obj.kosilka/kosilka.obj .obj.kosilka/KosFile.obj .obj.kosilka/kosSyst.obj .obj.kosilka/mcsmemm.obj -KOSILKA_H_FILES:=$(PROGS)/games/kosilka/*.h -.obj.kosilka/kosilka.exe: $(KOSILKA_OBJECTS) - $(msvc_link) -$(KOSILKA_OBJECTS): .obj.kosilka/%.obj: $(PROGS)/games/kosilka/%.cpp $(KOSILKA_H_FILES) Makefile.msvc | .obj.kosilka - $(msvc_compile) -.obj.kosilka: - mkdir -p .obj.kosilka - -include Makefile.gcc - -# Rules for shell -shell: .obj.shell/start.o .obj.shell/shell.o .obj.shell/kolibri.o .obj.shell/stdlib.o .obj.shell/string.o .obj.shell/ctype.o \ - $(PROGS)/system/shell/kolibri.ld - $(call gcc_link,$(PROGS)/system/shell/kolibri.ld) -.obj.shell/shell.o: $(PROGS)/system/shell/shell.c \ - $(PROGS)/system/shell/all.h \ - $(PROGS)/system/shell/system/*.h \ - $(PROGS)/system/shell/cmd/*.c \ - $(PROGS)/system/shell/modules/*.c \ - $(PROGS)/system/shell/locale/rus/globals.h \ - Makefile.gcc | .obj.shell - $(gcc_compile) -.obj.shell/kolibri.o .obj.shell/stdlib.o .obj.shell/string.o .obj.shell/ctype.o: .obj.shell/%.o: \ - $(PROGS)/system/shell/system/%.c $(PROGS)/system/shell/system/*.h \ - Makefile.gcc | .obj.shell - $(gcc_compile) - win32-gcc -c -Os -o $@ $< -.obj.shell/start.o: $(PROGS)/system/shell/start.asm | .obj.shell - fasm $< $@ -.obj.shell: - mkdir -p .obj.shell - -# Rules for e80 -E80DIR=$(PROGS)/emulator/e80/trunk -e80: .obj.e80/start.o .obj.e80/kolibri.o .obj.e80/stdlib.o .obj.e80/string.o .obj.e80/z80.o .obj.e80/e80.o - $(call gcc_link,$(E80DIR)/kolibri.ld) -.obj.e80/e80.o: $(E80DIR)/e80.c $(E80DIR)/48.h \ - $(E80DIR)/system/*.h $(E80DIR)/system/msgbox.c \ - $(E80DIR)/z80/z80.h Makefile.gcc | .obj.e80 - $(gcc_compile) -.obj.e80/kolibri.o .obj.e80/stdlib.o .obj.e80/string.o: .obj.e80/%.o: \ - $(E80DIR)/system/%.c $(E80DIR)/system/*.h Makefile.gcc | .obj.e80 - $(gcc_compile) -.obj.e80/z80.o: $(E80DIR)/z80/z80.c $(E80DIR)/z80/* - $(gcc_compile) -.obj.e80/start.o: $(E80DIR)/asm_code.asm | .obj.e80 - fasm $< $@ -.obj.e80: - mkdir -p .obj.e80 - -# Rules for sdk/sound, used by media/ac97snd -SOUNDDIR=$(PROGS)/develop/sdk/trunk/sound/src -SOUND_OBJECTS:=$(patsubst $(SOUNDDIR)/%.asm,.sdk/%.obj,$(wildcard $(SOUNDDIR)/*.asm)) -SOUND_INC_FILES:=$(wildcard $(SOUNDDIR)/*.inc) -.sdk/sound.lib: $(SOUND_OBJECTS) - win32-link /lib /out:$@ $^ -$(SOUND_OBJECTS): .sdk/%.obj: $(SOUNDDIR)/%.asm $(SOUND_INC_FILES) | .sdk - fasm $< $@ -.sdk: - mkdir -p .sdk -# Rules for media/ac97snd -AC97DIR=$(PROGS)/media/ac97snd -media/ac97snd: .obj.ac97snd/ac97snd.exe - $(msvc_final) -.obj.ac97snd/ac97snd.exe: .obj.ac97snd/ac97wav.obj .obj.ac97snd/crt.obj .obj.ac97snd/k_lib.obj \ - .obj.ac97snd/mpg.lib .sdk/sound.lib .obj.ac97snd/ufmod.obj - $(msvc_link) -.obj.ac97snd/ac97wav.obj: $(AC97DIR)/ac97snd/ac97wav.c \ - $(AC97DIR)/kolibri.h $(AC97DIR)/ac97snd/ac97wav.h $(AC97DIR)/mpg/mpg123.h \ - $(AC97DIR)/sound.h $(AC97DIR)/ufmod-codec.h Makefile.msvc | .obj.ac97snd - $(msvc_compile) -.obj.ac97snd/crt.obj: $(AC97DIR)/ac97snd/crt.c $(AC97DIR)/ac97snd/crt.h Makefile.msvc | .obj.ac97snd - $(msvc_compile) -.obj.ac97snd/k_lib.obj: $(AC97DIR)/ac97snd/k_lib.asm $(AC97DIR)/ac97snd/proc32.inc | .obj.ac97snd - fasm $< $@ -.obj.ac97snd/ufmod.obj: $(AC97DIR)/ufmod-config.asm | .obj.ac97snd - fasm $< $@ -s .deps/ac97snd-ufmod.fas - prepsrc .deps/ac97snd-ufmod.fas /dev/stdout | \ - perl -n -e 's|\\|/|g;s| |\\ |g;push @a,$$1 if/^;include\\ \x27(.*?)\x27/;' \ - -e 'END{$$a=join " \\\n ",@a;print "$@: $$a\n$$a:\n"}' > .deps/ac97snd-ufmod.Po --include .deps/ac97snd-ufmod.Po -AC97SND_MPG_C_FILES:=$(wildcard $(AC97DIR)/mpg/*.c) -AC97SND_MPG_H_FILES:=$(wildcard $(AC97DIR)/mpg/*.h) -AC97SND_MPG_C_OBJECTS:=$(patsubst $(AC97DIR)/mpg/%.c,.obj.ac97snd/%.o,$(AC97SND_MPG_C_FILES)) -.obj.ac97snd/mpg.lib: $(AC97SND_MPG_C_OBJECTS) .obj.ac97snd/pow.obj - win32-link /lib /ltcg /out:$@ $^ -$(AC97SND_MPG_C_OBJECTS): .obj.ac97snd/%.o: $(AC97DIR)/mpg/%.c $(AC97SND_MPG_H_FILES) Makefile.msvc | .obj.ac97snd - $(msvc_compile) -.obj.ac97snd/pow.obj: $(AC97DIR)/mpg/pow.asm $(AC97DIR)/mpg/proc32.inc | .obj.ac97snd - fasm $< $@ -.obj.ac97snd: - mkdir -p .obj.ac97snd +# General rule for naming: variables with CAPITALIZED names hold settings, +# you can - and are expected - to modify it; variables with lowercase names +# are intermediate variables and macroses not to be modified unless you +# know what you're doing. + +# Define directories for destination, source repository, sources of kernel, sources of programs. +BUILD_DIR:=build +REPOSITORY:=../.. +KERNEL:=$(REPOSITORY)/kernel/trunk +PROGS:=$(REPOSITORY)/programs + +# Docpak requires some documents; we place them +# into 'docs' subdir and communicate with FASM +# through environment var DOCDIR. +DOCDIR:=docs/ +export DOCDIR + +# Because most programs are written in FASM and have +# the common structure of one main .asm file possibly including +# several .inc files, we handle this case separately. +# Namely, we organize one big list of such programs +# (FASM_PROGRAMS, see below) containing name of local binary file, +# name of file inside kolibri.img and name of the source file. +# This list is maintained by hand, and the rest is done with some macroses... +# well, slightly complicated macroses - however, you do not need to +# understand them in order to maintain the list. +# To add a FASM program with one .asm file, just +# add the corresponding item to the list and enjoy +# the power of GNU make. + +# The list of all FASM programs with one main FASM file. +# Every item consists of three parts, separated by ':'. +# First part is the real name of binary file in $(BUILD_DIR) +# as it should be produced by make. +# Second part is the name of a file inside kolibri.img, +# usually uppercased version of first part - to save space +# for FAT filesystem. +# Third part is the name of the source file. +# Spaces separate items, so spaces in names should be +# represented as '|'. +FASM_PROGRAMS:=\ + @clip:@CLIP:$(PROGS)/system/clip/trunk/@clip.ASM \ + @menu:@MENU:$(PROGS)/system/menu/trunk/menu.asm \ + @notify:@NOTIFY:$(PROGS)/system/notify/trunk/@notify.asm \ + @panel:@PANEL:$(PROGS)/system/panel/trunk/@PANEL.ASM \ + @rb:@RB:$(PROGS)/system/rb/trunk/@RB.ASM \ + @ss:@SS:$(PROGS)/system/ss/trunk/@ss.asm\ + refrscrn:REFRSCRN:$(PROGS)/system/refrscrn/refrscrn.asm \ + asciivju:ASCIIVJU:$(PROGS)/develop/asciivju/trunk/asciivju.asm \ + calc:CALC:$(PROGS)/other/calc/trunk/calc.asm \ + calendar:CALENDAR:$(PROGS)/system/calendar/trunk/calendar.asm \ + commouse:COMMOUSE:$(PROGS)/system/commouse/trunk/commouse.asm \ + cpu:CPU:$(PROGS)/system/cpu/trunk/cpu.asm \ + cpuid:CPUID:$(PROGS)/system/cpuid/trunk/CPUID.ASM \ + desktop:DESKTOP:$(PROGS)/system/desktop/trunk/desktop.asm \ + disptest:DISPTEST:$(PROGS)/system/disptest/trunk/disptest.ASM \ + docpack:DOCPACK:$(PROGS)/system/docpack/trunk/docpack.asm \ + end:END:$(PROGS)/system/end/light/end.asm \ + gmon:GMON:$(PROGS)/system/gmon/gmon.asm \ + hdd_info:HDD_INFO:$(PROGS)/system/hdd_info/trunk/hdd_info.asm \ + icon:ICON:$(PROGS)/system/icon/trunk/icon.asm \ + cropflat:CROPFLAT:$(PROGS)/system/cropflat/cropflat.asm \ + kbd:KBD:$(PROGS)/system/kbd/trunk/kbd.ASM \ + kpack:KPACK:$(PROGS)/other/kpack/trunk/kpack.asm \ + launcher:LAUNCHER:$(PROGS)/system/launcher/trunk/launcher.asm \ + magnify:MAGNIFY:$(PROGS)/demos/magnify/trunk/magnify.asm \ + mgb:MGB:$(PROGS)/system/mgb/trunk/mgb.asm \ + mousemul:MOUSEMUL:$(PROGS)/system/mousemul/trunk/mousemul.asm \ + madmouse:MADMOUSE:$(PROGS)/other/madmouse/madmouse.asm \ + mykey:MYKEY:$(PROGS)/system/MyKey/trunk/MyKey.asm \ + pcidev:PCIDEV:$(PROGS)/system/pcidev/trunk/PCIDEV.ASM \ + pic4:PIC4:$(PROGS)/media/pic4/trunk/pic4.asm \ + rdsave:RDSAVE:$(PROGS)/system/rdsave/trunk/rdsave.asm \ + rtfread:RTFREAD:$(PROGS)/other/rtfread/trunk/rtfread.asm \ + run:RUN:$(PROGS)/system/run/trunk/run.asm \ + scrshoot:SCRSHOOT:$(PROGS)/media/scrshoot/scrshoot.asm \ + setup:SETUP:$(PROGS)/system/setup/trunk/setup.asm \ + test:TEST:$(PROGS)/system/test/trunk/test.asm \ + tinypad:TINYPAD:$(PROGS)/develop/tinypad/trunk/tinypad.asm \ + zkey:ZKEY:$(PROGS)/system/zkey/trunk/ZKEY.ASM \ + 3d/3dcube2:3D/3DCUBE2:$(PROGS)/demos/3dcube2/trunk/3DCUBE2.ASM \ + 3d/3dsheart:3D/3DSHEART:$(PROGS)/demos/3dsheart/trunk/3dsheart.asm \ + 3d/3dwav:3D/3DWAV:$(PROGS)/demos/3dwav/trunk/3dwav.asm \ + 3d/crownscr:3D/CROWNSCR:$(PROGS)/demos/crownscr/trunk/crownscr.asm \ + 3d/flatwav:3D/FLATWAV:$(PROGS)/demos/flatwav/trunk/FLATWAV.ASM \ + 3d/free3d04:3D/FREE3D04:$(PROGS)/demos/free3d04/trunk/free3d04.asm \ + 3d/view3ds:3D/VIEW3DS:$(PROGS)/demos/3DS/VIEW3DS.ASM \ + demos/bcdclk:DEMOS/BCDCLK:$(PROGS)/demos/bcdclk/trunk/bcdclk.asm \ + demos/circle:DEMOS/CIRCLE:$(PROGS)/develop/examples/circle/trunk/circle.asm \ + demos/colorref:DEMOS/COLORREF:$(PROGS)/demos/colorref/trunk/colorref.asm \ + demos/cslide:DEMOS/CSLIDE:$(PROGS)/demos/cslide/trunk/cslide.asm \ + demos/eyes:DEMOS/EYES:$(PROGS)/demos/eyes/trunk/eyes.asm \ + demos/fire:DEMOS/FIRE:$(PROGS)/demos/fire/trunk/fire.asm \ + demos/firework:DEMOS/FIREWORK:$(PROGS)/demos/firework/trunk/firework.asm \ + demos/movback:DEMOS/MOVBACK:$(PROGS)/demos/movback/trunk/movback.asm \ + demos/plasma:DEMOS/PLASMA:$(PROGS)/demos/plasma/trunk/plasma.asm \ + demos/timer:DEMOS/TIMER:$(PROGS)/demos/timer/trunk/timer.asm \ + demos/tinyfrac:DEMOS/TINYFRAC:$(PROGS)/demos/tinyfrac/trunk/tinyfrac.asm \ + demos/trantest:DEMOS/TRANTEST:$(PROGS)/demos/trantest/trunk/trantest.asm \ + demos/tube:DEMOS/TUBE:$(PROGS)/demos/tube/trunk/tube.asm \ + demos/unvwater:DEMOS/UNVWATER:$(PROGS)/demos/unvwater/trunk/unvwater.asm \ + demos/web:DEMOS/WEB:$(PROGS)/demos/web/trunk/web.asm \ + develop/board:DEVELOP/BOARD:$(PROGS)/system/board/trunk/board.asm \ + develop/cObj:DEVELOP/cObj:$(PROGS)/develop/cObj/trunk/cObj.asm \ + develop/fasm:DEVELOP/FASM:$(PROGS)/develop/fasm/trunk/fasm.asm \ + develop/h2d2b:DEVELOP/H2D2B:$(PROGS)/develop/h2d2b/trunk/h2d2b.asm \ + develop/heed:DEVELOP/HEED:$(PROGS)/develop/heed/trunk/heed.asm \ + develop/ipc:DEVELOP/IPC:$(PROGS)/network/ipc/trunk/ipc.asm \ + develop/keyascii:DEVELOP/KEYASCII:$(PROGS)/develop/keyascii/trunk/keyascii.asm \ + develop/mtdbg:DEVELOP/MTDBG:$(PROGS)/develop/mtdbg/mtdbg.asm \ + develop/scancode:DEVELOP/SCANCODE:$(PROGS)/develop/scancode/trunk/scancode.asm \ + develop/t_edit:DEVELOP/T_EDIT:$(PROGS)/other/t_edit/t_edit.asm \ + develop/test_gets:DEVELOP/test_gets:$(PROGS)/develop/libraries/console/examples/test_gets.asm \ + develop/testcon2:DEVELOP/TESTCON2:$(PROGS)/develop/libraries/console/examples/testcon2.asm \ + develop/thread:DEVELOP/THREAD:$(PROGS)/develop/examples/thread/trunk/thread.asm \ + develop/info/asm.syn:DEVELOP/INFO/ASM.SYN:$(PROGS)/other/t_edit/info/asm_syn.asm \ + develop/info/cpp_kol_cla.syn:DEVELOP/INFO/CPP_KOL_CLA.SYN:$(PROGS)/other/t_edit/info/cpp_kol_cla_syn.asm \ + develop/info/cpp_kol_dar.syn:DEVELOP/INFO/CPP_KOL_DAR.SYN:$(PROGS)/other/t_edit/info/cpp_kol_dar_syn.asm \ + develop/info/cpp_kol_def.syn:DEVELOP/INFO/CPP_KOL_DEF.SYN:$(PROGS)/other/t_edit/info/cpp_kol_def_syn.asm \ + develop/info/default.syn:DEVELOP/INFO/DEFAULT.SYN:$(PROGS)/other/t_edit/info/default_syn.asm \ + develop/info/html.syn:DEVELOP/INFO/HTML.SYN:$(PROGS)/other/t_edit/info/html_syn.asm \ + develop/info/ini_files.syn:DEVELOP/INFO/INI_FILES.SYN:$(PROGS)/other/t_edit/info/ini_files_syn.asm \ + develop/info/win_const.syn:DEVELOP/INFO/WIN_CONST.SYN:$(PROGS)/other/t_edit/info/win_const_syn.asm \ + drivers/com_mouse.obj:DRIVERS/COM_MOUSE.OBJ:$(KERNEL)/drivers/com_mouse.asm \ + drivers/emu10k1x.obj:DRIVERS/EMU10K1X.OBJ:$(KERNEL)/drivers/emu10k1x.asm \ + drivers/fm801.obj:DRIVERS/FM801.OBJ:$(KERNEL)/drivers/fm801.asm \ + drivers/infinity.obj:DRIVERS/INFINITY.OBJ:$(KERNEL)/drivers/infinity.asm \ + drivers/ps2mouse.obj:DRIVERS/PS2MOUSE.OBJ:$(REPOSITORY)/drivers/mouse/ps2mouse4d/trunk/ps2mouse.asm \ + drivers/sb16.obj:DRIVERS/SB16.OBJ:$(KERNEL)/drivers/sb16/sb16.asm \ + drivers/sound.obj:DRIVERS/SOUND.OBJ:$(KERNEL)/drivers/sound.asm \ + drivers/vt8235.obj:DRIVERS/VT8235.OBJ:$(KERNEL)/drivers/vt823x.asm \ + File|Managers/kfar:File|Managers/KFAR:$(PROGS)/fs/kfar/trunk/kfar.asm \ + File|Managers/kfm:File|Managers/KFM:$(PROGS)/fs/kfm/trunk/kfm.asm \ + File|Managers/opendial:File|Managers/OPENDIAL:$(PROGS)/fs/opendial/opendial.asm \ + games/15:GAMES/15:$(PROGS)/games/15/trunk/15.ASM \ + games/arcanii:GAMES/ARCANII:$(PROGS)/games/arcanii/trunk/arcanii.asm \ + games/freecell:GAMES/FREECELL:$(PROGS)/games/freecell/freecell.asm \ + games/gomoku:GAMES/GOMOKU:$(PROGS)/games/gomoku/trunk/gomoku.asm \ + games/invaders:GAMES/INVADERS:$(PROGS)/games/invaders/invaders.asm \ + games/klavisha:GAMES/KLAVISHA:$(PROGS)/games/klavisha/trunk/klavisha.asm \ + games/lines:GAMES/LINES:$(PROGS)/games/lines/lines.asm \ + games/mblocks:GAMES/MBLOCKS:$(PROGS)/games/mblocks/trunk/mblocks.asm \ + games/msquare:GAMES/MSQUARE:$(PROGS)/games/MSquare/trunk/MSquare.asm \ + games/phenix:GAMES/PHENIX:$(PROGS)/games/phenix/trunk/phenix.asm \ + games/pipes:GAMES/PIPES:$(PROGS)/games/pipes/pipes.asm \ + games/pong:GAMES/PONG:$(PROGS)/games/pong/trunk/pong.asm \ + games/pong3:GAMES/PONG3:$(PROGS)/games/pong3/trunk/pong3.asm \ + games/rsquare:GAMES/RSQUARE:$(PROGS)/games/rsquare/trunk/rsquare.asm \ + games/soko:GAMES/SOKO:$(PROGS)/games/soko/trunk/SOKO.ASM \ + games/snake:GAMES/SNAKE:$(PROGS)/games/snake/trunk/snake.asm \ + games/sq_game:GAMES/SQ_GAME:$(PROGS)/games/sq_game/trunk/SQ_GAME.ASM \ + games/sudoku:GAMES/SUDOKU:$(PROGS)/games/sudoku/trunk/sudoku.asm \ + games/sw:GAMES/SW:$(PROGS)/games/sw/trunk/sw.asm \ + games/tanks:GAMES/TANKS:$(PROGS)/games/tanks/trunk/tanks.asm \ + games/tetris:GAMES/TETRIS:$(PROGS)/games/tetris/trunk/tetris.asm \ + lib/archiver.obj:LIB/ARCHIVER.OBJ:$(PROGS)/fs/kfar/trunk/kfar_arc/kfar_arc.asm \ + lib/box_lib.obj:LIB/BOX_LIB.OBJ:$(PROGS)/develop/libraries/box_lib/trunk/box_lib.asm \ + lib/console.obj:LIB/CONSOLE.OBJ:$(PROGS)/develop/libraries/console/console.asm \ + lib/libgfx.obj:LIB/LIBGFX.OBJ:$(PROGS)/develop/libraries/libs-dev/libgfx/libgfx.asm \ + lib/libimg.obj:LIB/LIBIMG.OBJ:$(PROGS)/develop/libraries/libs-dev/libimg/libimg.asm \ + lib/libini.obj:LIB/LIBINI.OBJ:$(PROGS)/develop/libraries/libs-dev/libini/libini.asm \ + lib/libio.obj:LIB/LIBIO.OBJ:$(PROGS)/develop/libraries/libs-dev/libio/libio.asm \ + lib/network.obj:LIB/NETWORK.OBJ:$(PROGS)/develop/libraries/network/network.asm \ + lib/proc_lib.obj:LIB/PROC_LIB.OBJ:$(PROGS)/develop/libraries/proc_lib/trunk/proc_lib.asm \ + lib/cnv_png.obj:LIB/CNV_PNG.OBJ:$(PROGS)/media/zsea/plugins/png/cnv_png.asm \ + media/animage:MEDIA/ANIMAGE:$(PROGS)/media/animage/trunk/animage.asm \ + media/cdp:MEDIA/CDP:$(PROGS)/media/cdp/trunk/cdp.asm \ + media/kiv:MEDIA/KIV:$(PROGS)/media/kiv/trunk/kiv.asm \ + media/listplay:MEDIA/LISTPLAY:$(PROGS)/media/listplay/trunk/listplay.asm \ + media/midamp:MEDIA/MIDAMP:$(PROGS)/media/midamp/trunk/midamp.asm \ + media/startmus:MEDIA/STARTMUS:$(PROGS)/media/startmus/trunk/STARTMUS.ASM \ + network/airc:NETWORK/AIRC:$(PROGS)/network/airc/trunk/airc.asm \ + network/arpstat:NETWORK/ARPSTAT:$(PROGS)/network/arpstat/trunk/arpstat.asm \ + network/chess:NETWORK/CHESS:$(PROGS)/network/chess/trunk/chess.asm \ + network/downloader:NETWORK/DOWNLOADER:$(PROGS)/network/downloader/trunk/downloader.asm \ + network/ethstat:NETWORK/ETHSTAT:$(PROGS)/network/ethstat/trunk/ethstat.asm \ + network/ftps:NETWORK/FTPS:$(PROGS)/network/ftps/trunk/FTPS.ASM \ + network/https:NETWORK/HTTPS:$(PROGS)/network/https/trunk/https.asm \ + network/nntpc:NETWORK/NNTPC:$(PROGS)/network/nntpc/trunk/nntpc.asm \ + network/nslookup:NETWORK/NSLOOKUP:$(PROGS)/develop/libraries/network/examples/nslookup.asm \ + network/popc:NETWORK/POPC:$(PROGS)/network/popc/trunk/popc.asm \ + network/smtps:NETWORK/SMTPS:$(PROGS)/network/smtps/trunk/smtps.asm \ + network/stackcfg:NETWORK/STACKCFG:$(PROGS)/network/stackcfg/trunk/stackcfg.asm \ + network/telnet:NETWORK/TELNET:$(PROGS)/network/telnet/trunk/telnet.asm \ + network/tftpc:NETWORK/TFTPC:$(PROGS)/network/tftpc/trunk/tftpc.asm \ + network/VNCclient:NETWORK/VNCclient:$(PROGS)/network/VNCclient/VNCclient.asm \ + network/ym:NETWORK/YM:$(PROGS)/network/ym/trunk/ym.asm \ + network/zeroconf:NETWORK/ZEROCONF:$(PROGS)/network/zeroconf/trunk/zeroconf.asm \ +# end of list + +# The list of all NASM programs with one main NASM file. +# Format of an item is exactly the same as in the previous list. +NASM_PROGRAMS:=\ + demos/aclock:DEMOS/ACLOCK:$(PROGS)/demos/aclock/trunk/aclock.asm \ + games/c4:GAMES/C4:$(PROGS)/games/c4/trunk/c4.asm \ +# end of list + +# The list of files which should be copied from somewhere. +# Format of an item is exactly the same as in the previous list. +COPY_FILES:=\ + macros.inc:MACROS.INC:$(PROGS)/macros.inc \ + config.inc:CONFIG.INC:$(PROGS)/config.inc \ + struct.inc:STRUCT.INC:$(PROGS)/struct.inc \ + develop/te_icon.png:DEVELOP/TE_ICON.PNG:$(PROGS)/other/t_edit/te_icon.png \ + develop/tl_nod_16.png:DEVELOP/TL_NOD_16.PNG:$(PROGS)/other/t_edit/tl_nod_16.png \ + develop/tl_sys_16.png:DEVELOP/TL_SYS_16.PNG:$(PROGS)/media/log_el/trunk/tl_sys_16.png \ + develop/t_edit.ini:DEVELOP/T_EDIT.INI:$(PROGS)/other/t_edit/t_edit.ini \ + File|Managers/z_icons.png:File|Managers/Z_ICONS.PNG:$(PROGS)/fs/opendial/z_icons.png \ + File|Managers/kfm_keys.txt:File|Managers/KFM_KEYS.TXT:$(PROGS)/fs/kfm/trunk/docs/english/kfm_keys.txt \ + File|Managers/buttons.bmp:File|Managers/BUTTONS.BMP:$(PROGS)/fs/kfm/trunk/buttons.bmp \ + File|Managers/icons.bmp:File|Managers/ICONS.BMP:$(PROGS)/fs/kfm/trunk/icons.bmp \ + fonts/litt.chr:FONTS/LITT.CHR:$(PROGS)/demos/bgitest/trunk/FONTS/LITT.CHR \ + games/snake.ini:GAMES/SNAKE.INI:$(PROGS)/games/snake/trunk/snake.ini \ + games/skin.raw:GAMES/SKIN.RAW:$(PROGS)/games/soko/trunk/SKIN.RAW \ + games/soko-4.lev:GAMES/SOKO-4.LEV:$(PROGS)/games/soko/trunk/SOKO-4.LEV \ + games/soko-5.lev:GAMES/SOKO-5.LEV:$(PROGS)/games/soko/trunk/SOKO-5.LEV \ + games/soko-6.lev:GAMES/SOKO-6.LEV:$(PROGS)/games/soko/trunk/SOKO-6.LEV \ + games/soko-7.lev:GAMES/SOKO-7.LEV:$(PROGS)/games/soko/trunk/SOKO-7.LEV \ + games/soko-8.lev:GAMES/SOKO-8.LEV:$(PROGS)/games/soko/trunk/SOKO-8.LEV \ + games/soko-9.lev:GAMES/SOKO-9.LEV:$(PROGS)/games/soko/trunk/SOKO-9.LEV \ + media/kiv.ini:MEDIA/KIV.INI:$(PROGS)/media/kiv/trunk/kiv.ini \ + .shell:.shell:$(PROGS)/system/shell/bin/eng/.shell \ + mykey.ini:MYKEY.INI:$(PROGS)/system/MyKey/trunk/mykey.ini \ +# end of list + +# The list of all C-- programs with one main C-- file. +# Format of an item is exactly the same as in the previous list, +# except that there can be fourth field with parameters for a compiler. +CMM_PROGRAMS:=\ + File|Managers/eolite:File|Managers/EOLITE:$(PROGS)/fs/Eolite/trunk/Eolite.c-- \ + games/clicks:GAMES/CLICKS:$(PROGS)/games/clicks/trunk/clicks.c \ + games/FindNumbers:GAMES/FindNumbers:$(PROGS)/games/FindNumbers/trunk/FindNumbers.c-- \ + games/flood-it:GAMES/flood-it:$(PROGS)/games/flood-it/trunk/flood-it.c \ + games/mine:GAMES/MINE:$(PROGS)/games/mine/trunk/mine.c--:/MEOS \ + HTMLv:HTMLv:$(PROGS)/network/htmlv/browser/HTMLv.c \ +#develop/c--:DEVELOP/C--:$(PROGS)/develop/c--/trunk/32.c-- \ +# end of list + +# List of other files to be included in the image file. +# Some of them are auto-built with special rules, some just exist before build. +# Each item is of the form :. +# Spaces should be represented as |. +OTHER_FILES:=autorun.dat:AUTORUN.DAT \ + background.gif:background.gif default.skn:DEFAULT.SKN \ + e80:E80 graph:GRAPH hdread:HDREAD \ + icons.dat:ICONS.DAT iconstrp.png:ICONSTRP.PNG index_htm:INDEX.HTM \ + kernel.mnt:KERNEL.MNT kerpack:KERPACK keymap.key:KEYMAP.KEY \ + kuzkina.mid:KUZKINA.MID lang.inc:LANG.INC lang.ini:LANG.INI \ + menu.dat:MENU.DAT \ + panel.ini:PANEL.INI setup.dat:SETUP.DAT \ + shell:SHELL table:TABLE \ + vmode:VMODE 3d/3dsheart:3D/3DSHEART \ + 3d/cubeline:3D/CUBELINE 3d/gears:3D/GEARS 3d/house.3ds:3D/HOUSE.3DS \ + demos/use_mb:DEMOS/USE_MB \ + File|Managers/eolite.ini:File|Managers/EOLITE.INI \ + File|Managers/icons.ini:File|Managers/ICONS.INI \ + File|Managers/kfar.ini:File|Managers/KFAR.INI \ + File|Managers/kfm.ini:File|Managers/KFM.INI \ + games/kosilka:GAMES/KOSILKA games/kosskin.gfx:GAMES/KOSSKIN.GFX \ + games/reversi:GAMES/REVERSI games/rforces:GAMES/RFORCES \ + games/xonix:GAMES/XONIX games/megamaze:GAMES/MEGAMAZE \ + lib/msgbox.obj:LIB/MSGBOX.OBJ \ + lib/pixlib.obj:LIB/PIXLIB.OBJ lib/sort.obj:LIB/SORT.OBJ \ + drivers/intel_hda.obj:DRIVERS/intel_hda.obj \ + media/ac97snd:MEDIA/AC97SND \ + network/jmail:NETWORK/JMAIL network/zeroconf.ini:NETWORK/ZEROCONF.INI \ +#end of list +#3d/logio.bmp:3D/LOGIO.BMP 3d/cubetext:3D/CUBETEXT + +# Extra targets for LiveCD image in the syntax of mkisofs +MKISOFS_EXTRA:=\ + dosbox/=$(PROGS)/emulator/DosBox/dosbox \ + dosbox/=$(PROGS)/emulator/DosBox/dosbox.conf \ + dosbox/=$(PROGS)/emulator/DosBox/readme.txt \ +#end of list + +# Some macro for convenient work. +# Macros for replacing '|' to escaped space '\ '. +space:=\ #plus space +respace=$(subst |,$(space),$(1)) +# Macro for selecting different parts of ':'-separated items. +binarypart=$(word 1,$(subst :, ,$(1))) +imagepart=$(word 2,$(subst :, ,$(1))) +sourcepart=$(word 3,$(subst :, ,$(1))) +parampart=$(word 4,$(subst :, ,$(1))) +# Get file names, possibly with spaces inside, from an item. +# Here $(f) is an item - in fact, macro argument. +fbinary=$(call respace,$(call binarypart,$(f))) +fimage=$(call respace,$(call imagepart,$(f))) +fsource=$(call respace,$(call sourcepart,$(f))) +fparam=$(call respace,$(call parampart,$(f))) + +# Define targets for image file. +# Join all the lists above. +targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS) +# For each item in the united list call fbinary. +targets:=$(foreach f,$(targets_full),$(fbinary)) + +# Define a command for copying a file inside the image. +# mcopy_command is a macro with two parameters, +# local file name $(1) and image file name $(2). +# Note that spaces in these have to be escaped with backslashes. +mcopy_command=mcopy -moi $(BUILD_DIR)/kolibri.img $(1) ::$(2) +# Specialize a previous command for an item $(f) in one of lists. +mcopy_item_command=$(call mcopy_command,$(fbinary),$(fimage)) + +# Join all $(mcopy_item_command) for all items, +# append newline after each item. +# The first newline character after "define" line and +# the last newline character before "endef" line get away +# with define/endef, so we make three newline characters, +# that is two empty lines, in order to get one in $(newline). +define newline + + +endef +mcopy_all_items:=$(foreach f,$(targets_full),$(mcopy_item_command)$(newline)) + +# dependencies of MKISOFS_EXTRA; we iterate through $(MKISOFS_EXTRA), +# substitute "=" with space, get the 2nd word and join all results +mkisofs_extra_targets:=$(foreach f,$(MKISOFS_EXTRA),$(word 2,$(subst =, ,$(f)))) + +# The main goal: build kolibri.img and kolibri.iso +all: $(BUILD_DIR)/kolibri.img $(BUILD_DIR)/kolibri.iso + +# The first goal: floppy image. +$(BUILD_DIR)/kolibri.img: $(BUILD_DIR)/.dir \ + Makefile \ + $(BUILD_DIR)/boot_fat12.bin \ + $(targets) +# SYSXTREE +# 3d/CUBETEXT +# 3d/LOGIO.BMP + str=`date -u +"[auto-build %d %b %Y %R, r$(REV)]"`; \ + echo -n $$str|dd of=kernel.mnt bs=1 seek=`expr 279 - length "$$str"` conv=notrunc 2>/dev/null + dd if=/dev/zero of=$(BUILD_DIR)/kolibri.img count=2880 bs=512 2>&1 + mformat -f 1440 -i $(BUILD_DIR)/kolibri.img :: + dd if=$(BUILD_DIR)/boot_fat12.bin of=$(BUILD_DIR)/kolibri.img count=1 bs=512 conv=notrunc 2>&1 + mmd -i $(BUILD_DIR)/kolibri.img ::3D + mmd -i $(BUILD_DIR)/kolibri.img ::DEMOS + mmd -i $(BUILD_DIR)/kolibri.img ::DEVELOP + mmd -i $(BUILD_DIR)/kolibri.img ::DEVELOP/INFO + mmd -i $(BUILD_DIR)/kolibri.img ::DRIVERS + mmd -i $(BUILD_DIR)/kolibri.img ::File\ Managers + mmd -i $(BUILD_DIR)/kolibri.img ::FONTS + mmd -i $(BUILD_DIR)/kolibri.img ::GAMES + mmd -i $(BUILD_DIR)/kolibri.img ::LIB + mmd -i $(BUILD_DIR)/kolibri.img ::MEDIA + mmd -i $(BUILD_DIR)/kolibri.img ::NETWORK + $(mcopy_all_items) + +# The second goal: LiveCD image. +$(BUILD_DIR)/kolibri.iso: $(BUILD_DIR)/kolibri.img $(mkisofs_extra_targets) + mkisofs -U -J -pad -b kolibri.img -c boot.catalog -hide-joliet boot.catalog -hide-joliet kolibri.img -graft-points \ + -A "KolibriOS AutoBuilder" -p "CleverMouse" -publisher "KolibriOS Team" -V "KolibriOS r$(REV)" -sysid "KOLIBRI" \ + -iso-level 3 -o $(BUILD_DIR)/kolibri.iso $(BUILD_DIR)/kolibri.img $(MKISOFS_EXTRA) 2>&1 + +# Special targets to modify behaviour of make. +.DELETE_ON_ERROR: +.SUFFIXES: # delete all predefined rules + +# The floppy bootsector. +$(BUILD_DIR)/boot_fat12.bin: $(KERNEL)/bootloader/boot_fat12.asm $(KERNEL)/bootloader/floppy1440.inc + fasm $(KERNEL)/bootloader/boot_fat12.asm $(BUILD_DIR)/boot_fat12.bin + +$(BUILD_DIR)/.dir 3d/.dir demos/.dir develop/.dir develop/info/.dir drivers/.dir fonts/.dir \ + games/.dir lib/.dir media/.dir network/.dir .deps/.dir: + mkdir -p $(dir $@) + touch $@ +develop/info/.dir: develop/.dir +File\ Managers/.dir: + mkdir -p "File Managers" + touch "File Managers/.dir" + +# FASM black magic goes to Makefile.fasm. +include Makefile.fasm + +# Similar for NASM. +include Makefile.nasm + +# Similar for copying files. +include Makefile.copy + +# Special rules for copying sysfuncs.txt - it isn't directly included in the image. +docpack: $(DOCDIR)SYSFUNCS.TXT +$(DOCDIR)SYSFUNCS.TXT: $(KERNEL)/docs/sysfuncs.txt + cp $(KERNEL)/docs/sysfuncs.txt $(DOCDIR)SYSFUNCS.TXT + +# Similar for C--. +include Makefile.cmm + +# Sorry, even black magic seems to be insufficient for +# auto-handling all subtle effects. So we just define +# command lines for compiling and linking, and +# maintain the list of sources and objects by hand. +include Makefile.msvc + +# Rules for table +table: .obj.table/table.exe + $(msvc_final) +TABLE_OBJECTS:=.obj.table/calc.obj .obj.table/func.obj .obj.table/hello.obj \ + .obj.table/KosFile.obj .obj.table/kosSyst.obj .obj.table/math2.obj \ + .obj.table/mcsmemm.obj .obj.table/parser.obj +TABLE_H_FILES:=$(wildcard $(PROGS)/other/table/*.h) +.obj.table/table.exe: $(TABLE_OBJECTS) + $(msvc_link) +$(TABLE_OBJECTS): .obj.table/%.obj: $(PROGS)/other/table/%.cpp $(TABLE_H_FILES) Makefile.msvc | .obj.table + $(msvc_compile) +.obj.table: + mkdir -p .obj.table + +# Rules for graph +graph: .obj.graph/graph.exe + $(msvc_final) +GRAPH_CPP_OBJECTS:=.obj.graph/func.obj .obj.graph/hello.obj .obj.graph/kolibri.obj \ + .obj.graph/KosFile.obj .obj.graph/kosSyst.obj .obj.graph/math2.obj \ + .obj.graph/mcsmemm.obj .obj.graph/parser.obj +GRAPH_C_OBJECTS:=.obj.graph/string.obj +GRAPH_H_FILES:=$(wildcard $(PROGS)/other/graph/*.h) +GRAPH_FASM_OBJECTS:=.obj.graph/memcpy.obj .obj.graph/memset.obj +.obj.graph/graph.exe: $(GRAPH_CPP_OBJECTS) $(GRAPH_C_OBJECTS) $(GRAPH_FASM_OBJECTS) + $(msvc_link) +$(GRAPH_CPP_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.cpp $(GRAPH_H_FILES) Makefile.msvc | .obj.graph + $(msvc_compile) +$(GRAPH_C_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.c $(GRAPH_H_FILES) Makefile.msvc | .obj.graph + $(msvc_compile) +$(GRAPH_FASM_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.asm Makefile.msvc | .obj.graph + fasm $< $@ +.obj.graph: + mkdir -p .obj.graph + +# Rules for kosilka +games/kosilka: .obj.kosilka/kosilka.exe + $(msvc_final) +KOSILKA_OBJECTS:=.obj.kosilka/kosilka.obj .obj.kosilka/KosFile.obj .obj.kosilka/kosSyst.obj .obj.kosilka/mcsmemm.obj +KOSILKA_H_FILES:=$(PROGS)/games/kosilka/*.h +.obj.kosilka/kosilka.exe: $(KOSILKA_OBJECTS) + $(msvc_link) +$(KOSILKA_OBJECTS): .obj.kosilka/%.obj: $(PROGS)/games/kosilka/%.cpp $(KOSILKA_H_FILES) Makefile.msvc | .obj.kosilka + $(msvc_compile) +.obj.kosilka: + mkdir -p .obj.kosilka + +include Makefile.gcc + +# Rules for shell +shell: .obj.shell/start.o .obj.shell/shell.o .obj.shell/kolibri.o .obj.shell/stdlib.o .obj.shell/string.o .obj.shell/ctype.o \ + $(PROGS)/system/shell/kolibri.ld + $(call gcc_link,$(PROGS)/system/shell/kolibri.ld) +.obj.shell/shell.o: $(PROGS)/system/shell/shell.c \ + $(PROGS)/system/shell/all.h \ + $(PROGS)/system/shell/system/*.h \ + $(PROGS)/system/shell/cmd/*.c \ + $(PROGS)/system/shell/modules/*.c \ + $(PROGS)/system/shell/locale/rus/globals.h \ + Makefile.gcc | .obj.shell + $(gcc_compile) +.obj.shell/kolibri.o .obj.shell/stdlib.o .obj.shell/string.o .obj.shell/ctype.o: .obj.shell/%.o: \ + $(PROGS)/system/shell/system/%.c $(PROGS)/system/shell/system/*.h \ + Makefile.gcc | .obj.shell + $(gcc_compile) + win32-gcc -c -Os -o $@ $< +.obj.shell/start.o: $(PROGS)/system/shell/start.asm | .obj.shell + fasm $< $@ +.obj.shell: + mkdir -p .obj.shell + +# Rules for e80 +E80DIR=$(PROGS)/emulator/e80/trunk +e80: .obj.e80/start.o .obj.e80/kolibri.o .obj.e80/stdlib.o .obj.e80/string.o .obj.e80/z80.o .obj.e80/e80.o + $(call gcc_link,$(E80DIR)/kolibri.ld) +.obj.e80/e80.o: $(E80DIR)/e80.c $(E80DIR)/48.h \ + $(E80DIR)/system/*.h $(E80DIR)/system/msgbox.c \ + $(E80DIR)/z80/z80.h Makefile.gcc | .obj.e80 + $(gcc_compile) +.obj.e80/kolibri.o .obj.e80/stdlib.o .obj.e80/string.o: .obj.e80/%.o: \ + $(E80DIR)/system/%.c $(E80DIR)/system/*.h Makefile.gcc | .obj.e80 + $(gcc_compile) +.obj.e80/z80.o: $(E80DIR)/z80/z80.c $(E80DIR)/z80/* + $(gcc_compile) +.obj.e80/start.o: $(E80DIR)/asm_code.asm | .obj.e80 + fasm $< $@ +.obj.e80: + mkdir -p .obj.e80 + +# Rules for sdk/sound, used by media/ac97snd +SOUNDDIR=$(PROGS)/develop/sdk/trunk/sound/src +SOUND_OBJECTS:=$(patsubst $(SOUNDDIR)/%.asm,.sdk/%.obj,$(wildcard $(SOUNDDIR)/*.asm)) +SOUND_INC_FILES:=$(wildcard $(SOUNDDIR)/*.inc) +.sdk/sound.lib: $(SOUND_OBJECTS) + win32-link /lib /out:$@ $^ +$(SOUND_OBJECTS): .sdk/%.obj: $(SOUNDDIR)/%.asm $(SOUND_INC_FILES) | .sdk + fasm $< $@ +.sdk: + mkdir -p .sdk +# Rules for media/ac97snd +AC97DIR=$(PROGS)/media/ac97snd +media/ac97snd: .obj.ac97snd/ac97snd.exe + $(msvc_final) +.obj.ac97snd/ac97snd.exe: .obj.ac97snd/ac97wav.obj .obj.ac97snd/crt.obj .obj.ac97snd/k_lib.obj \ + .obj.ac97snd/mpg.lib .sdk/sound.lib .obj.ac97snd/ufmod.obj + $(msvc_link) +.obj.ac97snd/ac97wav.obj: $(AC97DIR)/ac97snd/ac97wav.c \ + $(AC97DIR)/kolibri.h $(AC97DIR)/ac97snd/ac97wav.h $(AC97DIR)/mpg/mpg123.h \ + $(AC97DIR)/sound.h $(AC97DIR)/ufmod-codec.h Makefile.msvc | .obj.ac97snd + $(msvc_compile) +.obj.ac97snd/crt.obj: $(AC97DIR)/ac97snd/crt.c $(AC97DIR)/ac97snd/crt.h Makefile.msvc | .obj.ac97snd + $(msvc_compile) +.obj.ac97snd/k_lib.obj: $(AC97DIR)/ac97snd/k_lib.asm $(AC97DIR)/ac97snd/proc32.inc | .obj.ac97snd + fasm $< $@ +.obj.ac97snd/ufmod.obj: $(AC97DIR)/ufmod-config.asm | .obj.ac97snd + fasm $< $@ -s .deps/ac97snd-ufmod.fas + prepsrc .deps/ac97snd-ufmod.fas /dev/stdout | \ + perl -n -e 's|\\|/|g;s| |\\ |g;push @a,$$1 if/^;include\\ \x27(.*?)\x27/;' \ + -e 'END{$$a=join " \\\n ",@a;print "$@: $$a\n$$a:\n"}' > .deps/ac97snd-ufmod.Po +-include .deps/ac97snd-ufmod.Po +AC97SND_MPG_C_FILES:=$(wildcard $(AC97DIR)/mpg/*.c) +AC97SND_MPG_H_FILES:=$(wildcard $(AC97DIR)/mpg/*.h) +AC97SND_MPG_C_OBJECTS:=$(patsubst $(AC97DIR)/mpg/%.c,.obj.ac97snd/%.o,$(AC97SND_MPG_C_FILES)) +.obj.ac97snd/mpg.lib: $(AC97SND_MPG_C_OBJECTS) .obj.ac97snd/pow.obj + win32-link /lib /ltcg /out:$@ $^ +$(AC97SND_MPG_C_OBJECTS): .obj.ac97snd/%.o: $(AC97DIR)/mpg/%.c $(AC97SND_MPG_H_FILES) Makefile.msvc | .obj.ac97snd + $(msvc_compile) +.obj.ac97snd/pow.obj: $(AC97DIR)/mpg/pow.asm $(AC97DIR)/mpg/proc32.inc | .obj.ac97snd + fasm $< $@ +.obj.ac97snd: + mkdir -p .obj.ac97snd diff --git a/data/eng/Makefile b/data/eng/Makefile index 772df2e9d..7f5514b48 100644 --- a/data/eng/Makefile +++ b/data/eng/Makefile @@ -1,639 +1,640 @@ -# General rule for naming: variables with CAPITALIZED names hold settings, -# you can - and are expected - to modify it; variables with lowercase names -# are intermediate variables and macroses not to be modified unless you -# know what you're doing. - -# Define directories for destination, source repository, sources of kernel, sources of programs. -BUILD_DIR:=build -REPOSITORY:=../.. -KERNEL:=$(REPOSITORY)/kernel/trunk -PROGS:=$(REPOSITORY)/programs - -# The main goal: build kolibri.img and kolibri.iso -all: $(BUILD_DIR)/kolibri.img $(BUILD_DIR)/kolibri.iso - -# Docpak requires some documents; we place them -# into 'docs' subdir and communicate with FASM -# through environment var DOCDIR. -DOCDIR:=docs/ -export DOCDIR - -# Because most programs are written in FASM and have -# the common structure of one main .asm file possibly including -# several .inc files, we handle this case separately. -# Namely, we organize one big list of such programs -# (FASM_PROGRAMS, see below) containing name of local binary file, -# name of file inside kolibri.img and name of the source file. -# This list is maintained by hand, and the rest is done with some macroses... -# well, slightly complicated macroses - however, you do not need to -# understand them in order to maintain the list. -# To add a FASM program with one .asm file, just -# add the corresponding item to the list and enjoy -# the power of GNU make. - -# The list of all FASM programs with one main FASM file. -# Every item consists of three parts, separated by ':'. -# First part is the real name of binary file in $(BUILD_DIR) -# as it should be produced by make. -# Second part is the name of a file inside kolibri.img, -# usually uppercased version of first part - to save space -# for FAT filesystem. -# Third part is the name of the source file. -# Spaces separate items, so spaces in names should be -# represented as '|'. -FASM_PROGRAMS:=\ - @clip:@CLIP:$(PROGS)/system/clip/trunk/@clip.ASM \ - @menu:@MENU:$(PROGS)/system/menu/trunk/menu.asm \ - @notify:@NOTIFY:$(PROGS)/system/notify/trunk/@notify.asm \ - @panel:@PANEL:$(PROGS)/system/panel/trunk/@PANEL.ASM \ - @rb:@RB:$(PROGS)/system/rb/trunk/@RB.ASM \ - @ss:@SS:$(PROGS)/system/ss/trunk/@ss.asm\ - refrscrn:REFRSCRN:$(PROGS)/system/refrscrn/refrscrn.asm \ - asciivju:ASCIIVJU:$(PROGS)/develop/asciivju/trunk/asciivju.asm \ - calc:CALC:$(PROGS)/other/calc/trunk/calc.asm \ - calendar:CALENDAR:$(PROGS)/system/calendar/trunk/calendar.asm \ - commouse:COMMOUSE:$(PROGS)/system/commouse/trunk/commouse.asm \ - cpu:CPU:$(PROGS)/system/cpu/trunk/cpu.asm \ - cpuid:CPUID:$(PROGS)/system/cpuid/trunk/CPUID.ASM \ - desktop:DESKTOP:$(PROGS)/system/desktop/trunk/desktop.asm \ - disptest:DISPTEST:$(PROGS)/system/disptest/trunk/disptest.ASM \ - docpack:DOCPACK:$(PROGS)/system/docpack/trunk/docpack.asm \ - end:END:$(PROGS)/system/end/light/end.asm \ - gmon:GMON:$(PROGS)/system/gmon/gmon.asm \ - hdd_info:HDD_INFO:$(PROGS)/system/hdd_info/trunk/hdd_info.asm \ - icon:ICON:$(PROGS)/system/icon/trunk/icon.asm \ - cropflat:CROPFLAT:$(PROGS)/system/cropflat/cropflat.asm \ - kbd:KBD:$(PROGS)/system/kbd/trunk/kbd.ASM \ - kpack:KPACK:$(PROGS)/other/kpack/trunk/kpack.asm \ - launcher:LAUNCHER:$(PROGS)/system/launcher/trunk/launcher.asm \ - magnify:MAGNIFY:$(PROGS)/demos/magnify/trunk/magnify.asm \ - mgb:MGB:$(PROGS)/system/mgb/trunk/mgb.asm \ - mousemul:MOUSEMUL:$(PROGS)/system/mousemul/trunk/mousemul.asm \ - madmouse:MADMOUSE:$(PROGS)/other/madmouse/madmouse.asm \ - mykey:MYKEY:$(PROGS)/system/MyKey/trunk/MyKey.asm \ - pcidev:PCIDEV:$(PROGS)/system/pcidev/trunk/PCIDEV.ASM \ - pic4:PIC4:$(PROGS)/media/pic4/trunk/pic4.asm \ - rdsave:RDSAVE:$(PROGS)/system/rdsave/trunk/rdsave.asm \ - rtfread:RTFREAD:$(PROGS)/other/rtfread/trunk/rtfread.asm \ - run:RUN:$(PROGS)/system/run/trunk/run.asm \ - scrshoot:SCRSHOOT:$(PROGS)/media/scrshoot/scrshoot.asm \ - setup:SETUP:$(PROGS)/system/setup/trunk/setup.asm \ - test:TEST:$(PROGS)/system/test/trunk/test.asm \ - tinypad:TINYPAD:$(PROGS)/develop/tinypad/trunk/tinypad.asm \ - zkey:ZKEY:$(PROGS)/system/zkey/trunk/ZKEY.ASM \ - 3d/3dcube2:3D/3DCUBE2:$(PROGS)/demos/3dcube2/trunk/3DCUBE2.ASM \ - 3d/3dsheart:3D/3DSHEART:$(PROGS)/demos/3dsheart/trunk/3dsheart.asm \ - 3d/3dwav:3D/3DWAV:$(PROGS)/demos/3dwav/trunk/3dwav.asm \ - 3d/crownscr:3D/CROWNSCR:$(PROGS)/demos/crownscr/trunk/crownscr.asm \ - 3d/flatwav:3D/FLATWAV:$(PROGS)/demos/flatwav/trunk/FLATWAV.ASM \ - 3d/free3d04:3D/FREE3D04:$(PROGS)/demos/free3d04/trunk/free3d04.asm \ - 3d/view3ds:3D/VIEW3DS:$(PROGS)/demos/3DS/VIEW3DS.ASM \ - demos/bcdclk:DEMOS/BCDCLK:$(PROGS)/demos/bcdclk/trunk/bcdclk.asm \ - demos/circle:DEMOS/CIRCLE:$(PROGS)/develop/examples/circle/trunk/circle.asm \ - demos/colorref:DEMOS/COLORREF:$(PROGS)/demos/colorref/trunk/colorref.asm \ - demos/cslide:DEMOS/CSLIDE:$(PROGS)/demos/cslide/trunk/cslide.asm \ - demos/eyes:DEMOS/EYES:$(PROGS)/demos/eyes/trunk/eyes.asm \ - demos/fire:DEMOS/FIRE:$(PROGS)/demos/fire/trunk/fire.asm \ - demos/firework:DEMOS/FIREWORK:$(PROGS)/demos/firework/trunk/firework.asm \ - demos/movback:DEMOS/MOVBACK:$(PROGS)/demos/movback/trunk/movback.asm \ - demos/plasma:DEMOS/PLASMA:$(PROGS)/demos/plasma/trunk/plasma.asm \ - demos/timer:DEMOS/TIMER:$(PROGS)/demos/timer/trunk/timer.asm \ - demos/tinyfrac:DEMOS/TINYFRAC:$(PROGS)/demos/tinyfrac/trunk/tinyfrac.asm \ - demos/trantest:DEMOS/TRANTEST:$(PROGS)/demos/trantest/trunk/trantest.asm \ - demos/tube:DEMOS/TUBE:$(PROGS)/demos/tube/trunk/tube.asm \ - demos/unvwater:DEMOS/UNVWATER:$(PROGS)/demos/unvwater/trunk/unvwater.asm \ - demos/web:DEMOS/WEB:$(PROGS)/demos/web/trunk/web.asm \ - develop/board:DEVELOP/BOARD:$(PROGS)/system/board/trunk/board.asm \ - develop/cObj:DEVELOP/cObj:$(PROGS)/develop/cObj/trunk/cObj.asm \ - develop/fasm:DEVELOP/FASM:$(PROGS)/develop/fasm/trunk/fasm.asm \ - develop/h2d2b:DEVELOP/H2D2B:$(PROGS)/develop/h2d2b/trunk/h2d2b.asm \ - develop/heed:DEVELOP/HEED:$(PROGS)/develop/heed/trunk/heed.asm \ - develop/ipc:DEVELOP/IPC:$(PROGS)/network/ipc/trunk/ipc.asm \ - develop/keyascii:DEVELOP/KEYASCII:$(PROGS)/develop/keyascii/trunk/keyascii.asm \ - develop/mtdbg:DEVELOP/MTDBG:$(PROGS)/develop/mtdbg/mtdbg.asm \ - develop/scancode:DEVELOP/SCANCODE:$(PROGS)/develop/scancode/trunk/scancode.asm \ - develop/t_edit:DEVELOP/T_EDIT:$(PROGS)/other/t_edit/t_edit.asm \ - develop/test_gets:DEVELOP/test_gets:$(PROGS)/develop/libraries/console/examples/test_gets.asm \ - develop/testcon2:DEVELOP/TESTCON2:$(PROGS)/develop/libraries/console/examples/testcon2.asm \ - develop/thread:DEVELOP/THREAD:$(PROGS)/develop/examples/thread/trunk/thread.asm \ - develop/info/asm.syn:DEVELOP/INFO/ASM.SYN:$(PROGS)/other/t_edit/info/asm_syn.asm \ - develop/info/cpp_kol_cla.syn:DEVELOP/INFO/CPP_KOL_CLA.SYN:$(PROGS)/other/t_edit/info/cpp_kol_cla_syn.asm \ - develop/info/cpp_kol_dar.syn:DEVELOP/INFO/CPP_KOL_DAR.SYN:$(PROGS)/other/t_edit/info/cpp_kol_dar_syn.asm \ - develop/info/cpp_kol_def.syn:DEVELOP/INFO/CPP_KOL_DEF.SYN:$(PROGS)/other/t_edit/info/cpp_kol_def_syn.asm \ - develop/info/default.syn:DEVELOP/INFO/DEFAULT.SYN:$(PROGS)/other/t_edit/info/default_syn.asm \ - develop/info/html.syn:DEVELOP/INFO/HTML.SYN:$(PROGS)/other/t_edit/info/html_syn.asm \ - develop/info/ini_files.syn:DEVELOP/INFO/INI_FILES.SYN:$(PROGS)/other/t_edit/info/ini_files_syn.asm \ - develop/info/win_const.syn:DEVELOP/INFO/WIN_CONST.SYN:$(PROGS)/other/t_edit/info/win_const_syn.asm \ - drivers/com_mouse.obj:DRIVERS/COM_MOUSE.OBJ:$(KERNEL)/drivers/com_mouse.asm \ - drivers/emu10k1x.obj:DRIVERS/EMU10K1X.OBJ:$(KERNEL)/drivers/emu10k1x.asm \ - drivers/fm801.obj:DRIVERS/FM801.OBJ:$(KERNEL)/drivers/fm801.asm \ - drivers/infinity.obj:DRIVERS/INFINITY.OBJ:$(KERNEL)/drivers/infinity.asm \ - drivers/ps2mouse.obj:DRIVERS/PS2MOUSE.OBJ:$(REPOSITORY)/drivers/mouse/ps2mouse4d/trunk/ps2mouse.asm \ - drivers/sb16.obj:DRIVERS/SB16.OBJ:$(KERNEL)/drivers/sb16/sb16.asm \ - drivers/sound.obj:DRIVERS/SOUND.OBJ:$(KERNEL)/drivers/sound.asm \ - drivers/vt8235.obj:DRIVERS/VT8235.OBJ:$(KERNEL)/drivers/vt823x.asm \ - File|Managers/kfar:File|Managers/KFAR:$(PROGS)/fs/kfar/trunk/kfar.asm \ - File|Managers/kfm:File|Managers/KFM:$(PROGS)/fs/kfm/trunk/kfm.asm \ - File|Managers/opendial:File|Managers/OPENDIAL:$(PROGS)/fs/opendial/opendial.asm \ - games/15:GAMES/15:$(PROGS)/games/15/trunk/15.ASM \ - games/arcanii:GAMES/ARCANII:$(PROGS)/games/arcanii/trunk/arcanii.asm \ - games/freecell:GAMES/FREECELL:$(PROGS)/games/freecell/freecell.asm \ - games/gomoku:GAMES/GOMOKU:$(PROGS)/games/gomoku/trunk/gomoku.asm \ - games/invaders:GAMES/INVADERS:$(PROGS)/games/invaders/invaders.asm \ - games/klavisha:GAMES/KLAVISHA:$(PROGS)/games/klavisha/trunk/klavisha.asm \ - games/lines:GAMES/LINES:$(PROGS)/games/lines/lines.asm \ - games/mblocks:GAMES/MBLOCKS:$(PROGS)/games/mblocks/trunk/mblocks.asm \ - games/msquare:GAMES/MSQUARE:$(PROGS)/games/MSquare/trunk/MSquare.asm \ - games/phenix:GAMES/PHENIX:$(PROGS)/games/phenix/trunk/phenix.asm \ - games/pipes:GAMES/PIPES:$(PROGS)/games/pipes/pipes.asm \ - games/pong:GAMES/PONG:$(PROGS)/games/pong/trunk/pong.asm \ - games/pong3:GAMES/PONG3:$(PROGS)/games/pong3/trunk/pong3.asm \ - games/rsquare:GAMES/RSQUARE:$(PROGS)/games/rsquare/trunk/rsquare.asm \ - games/soko:GAMES/SOKO:$(PROGS)/games/soko/trunk/SOKO.ASM \ - games/snake:GAMES/SNAKE:$(PROGS)/games/snake/trunk/snake.asm \ - games/sq_game:GAMES/SQ_GAME:$(PROGS)/games/sq_game/trunk/SQ_GAME.ASM \ - games/sudoku:GAMES/SUDOKU:$(PROGS)/games/sudoku/trunk/sudoku.asm \ - games/sw:GAMES/SW:$(PROGS)/games/sw/trunk/sw.asm \ - games/tanks:GAMES/TANKS:$(PROGS)/games/tanks/trunk/tanks.asm \ - games/tetris:GAMES/TETRIS:$(PROGS)/games/tetris/trunk/tetris.asm \ - lib/archiver.obj:LIB/ARCHIVER.OBJ:$(PROGS)/fs/kfar/trunk/kfar_arc/kfar_arc.asm \ - lib/box_lib.obj:LIB/BOX_LIB.OBJ:$(PROGS)/develop/libraries/box_lib/trunk/box_lib.asm \ - lib/console.obj:LIB/CONSOLE.OBJ:$(PROGS)/develop/libraries/console/console.asm \ - lib/libgfx.obj:LIB/LIBGFX.OBJ:$(PROGS)/develop/libraries/libs-dev/libgfx/libgfx.asm \ - lib/libimg.obj:LIB/LIBIMG.OBJ:$(PROGS)/develop/libraries/libs-dev/libimg/libimg.asm \ - lib/libini.obj:LIB/LIBINI.OBJ:$(PROGS)/develop/libraries/libs-dev/libini/libini.asm \ - lib/libio.obj:LIB/LIBIO.OBJ:$(PROGS)/develop/libraries/libs-dev/libio/libio.asm \ - lib/network.obj:LIB/NETWORK.OBJ:$(PROGS)/develop/libraries/network/network.asm \ - lib/proc_lib.obj:LIB/PROC_LIB.OBJ:$(PROGS)/develop/libraries/proc_lib/trunk/proc_lib.asm \ - lib/cnv_png.obj:LIB/CNV_PNG.OBJ:$(PROGS)/media/zsea/plugins/png/cnv_png.asm \ - media/animage:MEDIA/ANIMAGE:$(PROGS)/media/animage/trunk/animage.asm \ - media/cdp:MEDIA/CDP:$(PROGS)/media/cdp/trunk/cdp.asm \ - media/kiv:MEDIA/KIV:$(PROGS)/media/kiv/trunk/kiv.asm \ - media/listplay:MEDIA/LISTPLAY:$(PROGS)/media/listplay/trunk/listplay.asm \ - media/midamp:MEDIA/MIDAMP:$(PROGS)/media/midamp/trunk/midamp.asm \ - media/startmus:MEDIA/STARTMUS:$(PROGS)/media/startmus/trunk/STARTMUS.ASM \ - network/airc:NETWORK/AIRC:$(PROGS)/network/airc/trunk/airc.asm \ - network/arpstat:NETWORK/ARPSTAT:$(PROGS)/network/arpstat/trunk/arpstat.asm \ - network/chess:NETWORK/CHESS:$(PROGS)/network/chess/trunk/chess.asm \ - network/downloader:NETWORK/DOWNLOADER:$(PROGS)/network/downloader/trunk/downloader.asm \ - network/ethstat:NETWORK/ETHSTAT:$(PROGS)/network/ethstat/trunk/ethstat.asm \ - network/ftps:NETWORK/FTPS:$(PROGS)/network/ftps/trunk/FTPS.ASM \ - network/https:NETWORK/HTTPS:$(PROGS)/network/https/trunk/https.asm \ - network/nntpc:NETWORK/NNTPC:$(PROGS)/network/nntpc/trunk/nntpc.asm \ - network/nslookup:NETWORK/NSLOOKUP:$(PROGS)/develop/libraries/network/examples/nslookup.asm \ - network/popc:NETWORK/POPC:$(PROGS)/network/popc/trunk/popc.asm \ - network/smtps:NETWORK/SMTPS:$(PROGS)/network/smtps/trunk/smtps.asm \ - network/stackcfg:NETWORK/STACKCFG:$(PROGS)/network/stackcfg/trunk/stackcfg.asm \ - network/telnet:NETWORK/TELNET:$(PROGS)/network/telnet/trunk/telnet.asm \ - network/tftpc:NETWORK/TFTPC:$(PROGS)/network/tftpc/trunk/tftpc.asm \ - network/VNCclient:NETWORK/VNCclient:$(PROGS)/network/VNCclient/VNCclient.asm \ - network/ym:NETWORK/YM:$(PROGS)/network/ym/trunk/ym.asm \ - network/zeroconf:NETWORK/ZEROCONF:$(PROGS)/network/zeroconf/trunk/zeroconf.asm \ -# end of list -# The list of all FASM programs with one main FASM file for CD image. -# Format of an item is exactly the same as in the previous list. -FASM_PROGRAMS_CD:=\ - drivers/atikms:DRIVERS/ATIKMS:$(REPOSITORY)/drivers/video/drm/radeon/atikms.asm \ -# end of list - -# The list of all FASM programs which needs to be compiled without KPACKing. -FASM_NOKPACK_PROGRAMS:=\ - distr_data/9x2klbr.exe:-:$(PROGS)/hd_load/9x2klbr/9x2klbr.asm \ - distr_data/MeOSload.com:-:$(PROGS)/hd_load/meosload/MeOSload.asm \ - distr_data/mtldr:-:$(PROGS)/hd_load/mtldr/mtldr.asm \ - mtldr_for_installer:-:$(PROGS)/hd_load/mtldr_install/mtldr_code/mtldr.asm \ - distr_data/mtldr_install.exe:-:$(PROGS)/hd_load/mtldr_install/mtldr_install.asm \ - distr_data/MeOSload_for_usb_boot_old.com:-:$(PROGS)/hd_load/usb_boot_old/MeOSload.asm \ - distr_data/enable_for_usb_boot_old.exe:-:$(PROGS)/hd_load/usb_boot_old/enable.asm \ - distr_data/BOOT_F32.BIN:-:$(PROGS)/hd_load/usb_boot/BOOT_F32.ASM \ - distr_data/MTLD_F32:-:$(PROGS)/hd_load/usb_boot/mtldr.asm \ - distr_data/inst.exe:-:$(PROGS)/hd_load/usb_boot/inst.asm \ - distr_data/setmbr.exe:-:$(PROGS)/hd_load/usb_boot/setmbr.asm \ -#end of list - -# The list of all NASM programs with one main NASM file. -# Format of an item is exactly the same as in the previous list. -NASM_PROGRAMS:=\ - demos/aclock:DEMOS/ACLOCK:$(PROGS)/demos/aclock/trunk/aclock.asm \ - games/c4:GAMES/C4:$(PROGS)/games/c4/trunk/c4.asm \ -# end of list - -# The list of files which should be copied from somewhere. -# Format of an item is exactly the same as in the previous list. -COPY_FILES:=\ - macros.inc:MACROS.INC:$(PROGS)/macros.inc \ - config.inc:CONFIG.INC:$(PROGS)/config.inc \ - struct.inc:STRUCT.INC:$(PROGS)/struct.inc \ - develop/te_icon.png:DEVELOP/TE_ICON.PNG:$(PROGS)/other/t_edit/te_icon.png \ - develop/tl_nod_16.png:DEVELOP/TL_NOD_16.PNG:$(PROGS)/other/t_edit/tl_nod_16.png \ - develop/tl_sys_16.png:DEVELOP/TL_SYS_16.PNG:$(PROGS)/media/log_el/trunk/tl_sys_16.png \ - File|Managers/z_icons.png:File|Managers/Z_ICONS.PNG:$(PROGS)/fs/opendial/z_icons.png \ - File|Managers/kfm_keys.txt:File|Managers/KFM_KEYS.TXT:$(PROGS)/fs/kfm/trunk/docs/english/kfm_keys.txt \ - File|Managers/buttons.bmp:File|Managers/BUTTONS.BMP:$(PROGS)/fs/kfm/trunk/buttons.bmp \ - File|Managers/icons.bmp:File|Managers/ICONS.BMP:$(PROGS)/fs/kfm/trunk/icons.bmp \ - fonts/litt.chr:FONTS/LITT.CHR:$(PROGS)/demos/bgitest/trunk/FONTS/LITT.CHR \ - games/snake.ini:GAMES/SNAKE.INI:$(PROGS)/games/snake/trunk/snake.ini \ - games/skin.raw:GAMES/SKIN.RAW:$(PROGS)/games/soko/trunk/SKIN.RAW \ - games/soko-4.lev:GAMES/SOKO-4.LEV:$(PROGS)/games/soko/trunk/SOKO-4.LEV \ - games/soko-5.lev:GAMES/SOKO-5.LEV:$(PROGS)/games/soko/trunk/SOKO-5.LEV \ - games/soko-6.lev:GAMES/SOKO-6.LEV:$(PROGS)/games/soko/trunk/SOKO-6.LEV \ - games/soko-7.lev:GAMES/SOKO-7.LEV:$(PROGS)/games/soko/trunk/SOKO-7.LEV \ - games/soko-8.lev:GAMES/SOKO-8.LEV:$(PROGS)/games/soko/trunk/SOKO-8.LEV \ - games/soko-9.lev:GAMES/SOKO-9.LEV:$(PROGS)/games/soko/trunk/SOKO-9.LEV \ - media/kiv.ini:MEDIA/KIV.INI:$(PROGS)/media/kiv/trunk/kiv.ini \ - .shell:.shell:$(PROGS)/system/shell/bin/eng/.shell \ - mykey.ini:MYKEY.INI:$(PROGS)/system/MyKey/trunk/mykey.ini \ -# end of list - -# The list of all C-- programs with one main C-- file. -# Format of an item is exactly the same as in the previous list, -# except that there can be fourth field with parameters for a compiler. -CMM_PROGRAMS:=\ - File|Managers/Eolite:File|Managers/EOLITE:$(PROGS)/fs/Eolite/trunk/Eolite.c-- \ - games/clicks:GAMES/CLICKS:$(PROGS)/games/clicks/trunk/clicks.c \ - games/FindNumbers:GAMES/FindNumbers:$(PROGS)/games/FindNumbers/trunk/FindNumbers.c-- \ - games/flood-it:GAMES/flood-it:$(PROGS)/games/flood-it/trunk/flood-it.c \ - games/mine:GAMES/MINE:$(PROGS)/games/mine/trunk/mine.c--:/MEOS \ - HTMLv:HTMLv:$(PROGS)/network/htmlv/browser/HTMLv.c \ -#develop/c--:DEVELOP/C--:$(PROGS)/develop/c--/trunk/32.c-- \ -# end of list - -# List of other files to be included in the image file. -# Some of them are auto-built with special rules, some just exist before build. -# Each item is of the form :. -# Spaces should be represented as |. -OTHER_FILES:=autorun.dat:AUTORUN.DAT \ - background.gif:background.gif default.skn:DEFAULT.SKN \ - e80:E80 graph:GRAPH hdread:HDREAD \ - icons.dat:ICONS.DAT iconstrp.png:ICONSTRP.PNG index_htm:INDEX.HTM \ - kernel.mnt:KERNEL.MNT kerpack:KERPACK keymap.key:KEYMAP.KEY \ - kuzkina.mid:KUZKINA.MID lang.inc:LANG.INC lang.ini:LANG.INI \ - menu.dat:MENU.DAT \ - panel.ini:PANEL.INI setup.dat:SETUP.DAT \ - shell:SHELL table:TABLE \ - vmode:VMODE 3d/3dsheart:3D/3DSHEART \ - 3d/cubeline:3D/CUBELINE 3d/gears:3D/GEARS 3d/house.3ds:3D/HOUSE.3DS \ - demos/ak47.lif:DEMOS/AK47.LIF \ - demos/barge.lif:DEMOS/BARGE.LIF demos/life2:DEMOS/LIFE2 \ - demos/relay.lif:DEMOS/RELAY.LIF demos/rpento.lif:DEMOS/RPENTO.LIF \ - demos/use_mb:DEMOS/USE_MB \ - File|Managers/eolite.ini:File|Managers/EOLITE.INI \ - File|Managers/icons.ini:File|Managers/ICONS.INI \ - File|Managers/kfar.ini:File|Managers/KFAR.INI \ - File|Managers/kfm.ini:File|Managers/KFM.INI \ - games/checkers:GAMES/CHECKERS \ - games/kosilka:GAMES/KOSILKA games/kosskin.gfx:GAMES/KOSSKIN.GFX \ - games/reversi:GAMES/REVERSI games/rforces:GAMES/RFORCES \ - games/xonix:GAMES/XONIX games/megamaze:GAMES/MEGAMAZE \ - lib/msgbox.obj:LIB/MSGBOX.OBJ \ - lib/pixlib.obj:LIB/PIXLIB.OBJ lib/sort.obj:LIB/SORT.OBJ \ - drivers/intel_hda.obj:DRIVERS/intel_hda.obj \ - media/ac97snd:MEDIA/AC97SND \ - network/jmail:NETWORK/JMAIL network/zeroconf.ini:NETWORK/ZEROCONF.INI \ -#end of list -#3d/logio.bmp:3D/LOGIO.BMP 3d/cubetext:3D/CUBETEXT - -# Generate skins list understandable by gnu make -Makefile.skins: $(REPOSITORY)/skins/authors.txt $(REPOSITORY)/data/generate_makefile_skins.sh - cut -f1 $< | $(SHELL) $(REPOSITORY)/data/generate_makefile_skins.sh > $@ -include Makefile.skins - -# Extra targets for LiveCD image in the syntax of mkisofs -MKISOFS_EXTRA:=\ - dosbox/=$(PROGS)/emulator/DosBox/dosbox \ - dosbox/=$(PROGS)/emulator/DosBox/dosbox.conf \ - dosbox/=$(PROGS)/emulator/DosBox/readme.txt \ - /=drivers/atikms \ - /=drivers/atikms.dll \ - /=distr_data/autorun.inf \ - /=distr_data/KolibriOS_icon.ico \ - /=distr_data/readme.txt \ - Skins/=$(REPOSITORY)/skins/authors.txt \ - Docs/config.txt=docs/CONFIG.TXT \ - Docs/copying.txt=docs/COPYING.TXT \ - Docs/hot_keys.txt=docs/HOT_KEYS.TXT \ - Docs/install.txt=docs/INSTALL.TXT \ - Docs/readme.txt=docs/README.TXT \ - Docs/stack.txt=docs/STACK.TXT \ - Docs/sysfuncs.txt=docs/SYSFUNCS.TXT \ - HD_Load/9x2klbr/=distr_data/9x2klbr.exe \ - HD_Load/9x2klbr/=../common/HD_load/9x2klbr/LDKLBR.VXD \ - HD_Load/9x2klbr/=$(PROGS)/hd_load/9x2klbr/readme.txt \ - HD_Load/MeOSLoad/=distr_data/MeOSload.com \ - HD_Load/MeOSLoad/=$(PROGS)/hd_load/meosload/AUTOEXEC.BAT \ - HD_Load/MeOSLoad/=$(PROGS)/hd_load/meosload/CONFIG.SYS \ - HD_Load/MeOSLoad/=$(PROGS)/hd_load/meosload/L_readme.txt \ - HD_Load/MeOSLoad/=$(PROGS)/hd_load/meosload/L_readme_Win.txt \ - HD_Load/mtldr/=distr_data/mtldr \ - HD_Load/mtldr/install.txt=$(PROGS)/hd_load/mtldr/install_eng.txt \ - HD_Load/mtldr/=$(PROGS)/hd_load/mtldr/vista_install.bat \ - HD_Load/mtldr/=$(PROGS)/hd_load/mtldr/vista_remove.bat \ - HD_Load/=distr_data/mtldr_install.exe \ - HD_Load/memdisk=../common/HD_load/memdisk \ - HD_Load/USB_Boot/=distr_data/BOOT_F32.BIN \ - HD_Load/USB_Boot/=distr_data/MTLD_F32 \ - HD_Load/USB_Boot/=distr_data/inst.exe \ - HD_Load/USB_Boot/=distr_data/setmbr.exe \ - HD_Load/USB_Boot/readme.txt=$(PROGS)/hd_load/usb_boot/readme_eng.txt \ - HD_Load/USB_boot_old/=$(PROGS)/hd_load/usb_boot_old/usb_boot.rtf \ - HD_Load/USB_boot_old/=$(PROGS)/hd_load/usb_boot_old/usb_boot_866.txt \ - HD_Load/USB_boot_old/=$(PROGS)/hd_load/usb_boot_old/usb_boot_1251.txt \ - HD_Load/USB_boot_old/MeOSload.com=distr_data/MeOSload_for_usb_boot_old.com \ - HD_Load/USB_boot_old/enable.exe=distr_data/enable_for_usb_boot_old.exe \ - games/=../common/games \ - games/fara=games/fara \ - games/soko/soko=games/soko \ -#end of list - -# Some macro for convenient work. -# Macros for replacing '|' to escaped space '\ '. -space:=\ #plus space -respace=$(subst |,$(space),$(1)) -# Macro for selecting different parts of ':'-separated items. -binarypart=$(word 1,$(subst :, ,$(1))) -imagepart=$(word 2,$(subst :, ,$(1))) -sourcepart=$(word 3,$(subst :, ,$(1))) -parampart=$(word 4,$(subst :, ,$(1))) -# Get file names, possibly with spaces inside, from an item. -# Here $(f) is an item - in fact, macro argument. -fbinary=$(call respace,$(call binarypart,$(f))) -fimage=$(call respace,$(call imagepart,$(f))) -fsource=$(call respace,$(call sourcepart,$(f))) -fparam=$(call respace,$(call parampart,$(f))) - -# Define targets for image file. -# Join all the lists above. -targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS) -# For each item in the united list call fbinary. -targets:=$(foreach f,$(targets_full),$(fbinary)) - -# Define a command for copying a file inside the image. -# mcopy_command is a macro with two parameters, -# local file name $(1) and image file name $(2). -# Note that spaces in these have to be escaped with backslashes. -mcopy_command=mcopy -moi $(BUILD_DIR)/kolibri.img $(1) ::$(2) -# Specialize a previous command for an item $(f) in one of lists. -mcopy_item_command=$(call mcopy_command,$(fbinary),$(fimage)) - -# Join all $(mcopy_item_command) for all items, -# append newline after each item. -# The first newline character after "define" line and -# the last newline character before "endef" line get away -# with define/endef, so we make three newline characters, -# that is two empty lines, in order to get one in $(newline). -define newline - - -endef -mcopy_all_items:=$(foreach f,$(targets_full),$(mcopy_item_command)$(newline)) - -# add skins to MKISOFS_EXTRA -MKISOFS_EXTRA:=$(MKISOFS_EXTRA) $(foreach f,$(SKIN_SOURCES),$(call imagepart,$(f))=$(call binarypart,$(f))) -# dependencies of MKISOFS_EXTRA; we iterate through $(MKISOFS_EXTRA), -# substitute "=" with space, get the 2nd word and join all results -mkisofs_extra_targets:=$(call respace,$(foreach f,$(MKISOFS_EXTRA),$(word 2,$(subst =, ,$(f))))) - -# The first goal: floppy image. -$(BUILD_DIR)/kolibri.img: $(BUILD_DIR)/.dir \ - Makefile \ - $(BUILD_DIR)/boot_fat12.bin \ - $(targets) -# SYSXTREE -# 3d/CUBETEXT -# 3d/LOGIO.BMP - str=`date -u +"[auto-build %d %b %Y %R, r$(REV)]"`; \ - echo -n $$str|dd of=kernel.mnt bs=1 seek=`expr 279 - length "$$str"` conv=notrunc 2>/dev/null - dd if=/dev/zero of=$(BUILD_DIR)/kolibri.img count=2880 bs=512 2>&1 - mformat -f 1440 -i $(BUILD_DIR)/kolibri.img :: - dd if=$(BUILD_DIR)/boot_fat12.bin of=$(BUILD_DIR)/kolibri.img count=1 bs=512 conv=notrunc 2>&1 - mmd -i $(BUILD_DIR)/kolibri.img ::3D - mmd -i $(BUILD_DIR)/kolibri.img ::DEMOS - mmd -i $(BUILD_DIR)/kolibri.img ::DEVELOP - mmd -i $(BUILD_DIR)/kolibri.img ::DEVELOP/INFO - mmd -i $(BUILD_DIR)/kolibri.img ::DRIVERS - mmd -i $(BUILD_DIR)/kolibri.img ::File\ Managers - mmd -i $(BUILD_DIR)/kolibri.img ::FONTS - mmd -i $(BUILD_DIR)/kolibri.img ::GAMES - mmd -i $(BUILD_DIR)/kolibri.img ::LIB - mmd -i $(BUILD_DIR)/kolibri.img ::MEDIA - mmd -i $(BUILD_DIR)/kolibri.img ::NETWORK - $(mcopy_all_items) - -# The second goal: LiveCD image. -$(BUILD_DIR)/kolibri.iso: $(BUILD_DIR)/kolibri.img $(mkisofs_extra_targets) - mkisofs -U -J -pad -b kolibri.img -c boot.catalog -hide-joliet boot.catalog -graft-points \ - -A "KolibriOS AutoBuilder" -p "CleverMouse" -publisher "KolibriOS Team" -V "KolibriOS r$(REV)" -sysid "KOLIBRI" \ - -iso-level 3 -o $(BUILD_DIR)/kolibri.iso $(BUILD_DIR)/kolibri.img $(call respace,$(MKISOFS_EXTRA)) 2>&1 - -# Special targets to modify behaviour of make. -.DELETE_ON_ERROR: -.SUFFIXES: # delete all predefined rules - -# The floppy bootsector. -$(BUILD_DIR)/boot_fat12.bin: $(KERNEL)/bootloader/boot_fat12.asm $(KERNEL)/bootloader/floppy1440.inc - fasm $(KERNEL)/bootloader/boot_fat12.asm $(BUILD_DIR)/boot_fat12.bin - -$(BUILD_DIR)/.dir 3d/.dir demos/.dir develop/.dir develop/info/.dir drivers/.dir fonts/.dir \ - games/.dir lib/.dir media/.dir network/.dir allskins/.dir distr_data/.dir .deps/.dir: - mkdir -p $(dir $@) - touch $@ -develop/info/.dir: develop/.dir -File\ Managers/.dir: - mkdir -p "File Managers" - touch "File Managers/.dir" - -# extra dependency for mtldr_install.exe -distr_data/mtldr_install.exe: mtldr_for_installer - -# FASM black magic goes to Makefile.fasm. -include Makefile.fasm - -# Similar for NASM. -include Makefile.nasm - -# Similar for copying files. -include Makefile.copy - -# Special rules for copying sysfuncs.txt - it isn't directly included in the image. -docpack: $(DOCDIR)SYSFUNCS.TXT -$(DOCDIR)SYSFUNCS.TXT: $(KERNEL)/docs/sysfuncs.txt - cp $(KERNEL)/docs/sysfuncs.txt $(DOCDIR)SYSFUNCS.TXT - -# Similar for C--. -include Makefile.cmm - -# Sorry, even black magic seems to be insufficient for -# auto-handling all subtle effects. So we just define -# command lines for compiling and linking, and -# maintain the list of sources and objects by hand. -include Makefile.msvc - -# Rules for table -table: .obj.table/table.exe - $(msvc_final) -TABLE_OBJECTS:=.obj.table/calc.obj .obj.table/func.obj .obj.table/hello.obj \ - .obj.table/KosFile.obj .obj.table/kosSyst.obj .obj.table/math2.obj \ - .obj.table/mcsmemm.obj .obj.table/parser.obj -TABLE_H_FILES:=$(wildcard $(PROGS)/other/table/*.h) -.obj.table/table.exe: $(TABLE_OBJECTS) - $(msvc_link) -$(TABLE_OBJECTS): .obj.table/%.obj: $(PROGS)/other/table/%.cpp $(TABLE_H_FILES) Makefile.msvc | .obj.table - $(msvc_compile) -.obj.table: - mkdir -p .obj.table - -# Rules for graph -graph: .obj.graph/graph.exe - $(msvc_final) -GRAPH_CPP_OBJECTS:=.obj.graph/func.obj .obj.graph/hello.obj .obj.graph/kolibri.obj \ - .obj.graph/KosFile.obj .obj.graph/kosSyst.obj .obj.graph/math2.obj \ - .obj.graph/mcsmemm.obj .obj.graph/parser.obj -GRAPH_C_OBJECTS:=.obj.graph/string.obj -GRAPH_H_FILES:=$(wildcard $(PROGS)/other/graph/*.h) -GRAPH_FASM_OBJECTS:=.obj.graph/memcpy.obj .obj.graph/memset.obj -.obj.graph/graph.exe: $(GRAPH_CPP_OBJECTS) $(GRAPH_C_OBJECTS) $(GRAPH_FASM_OBJECTS) - $(msvc_link) -$(GRAPH_CPP_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.cpp $(GRAPH_H_FILES) Makefile.msvc | .obj.graph - $(msvc_compile) -$(GRAPH_C_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.c $(GRAPH_H_FILES) Makefile.msvc | .obj.graph - $(msvc_compile) -$(GRAPH_FASM_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.asm Makefile.msvc | .obj.graph - fasm $< $@ -.obj.graph: - mkdir -p .obj.graph - -# Rules for kosilka -games/kosilka: .obj.kosilka/kosilka.exe - $(msvc_final) -KOSILKA_OBJECTS:=.obj.kosilka/kosilka.obj .obj.kosilka/KosFile.obj .obj.kosilka/kosSyst.obj .obj.kosilka/mcsmemm.obj -KOSILKA_H_FILES:=$(PROGS)/games/kosilka/*.h -.obj.kosilka/kosilka.exe: $(KOSILKA_OBJECTS) - $(msvc_link) -$(KOSILKA_OBJECTS): .obj.kosilka/%.obj: $(PROGS)/games/kosilka/%.cpp $(KOSILKA_H_FILES) Makefile.msvc | .obj.kosilka - $(msvc_compile) -.obj.kosilka: - mkdir -p .obj.kosilka - -include Makefile.gcc - -# Rules for shell -shell: .obj.shell/start.o .obj.shell/shell.o .obj.shell/kolibri.o .obj.shell/stdlib.o .obj.shell/string.o .obj.shell/ctype.o \ - $(PROGS)/system/shell/kolibri.ld - $(call gcc_link,$(PROGS)/system/shell/kolibri.ld) -.obj.shell/shell.o: $(PROGS)/system/shell/shell.c \ - $(PROGS)/system/shell/all.h \ - $(PROGS)/system/shell/system/*.h \ - $(PROGS)/system/shell/cmd/*.c \ - $(PROGS)/system/shell/modules/*.c \ - $(PROGS)/system/shell/locale/rus/globals.h \ - Makefile.gcc | .obj.shell - $(gcc_compile) -.obj.shell/kolibri.o .obj.shell/stdlib.o .obj.shell/string.o .obj.shell/ctype.o: .obj.shell/%.o: \ - $(PROGS)/system/shell/system/%.c $(PROGS)/system/shell/system/*.h \ - Makefile.gcc | .obj.shell - $(gcc_compile) - win32-gcc -c -Os -o $@ $< -.obj.shell/start.o: $(PROGS)/system/shell/start.asm | .obj.shell - fasm $< $@ -.obj.shell: - mkdir -p .obj.shell - -# Rules for e80 -E80DIR=$(PROGS)/emulator/e80/trunk -e80: .obj.e80/start.o .obj.e80/kolibri.o .obj.e80/stdlib.o .obj.e80/string.o .obj.e80/z80.o .obj.e80/e80.o - $(call gcc_link,$(E80DIR)/kolibri.ld) -.obj.e80/e80.o: $(E80DIR)/e80.c $(E80DIR)/48.h \ - $(E80DIR)/system/*.h $(E80DIR)/system/msgbox.c \ - $(E80DIR)/z80/z80.h Makefile.gcc | .obj.e80 - $(gcc_compile) -.obj.e80/kolibri.o .obj.e80/stdlib.o .obj.e80/string.o: .obj.e80/%.o: \ - $(E80DIR)/system/%.c $(E80DIR)/system/*.h Makefile.gcc | .obj.e80 - $(gcc_compile) -.obj.e80/z80.o: $(E80DIR)/z80/z80.c $(E80DIR)/z80/* - $(gcc_compile) -.obj.e80/start.o: $(E80DIR)/asm_code.asm | .obj.e80 - fasm $< $@ -.obj.e80: - mkdir -p .obj.e80 - -# Rules for sdk/sound, used by media/ac97snd -SOUNDDIR=$(PROGS)/develop/sdk/trunk/sound/src -SOUND_OBJECTS:=$(patsubst $(SOUNDDIR)/%.asm,.sdk/%.obj,$(wildcard $(SOUNDDIR)/*.asm)) -SOUND_INC_FILES:=$(wildcard $(SOUNDDIR)/*.inc) -.sdk/sound.lib: $(SOUND_OBJECTS) - win32-link /lib /out:$@ $^ -$(SOUND_OBJECTS): .sdk/%.obj: $(SOUNDDIR)/%.asm $(SOUND_INC_FILES) | .sdk - fasm $< $@ -.sdk: - mkdir -p .sdk -# Rules for media/ac97snd -AC97DIR=$(PROGS)/media/ac97snd -media/ac97snd: .obj.ac97snd/ac97snd.exe - $(msvc_final) -.obj.ac97snd/ac97snd.exe: .obj.ac97snd/ac97wav.obj .obj.ac97snd/crt.obj .obj.ac97snd/k_lib.obj \ - .obj.ac97snd/mpg.lib .sdk/sound.lib .obj.ac97snd/ufmod.obj - $(msvc_link) -.obj.ac97snd/ac97wav.obj: $(AC97DIR)/ac97snd/ac97wav.c \ - $(AC97DIR)/kolibri.h $(AC97DIR)/ac97snd/ac97wav.h $(AC97DIR)/mpg/mpg123.h \ - $(AC97DIR)/sound.h $(AC97DIR)/ufmod-codec.h Makefile.msvc | .obj.ac97snd - $(msvc_compile) -.obj.ac97snd/crt.obj: $(AC97DIR)/ac97snd/crt.c $(AC97DIR)/ac97snd/crt.h Makefile.msvc | .obj.ac97snd - $(msvc_compile) -.obj.ac97snd/k_lib.obj: $(AC97DIR)/ac97snd/k_lib.asm $(AC97DIR)/ac97snd/proc32.inc | .obj.ac97snd - fasm $< $@ -.obj.ac97snd/ufmod.obj: $(AC97DIR)/ufmod-config.asm | .obj.ac97snd - fasm $< $@ -s .deps/ac97snd-ufmod.fas - prepsrc .deps/ac97snd-ufmod.fas /dev/stdout | \ - perl -n -e 's|\\|/|g;s| |\\ |g;push @a,$$1 if/^;include\\ \x27(.*?)\x27/;' \ - -e 'END{$$a=join " \\\n ",@a;print "$@: $$a\n$$a:\n"}' > .deps/ac97snd-ufmod.Po --include .deps/ac97snd-ufmod.Po -AC97SND_MPG_C_FILES:=$(wildcard $(AC97DIR)/mpg/*.c) -AC97SND_MPG_H_FILES:=$(wildcard $(AC97DIR)/mpg/*.h) -AC97SND_MPG_C_OBJECTS:=$(patsubst $(AC97DIR)/mpg/%.c,.obj.ac97snd/%.o,$(AC97SND_MPG_C_FILES)) -.obj.ac97snd/mpg.lib: $(AC97SND_MPG_C_OBJECTS) .obj.ac97snd/pow.obj - win32-link /lib /ltcg /out:$@ $^ -$(AC97SND_MPG_C_OBJECTS): .obj.ac97snd/%.o: $(AC97DIR)/mpg/%.c $(AC97SND_MPG_H_FILES) Makefile.msvc | .obj.ac97snd - $(msvc_compile) -.obj.ac97snd/pow.obj: $(AC97DIR)/mpg/pow.asm $(AC97DIR)/mpg/proc32.inc | .obj.ac97snd - fasm $< $@ -.obj.ac97snd: - mkdir -p .obj.ac97snd - -# Rules for atikms.dll -# Use Makefile from $(REPOSITORY)/drivers/ddk and $(REPOSITORY)/drivers/video/drm/radeon -# However, dependencies must be duplicated - I don't know how to avoid this -# without need to rebuild kolibri.img at every iteration... -# Note that we are going to write in the directory shared -# between all Makefiles, so we need locked operations. -drivers/atikms.dll: $(REPOSITORY)/drivers/video/drm/radeon/atikms.dll drivers/.dir - kpack --nologo $< $@ -$(REPOSITORY)/drivers/video/drm/radeon/atikms.dll: $(REPOSITORY)/drivers/video/drm/radeon/Makefile.lto - flock $(REPOSITORY)/drivers/video/drm/radeon/.lock \ - $(MAKE) CC=win32-gcc45 AS=win32-as LD=win32-ld AR=win32-ar FASM=fasm -C $(REPOSITORY)/drivers/video/drm/radeon -f Makefile.lto -$(REPOSITORY)/drivers/ddk/libddk.a: $(REPOSITORY)/drivers/ddk/Makefile - flock $(REPOSITORY)/drivers/ddk/.lock \ - $(MAKE) CC=win32-gcc45 AS=win32-as LD=win32-ld AR=win32-ar FASM=fasm -C $(REPOSITORY)/drivers/ddk libddk.a -$(REPOSITORY)/drivers/ddk/libcore.a: $(REPOSITORY)/drivers/ddk/Makefile - flock $(REPOSITORY)/drivers/ddk/.lock \ - $(MAKE) CC=win32-gcc45 AS=win32-as LD=win32-ld AR=win32-ar FASM=fasm -C $(REPOSITORY)/drivers/ddk libcore.a -# dependencies -$(REPOSITORY)/drivers/video/drm/radeon/atikms.dll: \ - $(REPOSITORY)/drivers/video/drm/radeon/atikms.lds \ - $(REPOSITORY)/drivers/ddk/libddk.a \ - $(REPOSITORY)/drivers/ddk/libcore.a \ - $(REPOSITORY)/drivers/video/drm/radeon/*.[Sch] \ - $(REPOSITORY)/drivers/video/drm/radeon/*.asm \ - $(REPOSITORY)/drivers/video/drm/radeon/Makefile \ - $(REPOSITORY)/drivers/video/drm/radeon/firmware/*.bin \ - $(REPOSITORY)/drivers/include/*.h \ - $(REPOSITORY)/drivers/include/*/*.h \ - $(REPOSITORY)/drivers/include/*/*/*.h \ - $(REPOSITORY)/drivers/include/*/*/*/*.h -$(REPOSITORY)/drivers/ddk/libddk.a: \ - $(REPOSITORY)/drivers/ddk/*/* \ - $(REPOSITORY)/drivers/include/*.h \ - $(REPOSITORY)/drivers/include/*/*.h \ - $(REPOSITORY)/drivers/include/*/*/*.h \ - $(REPOSITORY)/drivers/include/*/*/*/*.h -$(REPOSITORY)/drivers/ddk/libcore.a: \ - $(REPOSITORY)/drivers/ddk/core.S +# General rule for naming: variables with CAPITALIZED names hold settings, +# you can - and are expected - to modify it; variables with lowercase names +# are intermediate variables and macroses not to be modified unless you +# know what you're doing. + +# Define directories for destination, source repository, sources of kernel, sources of programs. +BUILD_DIR:=build +REPOSITORY:=../.. +KERNEL:=$(REPOSITORY)/kernel/trunk +PROGS:=$(REPOSITORY)/programs + +# The main goal: build kolibri.img and kolibri.iso +all: $(BUILD_DIR)/kolibri.img $(BUILD_DIR)/kolibri.iso + +# Docpak requires some documents; we place them +# into 'docs' subdir and communicate with FASM +# through environment var DOCDIR. +DOCDIR:=docs/ +export DOCDIR + +# Because most programs are written in FASM and have +# the common structure of one main .asm file possibly including +# several .inc files, we handle this case separately. +# Namely, we organize one big list of such programs +# (FASM_PROGRAMS, see below) containing name of local binary file, +# name of file inside kolibri.img and name of the source file. +# This list is maintained by hand, and the rest is done with some macroses... +# well, slightly complicated macroses - however, you do not need to +# understand them in order to maintain the list. +# To add a FASM program with one .asm file, just +# add the corresponding item to the list and enjoy +# the power of GNU make. + +# The list of all FASM programs with one main FASM file. +# Every item consists of three parts, separated by ':'. +# First part is the real name of binary file in $(BUILD_DIR) +# as it should be produced by make. +# Second part is the name of a file inside kolibri.img, +# usually uppercased version of first part - to save space +# for FAT filesystem. +# Third part is the name of the source file. +# Spaces separate items, so spaces in names should be +# represented as '|'. +FASM_PROGRAMS:=\ + @clip:@CLIP:$(PROGS)/system/clip/trunk/@clip.ASM \ + @menu:@MENU:$(PROGS)/system/menu/trunk/menu.asm \ + @notify:@NOTIFY:$(PROGS)/system/notify/trunk/@notify.asm \ + @panel:@PANEL:$(PROGS)/system/panel/trunk/@PANEL.ASM \ + @rb:@RB:$(PROGS)/system/rb/trunk/@RB.ASM \ + @ss:@SS:$(PROGS)/system/ss/trunk/@ss.asm\ + refrscrn:REFRSCRN:$(PROGS)/system/refrscrn/refrscrn.asm \ + asciivju:ASCIIVJU:$(PROGS)/develop/asciivju/trunk/asciivju.asm \ + calc:CALC:$(PROGS)/other/calc/trunk/calc.asm \ + calendar:CALENDAR:$(PROGS)/system/calendar/trunk/calendar.asm \ + commouse:COMMOUSE:$(PROGS)/system/commouse/trunk/commouse.asm \ + cpu:CPU:$(PROGS)/system/cpu/trunk/cpu.asm \ + cpuid:CPUID:$(PROGS)/system/cpuid/trunk/CPUID.ASM \ + desktop:DESKTOP:$(PROGS)/system/desktop/trunk/desktop.asm \ + disptest:DISPTEST:$(PROGS)/system/disptest/trunk/disptest.ASM \ + docpack:DOCPACK:$(PROGS)/system/docpack/trunk/docpack.asm \ + end:END:$(PROGS)/system/end/light/end.asm \ + gmon:GMON:$(PROGS)/system/gmon/gmon.asm \ + hdd_info:HDD_INFO:$(PROGS)/system/hdd_info/trunk/hdd_info.asm \ + icon:ICON:$(PROGS)/system/icon/trunk/icon.asm \ + cropflat:CROPFLAT:$(PROGS)/system/cropflat/cropflat.asm \ + kbd:KBD:$(PROGS)/system/kbd/trunk/kbd.ASM \ + kpack:KPACK:$(PROGS)/other/kpack/trunk/kpack.asm \ + launcher:LAUNCHER:$(PROGS)/system/launcher/trunk/launcher.asm \ + magnify:MAGNIFY:$(PROGS)/demos/magnify/trunk/magnify.asm \ + mgb:MGB:$(PROGS)/system/mgb/trunk/mgb.asm \ + mousemul:MOUSEMUL:$(PROGS)/system/mousemul/trunk/mousemul.asm \ + madmouse:MADMOUSE:$(PROGS)/other/madmouse/madmouse.asm \ + mykey:MYKEY:$(PROGS)/system/MyKey/trunk/MyKey.asm \ + pcidev:PCIDEV:$(PROGS)/system/pcidev/trunk/PCIDEV.ASM \ + pic4:PIC4:$(PROGS)/media/pic4/trunk/pic4.asm \ + rdsave:RDSAVE:$(PROGS)/system/rdsave/trunk/rdsave.asm \ + rtfread:RTFREAD:$(PROGS)/other/rtfread/trunk/rtfread.asm \ + run:RUN:$(PROGS)/system/run/trunk/run.asm \ + scrshoot:SCRSHOOT:$(PROGS)/media/scrshoot/scrshoot.asm \ + setup:SETUP:$(PROGS)/system/setup/trunk/setup.asm \ + test:TEST:$(PROGS)/system/test/trunk/test.asm \ + tinypad:TINYPAD:$(PROGS)/develop/tinypad/trunk/tinypad.asm \ + zkey:ZKEY:$(PROGS)/system/zkey/trunk/ZKEY.ASM \ + 3d/3dcube2:3D/3DCUBE2:$(PROGS)/demos/3dcube2/trunk/3DCUBE2.ASM \ + 3d/3dsheart:3D/3DSHEART:$(PROGS)/demos/3dsheart/trunk/3dsheart.asm \ + 3d/3dwav:3D/3DWAV:$(PROGS)/demos/3dwav/trunk/3dwav.asm \ + 3d/crownscr:3D/CROWNSCR:$(PROGS)/demos/crownscr/trunk/crownscr.asm \ + 3d/flatwav:3D/FLATWAV:$(PROGS)/demos/flatwav/trunk/FLATWAV.ASM \ + 3d/free3d04:3D/FREE3D04:$(PROGS)/demos/free3d04/trunk/free3d04.asm \ + 3d/view3ds:3D/VIEW3DS:$(PROGS)/demos/3DS/VIEW3DS.ASM \ + demos/bcdclk:DEMOS/BCDCLK:$(PROGS)/demos/bcdclk/trunk/bcdclk.asm \ + demos/circle:DEMOS/CIRCLE:$(PROGS)/develop/examples/circle/trunk/circle.asm \ + demos/colorref:DEMOS/COLORREF:$(PROGS)/demos/colorref/trunk/colorref.asm \ + demos/cslide:DEMOS/CSLIDE:$(PROGS)/demos/cslide/trunk/cslide.asm \ + demos/eyes:DEMOS/EYES:$(PROGS)/demos/eyes/trunk/eyes.asm \ + demos/fire:DEMOS/FIRE:$(PROGS)/demos/fire/trunk/fire.asm \ + demos/firework:DEMOS/FIREWORK:$(PROGS)/demos/firework/trunk/firework.asm \ + demos/movback:DEMOS/MOVBACK:$(PROGS)/demos/movback/trunk/movback.asm \ + demos/plasma:DEMOS/PLASMA:$(PROGS)/demos/plasma/trunk/plasma.asm \ + demos/timer:DEMOS/TIMER:$(PROGS)/demos/timer/trunk/timer.asm \ + demos/tinyfrac:DEMOS/TINYFRAC:$(PROGS)/demos/tinyfrac/trunk/tinyfrac.asm \ + demos/trantest:DEMOS/TRANTEST:$(PROGS)/demos/trantest/trunk/trantest.asm \ + demos/tube:DEMOS/TUBE:$(PROGS)/demos/tube/trunk/tube.asm \ + demos/unvwater:DEMOS/UNVWATER:$(PROGS)/demos/unvwater/trunk/unvwater.asm \ + demos/web:DEMOS/WEB:$(PROGS)/demos/web/trunk/web.asm \ + develop/board:DEVELOP/BOARD:$(PROGS)/system/board/trunk/board.asm \ + develop/cObj:DEVELOP/cObj:$(PROGS)/develop/cObj/trunk/cObj.asm \ + develop/fasm:DEVELOP/FASM:$(PROGS)/develop/fasm/trunk/fasm.asm \ + develop/h2d2b:DEVELOP/H2D2B:$(PROGS)/develop/h2d2b/trunk/h2d2b.asm \ + develop/heed:DEVELOP/HEED:$(PROGS)/develop/heed/trunk/heed.asm \ + develop/ipc:DEVELOP/IPC:$(PROGS)/network/ipc/trunk/ipc.asm \ + develop/keyascii:DEVELOP/KEYASCII:$(PROGS)/develop/keyascii/trunk/keyascii.asm \ + develop/mtdbg:DEVELOP/MTDBG:$(PROGS)/develop/mtdbg/mtdbg.asm \ + develop/scancode:DEVELOP/SCANCODE:$(PROGS)/develop/scancode/trunk/scancode.asm \ + develop/t_edit:DEVELOP/T_EDIT:$(PROGS)/other/t_edit/t_edit.asm \ + develop/test_gets:DEVELOP/test_gets:$(PROGS)/develop/libraries/console/examples/test_gets.asm \ + develop/testcon2:DEVELOP/TESTCON2:$(PROGS)/develop/libraries/console/examples/testcon2.asm \ + develop/thread:DEVELOP/THREAD:$(PROGS)/develop/examples/thread/trunk/thread.asm \ + develop/info/asm.syn:DEVELOP/INFO/ASM.SYN:$(PROGS)/other/t_edit/info/asm_syn.asm \ + develop/info/cpp_kol_cla.syn:DEVELOP/INFO/CPP_KOL_CLA.SYN:$(PROGS)/other/t_edit/info/cpp_kol_cla_syn.asm \ + develop/info/cpp_kol_dar.syn:DEVELOP/INFO/CPP_KOL_DAR.SYN:$(PROGS)/other/t_edit/info/cpp_kol_dar_syn.asm \ + develop/info/cpp_kol_def.syn:DEVELOP/INFO/CPP_KOL_DEF.SYN:$(PROGS)/other/t_edit/info/cpp_kol_def_syn.asm \ + develop/info/default.syn:DEVELOP/INFO/DEFAULT.SYN:$(PROGS)/other/t_edit/info/default_syn.asm \ + develop/info/html.syn:DEVELOP/INFO/HTML.SYN:$(PROGS)/other/t_edit/info/html_syn.asm \ + develop/info/ini_files.syn:DEVELOP/INFO/INI_FILES.SYN:$(PROGS)/other/t_edit/info/ini_files_syn.asm \ + develop/info/win_const.syn:DEVELOP/INFO/WIN_CONST.SYN:$(PROGS)/other/t_edit/info/win_const_syn.asm \ + drivers/com_mouse.obj:DRIVERS/COM_MOUSE.OBJ:$(KERNEL)/drivers/com_mouse.asm \ + drivers/emu10k1x.obj:DRIVERS/EMU10K1X.OBJ:$(KERNEL)/drivers/emu10k1x.asm \ + drivers/fm801.obj:DRIVERS/FM801.OBJ:$(KERNEL)/drivers/fm801.asm \ + drivers/infinity.obj:DRIVERS/INFINITY.OBJ:$(KERNEL)/drivers/infinity.asm \ + drivers/ps2mouse.obj:DRIVERS/PS2MOUSE.OBJ:$(REPOSITORY)/drivers/mouse/ps2mouse4d/trunk/ps2mouse.asm \ + drivers/sb16.obj:DRIVERS/SB16.OBJ:$(KERNEL)/drivers/sb16/sb16.asm \ + drivers/sound.obj:DRIVERS/SOUND.OBJ:$(KERNEL)/drivers/sound.asm \ + drivers/vt8235.obj:DRIVERS/VT8235.OBJ:$(KERNEL)/drivers/vt823x.asm \ + File|Managers/kfar:File|Managers/KFAR:$(PROGS)/fs/kfar/trunk/kfar.asm \ + File|Managers/kfm:File|Managers/KFM:$(PROGS)/fs/kfm/trunk/kfm.asm \ + File|Managers/opendial:File|Managers/OPENDIAL:$(PROGS)/fs/opendial/opendial.asm \ + games/15:GAMES/15:$(PROGS)/games/15/trunk/15.ASM \ + games/arcanii:GAMES/ARCANII:$(PROGS)/games/arcanii/trunk/arcanii.asm \ + games/freecell:GAMES/FREECELL:$(PROGS)/games/freecell/freecell.asm \ + games/gomoku:GAMES/GOMOKU:$(PROGS)/games/gomoku/trunk/gomoku.asm \ + games/invaders:GAMES/INVADERS:$(PROGS)/games/invaders/invaders.asm \ + games/klavisha:GAMES/KLAVISHA:$(PROGS)/games/klavisha/trunk/klavisha.asm \ + games/lines:GAMES/LINES:$(PROGS)/games/lines/lines.asm \ + games/mblocks:GAMES/MBLOCKS:$(PROGS)/games/mblocks/trunk/mblocks.asm \ + games/msquare:GAMES/MSQUARE:$(PROGS)/games/MSquare/trunk/MSquare.asm \ + games/phenix:GAMES/PHENIX:$(PROGS)/games/phenix/trunk/phenix.asm \ + games/pipes:GAMES/PIPES:$(PROGS)/games/pipes/pipes.asm \ + games/pong:GAMES/PONG:$(PROGS)/games/pong/trunk/pong.asm \ + games/pong3:GAMES/PONG3:$(PROGS)/games/pong3/trunk/pong3.asm \ + games/rsquare:GAMES/RSQUARE:$(PROGS)/games/rsquare/trunk/rsquare.asm \ + games/soko:GAMES/SOKO:$(PROGS)/games/soko/trunk/SOKO.ASM \ + games/snake:GAMES/SNAKE:$(PROGS)/games/snake/trunk/snake.asm \ + games/sq_game:GAMES/SQ_GAME:$(PROGS)/games/sq_game/trunk/SQ_GAME.ASM \ + games/sudoku:GAMES/SUDOKU:$(PROGS)/games/sudoku/trunk/sudoku.asm \ + games/sw:GAMES/SW:$(PROGS)/games/sw/trunk/sw.asm \ + games/tanks:GAMES/TANKS:$(PROGS)/games/tanks/trunk/tanks.asm \ + games/tetris:GAMES/TETRIS:$(PROGS)/games/tetris/trunk/tetris.asm \ + lib/archiver.obj:LIB/ARCHIVER.OBJ:$(PROGS)/fs/kfar/trunk/kfar_arc/kfar_arc.asm \ + lib/box_lib.obj:LIB/BOX_LIB.OBJ:$(PROGS)/develop/libraries/box_lib/trunk/box_lib.asm \ + lib/console.obj:LIB/CONSOLE.OBJ:$(PROGS)/develop/libraries/console/console.asm \ + lib/libgfx.obj:LIB/LIBGFX.OBJ:$(PROGS)/develop/libraries/libs-dev/libgfx/libgfx.asm \ + lib/libimg.obj:LIB/LIBIMG.OBJ:$(PROGS)/develop/libraries/libs-dev/libimg/libimg.asm \ + lib/libini.obj:LIB/LIBINI.OBJ:$(PROGS)/develop/libraries/libs-dev/libini/libini.asm \ + lib/libio.obj:LIB/LIBIO.OBJ:$(PROGS)/develop/libraries/libs-dev/libio/libio.asm \ + lib/network.obj:LIB/NETWORK.OBJ:$(PROGS)/develop/libraries/network/network.asm \ + lib/proc_lib.obj:LIB/PROC_LIB.OBJ:$(PROGS)/develop/libraries/proc_lib/trunk/proc_lib.asm \ + lib/cnv_png.obj:LIB/CNV_PNG.OBJ:$(PROGS)/media/zsea/plugins/png/cnv_png.asm \ + media/animage:MEDIA/ANIMAGE:$(PROGS)/media/animage/trunk/animage.asm \ + media/cdp:MEDIA/CDP:$(PROGS)/media/cdp/trunk/cdp.asm \ + media/kiv:MEDIA/KIV:$(PROGS)/media/kiv/trunk/kiv.asm \ + media/listplay:MEDIA/LISTPLAY:$(PROGS)/media/listplay/trunk/listplay.asm \ + media/midamp:MEDIA/MIDAMP:$(PROGS)/media/midamp/trunk/midamp.asm \ + media/startmus:MEDIA/STARTMUS:$(PROGS)/media/startmus/trunk/STARTMUS.ASM \ + network/airc:NETWORK/AIRC:$(PROGS)/network/airc/trunk/airc.asm \ + network/arpstat:NETWORK/ARPSTAT:$(PROGS)/network/arpstat/trunk/arpstat.asm \ + network/chess:NETWORK/CHESS:$(PROGS)/network/chess/trunk/chess.asm \ + network/downloader:NETWORK/DOWNLOADER:$(PROGS)/network/downloader/trunk/downloader.asm \ + network/ethstat:NETWORK/ETHSTAT:$(PROGS)/network/ethstat/trunk/ethstat.asm \ + network/ftps:NETWORK/FTPS:$(PROGS)/network/ftps/trunk/FTPS.ASM \ + network/https:NETWORK/HTTPS:$(PROGS)/network/https/trunk/https.asm \ + network/nntpc:NETWORK/NNTPC:$(PROGS)/network/nntpc/trunk/nntpc.asm \ + network/nslookup:NETWORK/NSLOOKUP:$(PROGS)/develop/libraries/network/examples/nslookup.asm \ + network/popc:NETWORK/POPC:$(PROGS)/network/popc/trunk/popc.asm \ + network/smtps:NETWORK/SMTPS:$(PROGS)/network/smtps/trunk/smtps.asm \ + network/stackcfg:NETWORK/STACKCFG:$(PROGS)/network/stackcfg/trunk/stackcfg.asm \ + network/telnet:NETWORK/TELNET:$(PROGS)/network/telnet/trunk/telnet.asm \ + network/tftpc:NETWORK/TFTPC:$(PROGS)/network/tftpc/trunk/tftpc.asm \ + network/VNCclient:NETWORK/VNCclient:$(PROGS)/network/VNCclient/VNCclient.asm \ + network/ym:NETWORK/YM:$(PROGS)/network/ym/trunk/ym.asm \ + network/zeroconf:NETWORK/ZEROCONF:$(PROGS)/network/zeroconf/trunk/zeroconf.asm \ +# end of list +# The list of all FASM programs with one main FASM file for CD image. +# Format of an item is exactly the same as in the previous list. +FASM_PROGRAMS_CD:=\ + drivers/atikms:DRIVERS/ATIKMS:$(REPOSITORY)/drivers/video/drm/radeon/atikms.asm \ +# end of list + +# The list of all FASM programs which needs to be compiled without KPACKing. +FASM_NOKPACK_PROGRAMS:=\ + distr_data/9x2klbr.exe:-:$(PROGS)/hd_load/9x2klbr/9x2klbr.asm \ + distr_data/MeOSload.com:-:$(PROGS)/hd_load/meosload/MeOSload.asm \ + distr_data/mtldr:-:$(PROGS)/hd_load/mtldr/mtldr.asm \ + mtldr_for_installer:-:$(PROGS)/hd_load/mtldr_install/mtldr_code/mtldr.asm \ + distr_data/mtldr_install.exe:-:$(PROGS)/hd_load/mtldr_install/mtldr_install.asm \ + distr_data/MeOSload_for_usb_boot_old.com:-:$(PROGS)/hd_load/usb_boot_old/MeOSload.asm \ + distr_data/enable_for_usb_boot_old.exe:-:$(PROGS)/hd_load/usb_boot_old/enable.asm \ + distr_data/BOOT_F32.BIN:-:$(PROGS)/hd_load/usb_boot/BOOT_F32.ASM \ + distr_data/MTLD_F32:-:$(PROGS)/hd_load/usb_boot/mtldr.asm \ + distr_data/inst.exe:-:$(PROGS)/hd_load/usb_boot/inst.asm \ + distr_data/setmbr.exe:-:$(PROGS)/hd_load/usb_boot/setmbr.asm \ +#end of list + +# The list of all NASM programs with one main NASM file. +# Format of an item is exactly the same as in the previous list. +NASM_PROGRAMS:=\ + demos/aclock:DEMOS/ACLOCK:$(PROGS)/demos/aclock/trunk/aclock.asm \ + games/c4:GAMES/C4:$(PROGS)/games/c4/trunk/c4.asm \ +# end of list + +# The list of files which should be copied from somewhere. +# Format of an item is exactly the same as in the previous list. +COPY_FILES:=\ + macros.inc:MACROS.INC:$(PROGS)/macros.inc \ + config.inc:CONFIG.INC:$(PROGS)/config.inc \ + struct.inc:STRUCT.INC:$(PROGS)/struct.inc \ + develop/te_icon.png:DEVELOP/TE_ICON.PNG:$(PROGS)/other/t_edit/te_icon.png \ + develop/tl_nod_16.png:DEVELOP/TL_NOD_16.PNG:$(PROGS)/other/t_edit/tl_nod_16.png \ + develop/tl_sys_16.png:DEVELOP/TL_SYS_16.PNG:$(PROGS)/media/log_el/trunk/tl_sys_16.png \ + develop/t_edit.ini:DEVELOP/T_EDIT.INI:$(PROGS)/other/t_edit/t_edit.ini \ + File|Managers/z_icons.png:File|Managers/Z_ICONS.PNG:$(PROGS)/fs/opendial/z_icons.png \ + File|Managers/kfm_keys.txt:File|Managers/KFM_KEYS.TXT:$(PROGS)/fs/kfm/trunk/docs/english/kfm_keys.txt \ + File|Managers/buttons.bmp:File|Managers/BUTTONS.BMP:$(PROGS)/fs/kfm/trunk/buttons.bmp \ + File|Managers/icons.bmp:File|Managers/ICONS.BMP:$(PROGS)/fs/kfm/trunk/icons.bmp \ + fonts/litt.chr:FONTS/LITT.CHR:$(PROGS)/demos/bgitest/trunk/FONTS/LITT.CHR \ + games/snake.ini:GAMES/SNAKE.INI:$(PROGS)/games/snake/trunk/snake.ini \ + games/skin.raw:GAMES/SKIN.RAW:$(PROGS)/games/soko/trunk/SKIN.RAW \ + games/soko-4.lev:GAMES/SOKO-4.LEV:$(PROGS)/games/soko/trunk/SOKO-4.LEV \ + games/soko-5.lev:GAMES/SOKO-5.LEV:$(PROGS)/games/soko/trunk/SOKO-5.LEV \ + games/soko-6.lev:GAMES/SOKO-6.LEV:$(PROGS)/games/soko/trunk/SOKO-6.LEV \ + games/soko-7.lev:GAMES/SOKO-7.LEV:$(PROGS)/games/soko/trunk/SOKO-7.LEV \ + games/soko-8.lev:GAMES/SOKO-8.LEV:$(PROGS)/games/soko/trunk/SOKO-8.LEV \ + games/soko-9.lev:GAMES/SOKO-9.LEV:$(PROGS)/games/soko/trunk/SOKO-9.LEV \ + media/kiv.ini:MEDIA/KIV.INI:$(PROGS)/media/kiv/trunk/kiv.ini \ + .shell:.shell:$(PROGS)/system/shell/bin/eng/.shell \ + mykey.ini:MYKEY.INI:$(PROGS)/system/MyKey/trunk/mykey.ini \ +# end of list + +# The list of all C-- programs with one main C-- file. +# Format of an item is exactly the same as in the previous list, +# except that there can be fourth field with parameters for a compiler. +CMM_PROGRAMS:=\ + File|Managers/Eolite:File|Managers/EOLITE:$(PROGS)/fs/Eolite/trunk/Eolite.c-- \ + games/clicks:GAMES/CLICKS:$(PROGS)/games/clicks/trunk/clicks.c \ + games/FindNumbers:GAMES/FindNumbers:$(PROGS)/games/FindNumbers/trunk/FindNumbers.c-- \ + games/flood-it:GAMES/flood-it:$(PROGS)/games/flood-it/trunk/flood-it.c \ + games/mine:GAMES/MINE:$(PROGS)/games/mine/trunk/mine.c--:/MEOS \ + HTMLv:HTMLv:$(PROGS)/network/htmlv/browser/HTMLv.c \ +#develop/c--:DEVELOP/C--:$(PROGS)/develop/c--/trunk/32.c-- \ +# end of list + +# List of other files to be included in the image file. +# Some of them are auto-built with special rules, some just exist before build. +# Each item is of the form :. +# Spaces should be represented as |. +OTHER_FILES:=autorun.dat:AUTORUN.DAT \ + background.gif:background.gif default.skn:DEFAULT.SKN \ + e80:E80 graph:GRAPH hdread:HDREAD \ + icons.dat:ICONS.DAT iconstrp.png:ICONSTRP.PNG index_htm:INDEX.HTM \ + kernel.mnt:KERNEL.MNT kerpack:KERPACK keymap.key:KEYMAP.KEY \ + kuzkina.mid:KUZKINA.MID lang.inc:LANG.INC lang.ini:LANG.INI \ + menu.dat:MENU.DAT \ + panel.ini:PANEL.INI setup.dat:SETUP.DAT \ + shell:SHELL table:TABLE \ + vmode:VMODE 3d/3dsheart:3D/3DSHEART \ + 3d/cubeline:3D/CUBELINE 3d/gears:3D/GEARS 3d/house.3ds:3D/HOUSE.3DS \ + demos/ak47.lif:DEMOS/AK47.LIF \ + demos/barge.lif:DEMOS/BARGE.LIF demos/life2:DEMOS/LIFE2 \ + demos/relay.lif:DEMOS/RELAY.LIF demos/rpento.lif:DEMOS/RPENTO.LIF \ + demos/use_mb:DEMOS/USE_MB \ + File|Managers/eolite.ini:File|Managers/EOLITE.INI \ + File|Managers/icons.ini:File|Managers/ICONS.INI \ + File|Managers/kfar.ini:File|Managers/KFAR.INI \ + File|Managers/kfm.ini:File|Managers/KFM.INI \ + games/checkers:GAMES/CHECKERS \ + games/kosilka:GAMES/KOSILKA games/kosskin.gfx:GAMES/KOSSKIN.GFX \ + games/reversi:GAMES/REVERSI games/rforces:GAMES/RFORCES \ + games/xonix:GAMES/XONIX games/megamaze:GAMES/MEGAMAZE \ + lib/msgbox.obj:LIB/MSGBOX.OBJ \ + lib/pixlib.obj:LIB/PIXLIB.OBJ lib/sort.obj:LIB/SORT.OBJ \ + drivers/intel_hda.obj:DRIVERS/intel_hda.obj \ + media/ac97snd:MEDIA/AC97SND \ + network/jmail:NETWORK/JMAIL network/zeroconf.ini:NETWORK/ZEROCONF.INI \ +#end of list +#3d/logio.bmp:3D/LOGIO.BMP 3d/cubetext:3D/CUBETEXT + +# Generate skins list understandable by gnu make +Makefile.skins: $(REPOSITORY)/skins/authors.txt $(REPOSITORY)/data/generate_makefile_skins.sh + cut -f1 $< | $(SHELL) $(REPOSITORY)/data/generate_makefile_skins.sh > $@ +include Makefile.skins + +# Extra targets for LiveCD image in the syntax of mkisofs +MKISOFS_EXTRA:=\ + dosbox/=$(PROGS)/emulator/DosBox/dosbox \ + dosbox/=$(PROGS)/emulator/DosBox/dosbox.conf \ + dosbox/=$(PROGS)/emulator/DosBox/readme.txt \ + /=drivers/atikms \ + /=drivers/atikms.dll \ + /=distr_data/autorun.inf \ + /=distr_data/KolibriOS_icon.ico \ + /=distr_data/readme.txt \ + Skins/=$(REPOSITORY)/skins/authors.txt \ + Docs/config.txt=docs/CONFIG.TXT \ + Docs/copying.txt=docs/COPYING.TXT \ + Docs/hot_keys.txt=docs/HOT_KEYS.TXT \ + Docs/install.txt=docs/INSTALL.TXT \ + Docs/readme.txt=docs/README.TXT \ + Docs/stack.txt=docs/STACK.TXT \ + Docs/sysfuncs.txt=docs/SYSFUNCS.TXT \ + HD_Load/9x2klbr/=distr_data/9x2klbr.exe \ + HD_Load/9x2klbr/=../common/HD_load/9x2klbr/LDKLBR.VXD \ + HD_Load/9x2klbr/=$(PROGS)/hd_load/9x2klbr/readme.txt \ + HD_Load/MeOSLoad/=distr_data/MeOSload.com \ + HD_Load/MeOSLoad/=$(PROGS)/hd_load/meosload/AUTOEXEC.BAT \ + HD_Load/MeOSLoad/=$(PROGS)/hd_load/meosload/CONFIG.SYS \ + HD_Load/MeOSLoad/=$(PROGS)/hd_load/meosload/L_readme.txt \ + HD_Load/MeOSLoad/=$(PROGS)/hd_load/meosload/L_readme_Win.txt \ + HD_Load/mtldr/=distr_data/mtldr \ + HD_Load/mtldr/install.txt=$(PROGS)/hd_load/mtldr/install_eng.txt \ + HD_Load/mtldr/=$(PROGS)/hd_load/mtldr/vista_install.bat \ + HD_Load/mtldr/=$(PROGS)/hd_load/mtldr/vista_remove.bat \ + HD_Load/=distr_data/mtldr_install.exe \ + HD_Load/memdisk=../common/HD_load/memdisk \ + HD_Load/USB_Boot/=distr_data/BOOT_F32.BIN \ + HD_Load/USB_Boot/=distr_data/MTLD_F32 \ + HD_Load/USB_Boot/=distr_data/inst.exe \ + HD_Load/USB_Boot/=distr_data/setmbr.exe \ + HD_Load/USB_Boot/readme.txt=$(PROGS)/hd_load/usb_boot/readme_eng.txt \ + HD_Load/USB_boot_old/=$(PROGS)/hd_load/usb_boot_old/usb_boot.rtf \ + HD_Load/USB_boot_old/=$(PROGS)/hd_load/usb_boot_old/usb_boot_866.txt \ + HD_Load/USB_boot_old/=$(PROGS)/hd_load/usb_boot_old/usb_boot_1251.txt \ + HD_Load/USB_boot_old/MeOSload.com=distr_data/MeOSload_for_usb_boot_old.com \ + HD_Load/USB_boot_old/enable.exe=distr_data/enable_for_usb_boot_old.exe \ + games/=../common/games \ + games/fara=games/fara \ + games/soko/soko=games/soko \ +#end of list + +# Some macro for convenient work. +# Macros for replacing '|' to escaped space '\ '. +space:=\ #plus space +respace=$(subst |,$(space),$(1)) +# Macro for selecting different parts of ':'-separated items. +binarypart=$(word 1,$(subst :, ,$(1))) +imagepart=$(word 2,$(subst :, ,$(1))) +sourcepart=$(word 3,$(subst :, ,$(1))) +parampart=$(word 4,$(subst :, ,$(1))) +# Get file names, possibly with spaces inside, from an item. +# Here $(f) is an item - in fact, macro argument. +fbinary=$(call respace,$(call binarypart,$(f))) +fimage=$(call respace,$(call imagepart,$(f))) +fsource=$(call respace,$(call sourcepart,$(f))) +fparam=$(call respace,$(call parampart,$(f))) + +# Define targets for image file. +# Join all the lists above. +targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS) +# For each item in the united list call fbinary. +targets:=$(foreach f,$(targets_full),$(fbinary)) + +# Define a command for copying a file inside the image. +# mcopy_command is a macro with two parameters, +# local file name $(1) and image file name $(2). +# Note that spaces in these have to be escaped with backslashes. +mcopy_command=mcopy -moi $(BUILD_DIR)/kolibri.img $(1) ::$(2) +# Specialize a previous command for an item $(f) in one of lists. +mcopy_item_command=$(call mcopy_command,$(fbinary),$(fimage)) + +# Join all $(mcopy_item_command) for all items, +# append newline after each item. +# The first newline character after "define" line and +# the last newline character before "endef" line get away +# with define/endef, so we make three newline characters, +# that is two empty lines, in order to get one in $(newline). +define newline + + +endef +mcopy_all_items:=$(foreach f,$(targets_full),$(mcopy_item_command)$(newline)) + +# add skins to MKISOFS_EXTRA +MKISOFS_EXTRA:=$(MKISOFS_EXTRA) $(foreach f,$(SKIN_SOURCES),$(call imagepart,$(f))=$(call binarypart,$(f))) +# dependencies of MKISOFS_EXTRA; we iterate through $(MKISOFS_EXTRA), +# substitute "=" with space, get the 2nd word and join all results +mkisofs_extra_targets:=$(call respace,$(foreach f,$(MKISOFS_EXTRA),$(word 2,$(subst =, ,$(f))))) + +# The first goal: floppy image. +$(BUILD_DIR)/kolibri.img: $(BUILD_DIR)/.dir \ + Makefile \ + $(BUILD_DIR)/boot_fat12.bin \ + $(targets) +# SYSXTREE +# 3d/CUBETEXT +# 3d/LOGIO.BMP + str=`date -u +"[auto-build %d %b %Y %R, r$(REV)]"`; \ + echo -n $$str|dd of=kernel.mnt bs=1 seek=`expr 279 - length "$$str"` conv=notrunc 2>/dev/null + dd if=/dev/zero of=$(BUILD_DIR)/kolibri.img count=2880 bs=512 2>&1 + mformat -f 1440 -i $(BUILD_DIR)/kolibri.img :: + dd if=$(BUILD_DIR)/boot_fat12.bin of=$(BUILD_DIR)/kolibri.img count=1 bs=512 conv=notrunc 2>&1 + mmd -i $(BUILD_DIR)/kolibri.img ::3D + mmd -i $(BUILD_DIR)/kolibri.img ::DEMOS + mmd -i $(BUILD_DIR)/kolibri.img ::DEVELOP + mmd -i $(BUILD_DIR)/kolibri.img ::DEVELOP/INFO + mmd -i $(BUILD_DIR)/kolibri.img ::DRIVERS + mmd -i $(BUILD_DIR)/kolibri.img ::File\ Managers + mmd -i $(BUILD_DIR)/kolibri.img ::FONTS + mmd -i $(BUILD_DIR)/kolibri.img ::GAMES + mmd -i $(BUILD_DIR)/kolibri.img ::LIB + mmd -i $(BUILD_DIR)/kolibri.img ::MEDIA + mmd -i $(BUILD_DIR)/kolibri.img ::NETWORK + $(mcopy_all_items) + +# The second goal: LiveCD image. +$(BUILD_DIR)/kolibri.iso: $(BUILD_DIR)/kolibri.img $(mkisofs_extra_targets) + mkisofs -U -J -pad -b kolibri.img -c boot.catalog -hide-joliet boot.catalog -graft-points \ + -A "KolibriOS AutoBuilder" -p "CleverMouse" -publisher "KolibriOS Team" -V "KolibriOS r$(REV)" -sysid "KOLIBRI" \ + -iso-level 3 -o $(BUILD_DIR)/kolibri.iso $(BUILD_DIR)/kolibri.img $(call respace,$(MKISOFS_EXTRA)) 2>&1 + +# Special targets to modify behaviour of make. +.DELETE_ON_ERROR: +.SUFFIXES: # delete all predefined rules + +# The floppy bootsector. +$(BUILD_DIR)/boot_fat12.bin: $(KERNEL)/bootloader/boot_fat12.asm $(KERNEL)/bootloader/floppy1440.inc + fasm $(KERNEL)/bootloader/boot_fat12.asm $(BUILD_DIR)/boot_fat12.bin + +$(BUILD_DIR)/.dir 3d/.dir demos/.dir develop/.dir develop/info/.dir drivers/.dir fonts/.dir \ + games/.dir lib/.dir media/.dir network/.dir allskins/.dir distr_data/.dir .deps/.dir: + mkdir -p $(dir $@) + touch $@ +develop/info/.dir: develop/.dir +File\ Managers/.dir: + mkdir -p "File Managers" + touch "File Managers/.dir" + +# extra dependency for mtldr_install.exe +distr_data/mtldr_install.exe: mtldr_for_installer + +# FASM black magic goes to Makefile.fasm. +include Makefile.fasm + +# Similar for NASM. +include Makefile.nasm + +# Similar for copying files. +include Makefile.copy + +# Special rules for copying sysfuncs.txt - it isn't directly included in the image. +docpack: $(DOCDIR)SYSFUNCS.TXT +$(DOCDIR)SYSFUNCS.TXT: $(KERNEL)/docs/sysfuncs.txt + cp $(KERNEL)/docs/sysfuncs.txt $(DOCDIR)SYSFUNCS.TXT + +# Similar for C--. +include Makefile.cmm + +# Sorry, even black magic seems to be insufficient for +# auto-handling all subtle effects. So we just define +# command lines for compiling and linking, and +# maintain the list of sources and objects by hand. +include Makefile.msvc + +# Rules for table +table: .obj.table/table.exe + $(msvc_final) +TABLE_OBJECTS:=.obj.table/calc.obj .obj.table/func.obj .obj.table/hello.obj \ + .obj.table/KosFile.obj .obj.table/kosSyst.obj .obj.table/math2.obj \ + .obj.table/mcsmemm.obj .obj.table/parser.obj +TABLE_H_FILES:=$(wildcard $(PROGS)/other/table/*.h) +.obj.table/table.exe: $(TABLE_OBJECTS) + $(msvc_link) +$(TABLE_OBJECTS): .obj.table/%.obj: $(PROGS)/other/table/%.cpp $(TABLE_H_FILES) Makefile.msvc | .obj.table + $(msvc_compile) +.obj.table: + mkdir -p .obj.table + +# Rules for graph +graph: .obj.graph/graph.exe + $(msvc_final) +GRAPH_CPP_OBJECTS:=.obj.graph/func.obj .obj.graph/hello.obj .obj.graph/kolibri.obj \ + .obj.graph/KosFile.obj .obj.graph/kosSyst.obj .obj.graph/math2.obj \ + .obj.graph/mcsmemm.obj .obj.graph/parser.obj +GRAPH_C_OBJECTS:=.obj.graph/string.obj +GRAPH_H_FILES:=$(wildcard $(PROGS)/other/graph/*.h) +GRAPH_FASM_OBJECTS:=.obj.graph/memcpy.obj .obj.graph/memset.obj +.obj.graph/graph.exe: $(GRAPH_CPP_OBJECTS) $(GRAPH_C_OBJECTS) $(GRAPH_FASM_OBJECTS) + $(msvc_link) +$(GRAPH_CPP_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.cpp $(GRAPH_H_FILES) Makefile.msvc | .obj.graph + $(msvc_compile) +$(GRAPH_C_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.c $(GRAPH_H_FILES) Makefile.msvc | .obj.graph + $(msvc_compile) +$(GRAPH_FASM_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.asm Makefile.msvc | .obj.graph + fasm $< $@ +.obj.graph: + mkdir -p .obj.graph + +# Rules for kosilka +games/kosilka: .obj.kosilka/kosilka.exe + $(msvc_final) +KOSILKA_OBJECTS:=.obj.kosilka/kosilka.obj .obj.kosilka/KosFile.obj .obj.kosilka/kosSyst.obj .obj.kosilka/mcsmemm.obj +KOSILKA_H_FILES:=$(PROGS)/games/kosilka/*.h +.obj.kosilka/kosilka.exe: $(KOSILKA_OBJECTS) + $(msvc_link) +$(KOSILKA_OBJECTS): .obj.kosilka/%.obj: $(PROGS)/games/kosilka/%.cpp $(KOSILKA_H_FILES) Makefile.msvc | .obj.kosilka + $(msvc_compile) +.obj.kosilka: + mkdir -p .obj.kosilka + +include Makefile.gcc + +# Rules for shell +shell: .obj.shell/start.o .obj.shell/shell.o .obj.shell/kolibri.o .obj.shell/stdlib.o .obj.shell/string.o .obj.shell/ctype.o \ + $(PROGS)/system/shell/kolibri.ld + $(call gcc_link,$(PROGS)/system/shell/kolibri.ld) +.obj.shell/shell.o: $(PROGS)/system/shell/shell.c \ + $(PROGS)/system/shell/all.h \ + $(PROGS)/system/shell/system/*.h \ + $(PROGS)/system/shell/cmd/*.c \ + $(PROGS)/system/shell/modules/*.c \ + $(PROGS)/system/shell/locale/rus/globals.h \ + Makefile.gcc | .obj.shell + $(gcc_compile) +.obj.shell/kolibri.o .obj.shell/stdlib.o .obj.shell/string.o .obj.shell/ctype.o: .obj.shell/%.o: \ + $(PROGS)/system/shell/system/%.c $(PROGS)/system/shell/system/*.h \ + Makefile.gcc | .obj.shell + $(gcc_compile) + win32-gcc -c -Os -o $@ $< +.obj.shell/start.o: $(PROGS)/system/shell/start.asm | .obj.shell + fasm $< $@ +.obj.shell: + mkdir -p .obj.shell + +# Rules for e80 +E80DIR=$(PROGS)/emulator/e80/trunk +e80: .obj.e80/start.o .obj.e80/kolibri.o .obj.e80/stdlib.o .obj.e80/string.o .obj.e80/z80.o .obj.e80/e80.o + $(call gcc_link,$(E80DIR)/kolibri.ld) +.obj.e80/e80.o: $(E80DIR)/e80.c $(E80DIR)/48.h \ + $(E80DIR)/system/*.h $(E80DIR)/system/msgbox.c \ + $(E80DIR)/z80/z80.h Makefile.gcc | .obj.e80 + $(gcc_compile) +.obj.e80/kolibri.o .obj.e80/stdlib.o .obj.e80/string.o: .obj.e80/%.o: \ + $(E80DIR)/system/%.c $(E80DIR)/system/*.h Makefile.gcc | .obj.e80 + $(gcc_compile) +.obj.e80/z80.o: $(E80DIR)/z80/z80.c $(E80DIR)/z80/* + $(gcc_compile) +.obj.e80/start.o: $(E80DIR)/asm_code.asm | .obj.e80 + fasm $< $@ +.obj.e80: + mkdir -p .obj.e80 + +# Rules for sdk/sound, used by media/ac97snd +SOUNDDIR=$(PROGS)/develop/sdk/trunk/sound/src +SOUND_OBJECTS:=$(patsubst $(SOUNDDIR)/%.asm,.sdk/%.obj,$(wildcard $(SOUNDDIR)/*.asm)) +SOUND_INC_FILES:=$(wildcard $(SOUNDDIR)/*.inc) +.sdk/sound.lib: $(SOUND_OBJECTS) + win32-link /lib /out:$@ $^ +$(SOUND_OBJECTS): .sdk/%.obj: $(SOUNDDIR)/%.asm $(SOUND_INC_FILES) | .sdk + fasm $< $@ +.sdk: + mkdir -p .sdk +# Rules for media/ac97snd +AC97DIR=$(PROGS)/media/ac97snd +media/ac97snd: .obj.ac97snd/ac97snd.exe + $(msvc_final) +.obj.ac97snd/ac97snd.exe: .obj.ac97snd/ac97wav.obj .obj.ac97snd/crt.obj .obj.ac97snd/k_lib.obj \ + .obj.ac97snd/mpg.lib .sdk/sound.lib .obj.ac97snd/ufmod.obj + $(msvc_link) +.obj.ac97snd/ac97wav.obj: $(AC97DIR)/ac97snd/ac97wav.c \ + $(AC97DIR)/kolibri.h $(AC97DIR)/ac97snd/ac97wav.h $(AC97DIR)/mpg/mpg123.h \ + $(AC97DIR)/sound.h $(AC97DIR)/ufmod-codec.h Makefile.msvc | .obj.ac97snd + $(msvc_compile) +.obj.ac97snd/crt.obj: $(AC97DIR)/ac97snd/crt.c $(AC97DIR)/ac97snd/crt.h Makefile.msvc | .obj.ac97snd + $(msvc_compile) +.obj.ac97snd/k_lib.obj: $(AC97DIR)/ac97snd/k_lib.asm $(AC97DIR)/ac97snd/proc32.inc | .obj.ac97snd + fasm $< $@ +.obj.ac97snd/ufmod.obj: $(AC97DIR)/ufmod-config.asm | .obj.ac97snd + fasm $< $@ -s .deps/ac97snd-ufmod.fas + prepsrc .deps/ac97snd-ufmod.fas /dev/stdout | \ + perl -n -e 's|\\|/|g;s| |\\ |g;push @a,$$1 if/^;include\\ \x27(.*?)\x27/;' \ + -e 'END{$$a=join " \\\n ",@a;print "$@: $$a\n$$a:\n"}' > .deps/ac97snd-ufmod.Po +-include .deps/ac97snd-ufmod.Po +AC97SND_MPG_C_FILES:=$(wildcard $(AC97DIR)/mpg/*.c) +AC97SND_MPG_H_FILES:=$(wildcard $(AC97DIR)/mpg/*.h) +AC97SND_MPG_C_OBJECTS:=$(patsubst $(AC97DIR)/mpg/%.c,.obj.ac97snd/%.o,$(AC97SND_MPG_C_FILES)) +.obj.ac97snd/mpg.lib: $(AC97SND_MPG_C_OBJECTS) .obj.ac97snd/pow.obj + win32-link /lib /ltcg /out:$@ $^ +$(AC97SND_MPG_C_OBJECTS): .obj.ac97snd/%.o: $(AC97DIR)/mpg/%.c $(AC97SND_MPG_H_FILES) Makefile.msvc | .obj.ac97snd + $(msvc_compile) +.obj.ac97snd/pow.obj: $(AC97DIR)/mpg/pow.asm $(AC97DIR)/mpg/proc32.inc | .obj.ac97snd + fasm $< $@ +.obj.ac97snd: + mkdir -p .obj.ac97snd + +# Rules for atikms.dll +# Use Makefile from $(REPOSITORY)/drivers/ddk and $(REPOSITORY)/drivers/video/drm/radeon +# However, dependencies must be duplicated - I don't know how to avoid this +# without need to rebuild kolibri.img at every iteration... +# Note that we are going to write in the directory shared +# between all Makefiles, so we need locked operations. +drivers/atikms.dll: $(REPOSITORY)/drivers/video/drm/radeon/atikms.dll drivers/.dir + kpack --nologo $< $@ +$(REPOSITORY)/drivers/video/drm/radeon/atikms.dll: $(REPOSITORY)/drivers/video/drm/radeon/Makefile.lto + flock $(REPOSITORY)/drivers/video/drm/radeon/.lock \ + $(MAKE) CC=win32-gcc45 AS=win32-as LD=win32-ld AR=win32-ar FASM=fasm -C $(REPOSITORY)/drivers/video/drm/radeon -f Makefile.lto +$(REPOSITORY)/drivers/ddk/libddk.a: $(REPOSITORY)/drivers/ddk/Makefile + flock $(REPOSITORY)/drivers/ddk/.lock \ + $(MAKE) CC=win32-gcc45 AS=win32-as LD=win32-ld AR=win32-ar FASM=fasm -C $(REPOSITORY)/drivers/ddk libddk.a +$(REPOSITORY)/drivers/ddk/libcore.a: $(REPOSITORY)/drivers/ddk/Makefile + flock $(REPOSITORY)/drivers/ddk/.lock \ + $(MAKE) CC=win32-gcc45 AS=win32-as LD=win32-ld AR=win32-ar FASM=fasm -C $(REPOSITORY)/drivers/ddk libcore.a +# dependencies +$(REPOSITORY)/drivers/video/drm/radeon/atikms.dll: \ + $(REPOSITORY)/drivers/video/drm/radeon/atikms.lds \ + $(REPOSITORY)/drivers/ddk/libddk.a \ + $(REPOSITORY)/drivers/ddk/libcore.a \ + $(REPOSITORY)/drivers/video/drm/radeon/*.[Sch] \ + $(REPOSITORY)/drivers/video/drm/radeon/*.asm \ + $(REPOSITORY)/drivers/video/drm/radeon/Makefile \ + $(REPOSITORY)/drivers/video/drm/radeon/firmware/*.bin \ + $(REPOSITORY)/drivers/include/*.h \ + $(REPOSITORY)/drivers/include/*/*.h \ + $(REPOSITORY)/drivers/include/*/*/*.h \ + $(REPOSITORY)/drivers/include/*/*/*/*.h +$(REPOSITORY)/drivers/ddk/libddk.a: \ + $(REPOSITORY)/drivers/ddk/*/* \ + $(REPOSITORY)/drivers/include/*.h \ + $(REPOSITORY)/drivers/include/*/*.h \ + $(REPOSITORY)/drivers/include/*/*/*.h \ + $(REPOSITORY)/drivers/include/*/*/*/*.h +$(REPOSITORY)/drivers/ddk/libcore.a: \ + $(REPOSITORY)/drivers/ddk/core.S diff --git a/data/new-stack/Makefile b/data/new-stack/Makefile index d06ba98b1..87ad1d14e 100644 --- a/data/new-stack/Makefile +++ b/data/new-stack/Makefile @@ -157,6 +157,7 @@ COPY_FILES:=\ develop/te_icon.png:DEVELOP/TE_ICON.PNG:$(PROGS)/other/t_edit/te_icon.png \ develop/tl_nod_16.png:DEVELOP/TL_NOD_16.PNG:$(PROGS)/other/t_edit/tl_nod_16.png \ develop/tl_sys_16.png:DEVELOP/TL_SYS_16.PNG:$(PROGS)/media/log_el/trunk/tl_sys_16.png \ + develop/t_edit.ini:DEVELOP/T_EDIT.INI:$(PROGS)/other/t_edit/t_edit.ini \ File|Managers/z_icons.png:File|Managers/Z_ICONS.PNG:$(PROGS)/fs/opendial/z_icons.png \ File|Managers/kfm_keys.txt:File|Managers/KFM_KEYS.TXT:$(PROGS)/fs/kfm/trunk/docs/english/kfm_keys.txt \ File|Managers/buttons.bmp:File|Managers/BUTTONS.BMP:$(PROGS)/fs/kfm/trunk/buttons.bmp \ diff --git a/data/rus/Makefile b/data/rus/Makefile index fd997947e..9a13c2e97 100644 --- a/data/rus/Makefile +++ b/data/rus/Makefile @@ -1,664 +1,665 @@ -# General rule for naming: variables with CAPITALIZED names hold settings, -# you can - and are expected - to modify it; variables with lowercase names -# are intermediate variables and macroses not to be modified unless you -# know what you're doing. - -# Define directories for destination, source repository, sources of kernel, sources of programs. -BUILD_DIR:=build -REPOSITORY:=../.. -KERNEL:=$(REPOSITORY)/kernel/trunk -PROGS:=$(REPOSITORY)/programs - -# The main goal: build kolibri.img and kolibri.iso -all: $(BUILD_DIR)/kolibri.img $(BUILD_DIR)/kolibri.iso - -# Docpak requires some documents; we place them -# into 'docs' subdir and communicate with FASM -# through environment var DOCDIR. -DOCDIR:=docs/ -export DOCDIR - -# Because most programs are written in FASM and have -# the common structure of one main .asm file possibly including -# several .inc files, we handle this case separately. -# Namely, we organize one big list of such programs -# (FASM_PROGRAMS, see below) containing name of local binary file, -# name of file inside kolibri.img and name of the source file. -# This list is maintained by hand, and the rest is done with some macroses... -# well, slightly complicated macroses - however, you do not need to -# understand them in order to maintain the list. -# To add a FASM program with one .asm file, just -# add the corresponding item to the list and enjoy -# the power of GNU make. - -# The list of all FASM programs with one main FASM file. -# Every item consists of three parts, separated by ':'. -# First part is the real name of binary file in $(BUILD_DIR) -# as it should be produced by make. -# Second part is the name of a file inside kolibri.img, -# usually uppercased version of first part - to save space -# for FAT filesystem. -# Third part is the name of the source file. -# Spaces separate items, so spaces in names should be -# represented as '|'. -FASM_PROGRAMS:=\ - @clip:@CLIP:$(PROGS)/system/clip/trunk/@clip.ASM \ - @menu:@MENU:$(PROGS)/system/menu/trunk/menu.asm \ - @notify:@NOTIFY:$(PROGS)/system/notify/trunk/@notify.asm \ - @panel:@PANEL:$(PROGS)/system/panel/trunk/@PANEL.ASM \ - @rb:@RB:$(PROGS)/system/rb/trunk/@RB.ASM \ - @ss:@SS:$(PROGS)/system/ss/trunk/@ss.asm \ - refrscrn:REFRSCRN:$(PROGS)/system/refrscrn/refrscrn.asm \ - asciivju:ASCIIVJU:$(PROGS)/develop/asciivju/trunk/asciivju.asm \ - calc:CALC:$(PROGS)/other/calc/trunk/calc.asm \ - calendar:CALENDAR:$(PROGS)/system/calendar/trunk/calendar.asm \ - commouse:COMMOUSE:$(PROGS)/system/commouse/trunk/commouse.asm \ - cpu:CPU:$(PROGS)/system/cpu/trunk/cpu.asm \ - cpuid:CPUID:$(PROGS)/system/cpuid/trunk/CPUID.ASM \ - desktop:DESKTOP:$(PROGS)/system/desktop/trunk/desktop.asm \ - disptest:DISPTEST:$(PROGS)/system/disptest/trunk/disptest.ASM \ - docpack:DOCPACK:$(PROGS)/system/docpack/trunk/docpack.asm \ - end:END:$(PROGS)/system/end/light/end.asm \ - gmon:GMON:$(PROGS)/system/gmon/gmon.asm \ - hdd_info:HDD_INFO:$(PROGS)/system/hdd_info/trunk/hdd_info.asm \ - icon:ICON:$(PROGS)/system/icon/trunk/icon.asm \ - cropflat:CROPFLAT:$(PROGS)/system/cropflat/cropflat.asm \ - kbd:KBD:$(PROGS)/system/kbd/trunk/kbd.ASM \ - kpack:KPACK:$(PROGS)/other/kpack/trunk/kpack.asm \ - launcher:LAUNCHER:$(PROGS)/system/launcher/trunk/launcher.asm \ - magnify:MAGNIFY:$(PROGS)/demos/magnify/trunk/magnify.asm \ - mgb:MGB:$(PROGS)/system/mgb/trunk/mgb.asm \ - mousemul:MOUSEMUL:$(PROGS)/system/mousemul/trunk/mousemul.asm \ - madmouse:MADMOUSE:$(PROGS)/other/madmouse/madmouse.asm \ - mykey:MYKEY:$(PROGS)/system/MyKey/trunk/MyKey.asm \ - pcidev:PCIDEV:$(PROGS)/system/pcidev/trunk/PCIDEV.ASM \ - period:PERIOD:$(PROGS)/other/period/trunk/period.asm \ - pic4:PIC4:$(PROGS)/media/pic4/trunk/pic4.asm \ - rdsave:RDSAVE:$(PROGS)/system/rdsave/trunk/rdsave.asm \ - rtfread:RTFREAD:$(PROGS)/other/rtfread/trunk/rtfread.asm \ - run:RUN:$(PROGS)/system/run/trunk/run.asm \ - scrshoot:SCRSHOOT:$(PROGS)/media/scrshoot/scrshoot.asm \ - setup:SETUP:$(PROGS)/system/setup/trunk/setup.asm \ - test:TEST:$(PROGS)/system/test/trunk/test.asm \ - tinypad:TINYPAD:$(PROGS)/develop/tinypad/trunk/tinypad.asm \ - zkey:ZKEY:$(PROGS)/system/zkey/trunk/ZKEY.ASM \ - 3d/3dcube2:3D/3DCUBE2:$(PROGS)/demos/3dcube2/trunk/3DCUBE2.ASM \ - 3d/3dsheart:3D/3DSHEART:$(PROGS)/demos/3dsheart/trunk/3dsheart.asm \ - 3d/3dwav:3D/3DWAV:$(PROGS)/demos/3dwav/trunk/3dwav.asm \ - 3d/crownscr:3D/CROWNSCR:$(PROGS)/demos/crownscr/trunk/crownscr.asm \ - 3d/flatwav:3D/FLATWAV:$(PROGS)/demos/flatwav/trunk/FLATWAV.ASM \ - 3d/free3d04:3D/FREE3D04:$(PROGS)/demos/free3d04/trunk/free3d04.asm \ - 3d/view3ds:3D/VIEW3DS:$(PROGS)/demos/3DS/VIEW3DS.ASM \ - demos/bcdclk:DEMOS/BCDCLK:$(PROGS)/demos/bcdclk/trunk/bcdclk.asm \ - demos/circle:DEMOS/CIRCLE:$(PROGS)/develop/examples/circle/trunk/circle.asm \ - demos/colorref:DEMOS/COLORREF:$(PROGS)/demos/colorref/trunk/colorref.asm \ - demos/cslide:DEMOS/CSLIDE:$(PROGS)/demos/cslide/trunk/cslide.asm \ - demos/eyes:DEMOS/EYES:$(PROGS)/demos/eyes/trunk/eyes.asm \ - demos/fire:DEMOS/FIRE:$(PROGS)/demos/fire/trunk/fire.asm \ - demos/firework:DEMOS/FIREWORK:$(PROGS)/demos/firework/trunk/firework.asm \ - demos/movback:DEMOS/MOVBACK:$(PROGS)/demos/movback/trunk/movback.asm \ - demos/plasma:DEMOS/PLASMA:$(PROGS)/demos/plasma/trunk/plasma.asm \ - demos/timer:DEMOS/TIMER:$(PROGS)/demos/timer/trunk/timer.asm \ - demos/tinyfrac:DEMOS/TINYFRAC:$(PROGS)/demos/tinyfrac/trunk/tinyfrac.asm \ - demos/trantest:DEMOS/TRANTEST:$(PROGS)/demos/trantest/trunk/trantest.asm \ - demos/tube:DEMOS/TUBE:$(PROGS)/demos/tube/trunk/tube.asm \ - demos/unvwater:DEMOS/UNVWATER:$(PROGS)/demos/unvwater/trunk/unvwater.asm \ - demos/web:DEMOS/WEB:$(PROGS)/demos/web/trunk/web.asm \ - develop/board:DEVELOP/BOARD:$(PROGS)/system/board/trunk/board.asm \ - develop/cObj:DEVELOP/cObj:$(PROGS)/develop/cObj/trunk/cObj.asm \ - develop/fasm:DEVELOP/FASM:$(PROGS)/develop/fasm/trunk/fasm.asm \ - develop/h2d2b:DEVELOP/H2D2B:$(PROGS)/develop/h2d2b/trunk/h2d2b.asm \ - develop/heed:DEVELOP/HEED:$(PROGS)/develop/heed/trunk/heed.asm \ - develop/ipc:DEVELOP/IPC:$(PROGS)/network/ipc/trunk/ipc.asm \ - develop/keyascii:DEVELOP/KEYASCII:$(PROGS)/develop/keyascii/trunk/keyascii.asm \ - develop/mtdbg:DEVELOP/MTDBG:$(PROGS)/develop/mtdbg/mtdbg.asm \ - develop/scancode:DEVELOP/SCANCODE:$(PROGS)/develop/scancode/trunk/scancode.asm \ - develop/t_edit:DEVELOP/T_EDIT:$(PROGS)/other/t_edit/t_edit.asm \ - develop/test_gets:DEVELOP/test_gets:$(PROGS)/develop/libraries/console/examples/test_gets.asm \ - develop/testcon2:DEVELOP/TESTCON2:$(PROGS)/develop/libraries/console/examples/testcon2.asm \ - develop/thread:DEVELOP/THREAD:$(PROGS)/develop/examples/thread/trunk/thread.asm \ - develop/info/asm.syn:DEVELOP/INFO/ASM.SYN:$(PROGS)/other/t_edit/info/asm_syn.asm \ - develop/info/cpp_kol_cla.syn:DEVELOP/INFO/CPP_KOL_CLA.SYN:$(PROGS)/other/t_edit/info/cpp_kol_cla_syn.asm \ - develop/info/cpp_kol_dar.syn:DEVELOP/INFO/CPP_KOL_DAR.SYN:$(PROGS)/other/t_edit/info/cpp_kol_dar_syn.asm \ - develop/info/cpp_kol_def.syn:DEVELOP/INFO/CPP_KOL_DEF.SYN:$(PROGS)/other/t_edit/info/cpp_kol_def_syn.asm \ - develop/info/default.syn:DEVELOP/INFO/DEFAULT.SYN:$(PROGS)/other/t_edit/info/default_syn.asm \ - develop/info/html.syn:DEVELOP/INFO/HTML.SYN:$(PROGS)/other/t_edit/info/html_syn.asm \ - develop/info/ini_files.syn:DEVELOP/INFO/INI_FILES.SYN:$(PROGS)/other/t_edit/info/ini_files_syn.asm \ - develop/info/win_const.syn:DEVELOP/INFO/WIN_CONST.SYN:$(PROGS)/other/t_edit/info/win_const_syn.asm \ - drivers/com_mouse.obj:DRIVERS/COM_MOUSE.OBJ:$(KERNEL)/drivers/com_mouse.asm \ - drivers/emu10k1x.obj:DRIVERS/EMU10K1X.OBJ:$(KERNEL)/drivers/emu10k1x.asm \ - drivers/fm801.obj:DRIVERS/FM801.OBJ:$(KERNEL)/drivers/fm801.asm \ - drivers/infinity.obj:DRIVERS/INFINITY.OBJ:$(KERNEL)/drivers/infinity.asm \ - drivers/ps2mouse.obj:DRIVERS/PS2MOUSE.OBJ:$(REPOSITORY)/drivers/mouse/ps2mouse4d/trunk/ps2mouse.asm \ - drivers/sb16.obj:DRIVERS/SB16.OBJ:$(KERNEL)/drivers/sb16/sb16.asm \ - drivers/sound.obj:DRIVERS/SOUND.OBJ:$(KERNEL)/drivers/sound.asm \ - drivers/vt8235.obj:DRIVERS/VT8235.OBJ:$(KERNEL)/drivers/vt823x.asm \ - File|Managers/kfar:File|Managers/KFAR:$(PROGS)/fs/kfar/trunk/kfar.asm \ - File|Managers/kfm:File|Managers/KFM:$(PROGS)/fs/kfm/trunk/kfm.asm \ - File|Managers/opendial:File|Managers/OPENDIAL:$(PROGS)/fs/opendial/opendial.asm \ - games/15:GAMES/15:$(PROGS)/games/15/trunk/15.ASM \ - games/arcanii:GAMES/ARCANII:$(PROGS)/games/arcanii/trunk/arcanii.asm \ - games/freecell:GAMES/FREECELL:$(PROGS)/games/freecell/freecell.asm \ - games/gomoku:GAMES/GOMOKU:$(PROGS)/games/gomoku/trunk/gomoku.asm \ - games/invaders:GAMES/INVADERS:$(PROGS)/games/invaders/invaders.asm \ - games/klavisha:GAMES/KLAVISHA:$(PROGS)/games/klavisha/trunk/klavisha.asm \ - games/lines:GAMES/LINES:$(PROGS)/games/lines/lines.asm \ - games/mblocks:GAMES/MBLOCKS:$(PROGS)/games/mblocks/trunk/mblocks.asm \ - games/msquare:GAMES/MSQUARE:$(PROGS)/games/MSquare/trunk/MSquare.asm \ - games/phenix:GAMES/PHENIX:$(PROGS)/games/phenix/trunk/phenix.asm \ - games/pipes:GAMES/PIPES:$(PROGS)/games/pipes/pipes.asm \ - games/pong:GAMES/PONG:$(PROGS)/games/pong/trunk/pong.asm \ - games/pong3:GAMES/PONG3:$(PROGS)/games/pong3/trunk/pong3.asm \ - games/rsquare:GAMES/RSQUARE:$(PROGS)/games/rsquare/trunk/rsquare.asm \ - games/snake:GAMES/SNAKE:$(PROGS)/games/snake/trunk/snake.asm \ - games/sq_game:GAMES/SQ_GAME:$(PROGS)/games/sq_game/trunk/SQ_GAME.ASM \ - games/sudoku:GAMES/SUDOKU:$(PROGS)/games/sudoku/trunk/sudoku.asm \ - games/sw:GAMES/SW:$(PROGS)/games/sw/trunk/sw.asm \ - games/tanks:GAMES/TANKS:$(PROGS)/games/tanks/trunk/tanks.asm \ - games/tetris:GAMES/TETRIS:$(PROGS)/games/tetris/trunk/tetris.asm \ - lib/archiver.obj:LIB/ARCHIVER.OBJ:$(PROGS)/fs/kfar/trunk/kfar_arc/kfar_arc.asm \ - lib/box_lib.obj:LIB/BOX_LIB.OBJ:$(PROGS)/develop/libraries/box_lib/trunk/box_lib.asm \ - lib/console.obj:LIB/CONSOLE.OBJ:$(PROGS)/develop/libraries/console/console.asm \ - lib/libgfx.obj:LIB/LIBGFX.OBJ:$(PROGS)/develop/libraries/libs-dev/libgfx/libgfx.asm \ - lib/libimg.obj:LIB/LIBIMG.OBJ:$(PROGS)/develop/libraries/libs-dev/libimg/libimg.asm \ - lib/libini.obj:LIB/LIBINI.OBJ:$(PROGS)/develop/libraries/libs-dev/libini/libini.asm \ - lib/libio.obj:LIB/LIBIO.OBJ:$(PROGS)/develop/libraries/libs-dev/libio/libio.asm \ - lib/network.obj:LIB/NETWORK.OBJ:$(PROGS)/develop/libraries/network/network.asm \ - lib/proc_lib.obj:LIB/PROC_LIB.OBJ:$(PROGS)/develop/libraries/proc_lib/trunk/proc_lib.asm \ - lib/cnv_png.obj:LIB/CNV_PNG.OBJ:$(PROGS)/media/zsea/plugins/png/cnv_png.asm \ - media/animage:MEDIA/ANIMAGE:$(PROGS)/media/animage/trunk/animage.asm \ - media/cdp:MEDIA/CDP:$(PROGS)/media/cdp/trunk/cdp.asm \ - media/kiv:MEDIA/KIV:$(PROGS)/media/kiv/trunk/kiv.asm \ - media/listplay:MEDIA/LISTPLAY:$(PROGS)/media/listplay/trunk/listplay.asm \ - media/midamp:MEDIA/MIDAMP:$(PROGS)/media/midamp/trunk/midamp.asm \ - media/startmus:MEDIA/STARTMUS:$(PROGS)/media/startmus/trunk/STARTMUS.ASM \ - network/airc:NETWORK/AIRC:$(PROGS)/network/airc/trunk/airc.asm \ - network/arpstat:NETWORK/ARPSTAT:$(PROGS)/network/arpstat/trunk/arpstat.asm \ - network/chess:NETWORK/CHESS:$(PROGS)/network/chess/trunk/chess.asm \ - network/downloader:NETWORK/DOWNLOADER:$(PROGS)/network/downloader/trunk/downloader.asm \ - network/ethstat:NETWORK/ETHSTAT:$(PROGS)/network/ethstat/trunk/ethstat.asm \ - network/ftps:NETWORK/FTPS:$(PROGS)/network/ftps/trunk/FTPS.ASM \ - network/https:NETWORK/HTTPS:$(PROGS)/network/https/trunk/https.asm \ - network/nntpc:NETWORK/NNTPC:$(PROGS)/network/nntpc/trunk/nntpc.asm \ - network/nslookup:NETWORK/NSLOOKUP:$(PROGS)/develop/libraries/network/examples/nslookup.asm \ - network/popc:NETWORK/POPC:$(PROGS)/network/popc/trunk/popc.asm \ - network/smtps:NETWORK/SMTPS:$(PROGS)/network/smtps/trunk/smtps.asm \ - network/stackcfg:NETWORK/STACKCFG:$(PROGS)/network/stackcfg/trunk/stackcfg.asm \ - network/telnet:NETWORK/TELNET:$(PROGS)/network/telnet/trunk/telnet.asm \ - network/tftpc:NETWORK/TFTPC:$(PROGS)/network/tftpc/trunk/tftpc.asm \ - network/VNCclient:NETWORK/VNCclient:$(PROGS)/network/VNCclient/VNCclient.asm \ - network/ym:NETWORK/YM:$(PROGS)/network/ym/trunk/ym.asm \ - network/zeroconf:NETWORK/ZEROCONF:$(PROGS)/network/zeroconf/trunk/zeroconf.asm \ -# end of list -# The list of all FASM programs with one main FASM file for CD image. -# Format of an item is exactly the same as in the previous list. -FASM_PROGRAMS_CD:=\ - drivers/atikms:DRIVERS/ATIKMS:$(REPOSITORY)/drivers/video/drm/radeon/atikms.asm \ -# end of list - -# The list of all FASM programs which needs to be compiled without KPACKing. -FASM_NOKPACK_PROGRAMS:=\ - distr_data/9x2klbr.exe:-:$(PROGS)/hd_load/9x2klbr/9x2klbr.asm \ - distr_data/MeOSload.com:-:$(PROGS)/hd_load/meosload/MeOSload.asm \ - distr_data/mtldr:-:$(PROGS)/hd_load/mtldr/mtldr.asm \ - mtldr_for_installer:-:$(PROGS)/hd_load/mtldr_install/mtldr_code/mtldr.asm \ - distr_data/mtldr_install.exe:-:$(PROGS)/hd_load/mtldr_install/mtldr_install.asm \ - distr_data/MeOSload_for_usb_boot_old.com:-:$(PROGS)/hd_load/usb_boot_old/MeOSload.asm \ - distr_data/enable_for_usb_boot_old.exe:-:$(PROGS)/hd_load/usb_boot_old/enable.asm \ - distr_data/BOOT_F32.BIN:-:$(PROGS)/hd_load/usb_boot/BOOT_F32.ASM \ - distr_data/MTLD_F32:-:$(PROGS)/hd_load/usb_boot/mtldr.asm \ - distr_data/inst.exe:-:$(PROGS)/hd_load/usb_boot/inst.asm \ - distr_data/setmbr.exe:-:$(PROGS)/hd_load/usb_boot/setmbr.asm \ -#end of list - -# The list of all NASM programs with one main NASM file. -# Format of an item is exactly the same as in the previous list. -NASM_PROGRAMS:=\ - demos/aclock:DEMOS/ACLOCK:$(PROGS)/demos/aclock/trunk/aclock.asm \ - games/c4:GAMES/C4:$(PROGS)/games/c4/trunk/c4.asm \ -# end of list - -# The list of files which should be copied from somewhere. -# Format of an item is exactly the same as in the previous list. -COPY_FILES:=\ - macros.inc:MACROS.INC:$(PROGS)/macros.inc \ - config.inc:CONFIG.INC:$(PROGS)/config.inc \ - struct.inc:STRUCT.INC:$(PROGS)/struct.inc \ - develop/te_icon.png:DEVELOP/TE_ICON.PNG:$(PROGS)/other/t_edit/te_icon.png \ - develop/tl_nod_16.png:DEVELOP/TL_NOD_16.PNG:$(PROGS)/other/t_edit/tl_nod_16.png \ - develop/tl_sys_16.png:DEVELOP/TL_SYS_16.PNG:$(PROGS)/media/log_el/trunk/tl_sys_16.png \ - File|Managers/z_icons.png:File|Managers/Z_ICONS.PNG:$(PROGS)/fs/opendial/z_icons.png \ - File|Managers/kfm_keys.txt:File|Managers/KFM_KEYS.TXT:$(PROGS)/fs/kfm/trunk/docs/russian/dos_kolibri/kfm_keys.txt \ - File|Managers/buttons.bmp:File|Managers/BUTTONS.BMP:$(PROGS)/fs/kfm/trunk/buttons.bmp \ - File|Managers/icons.bmp:File|Managers/ICONS.BMP:$(PROGS)/fs/kfm/trunk/icons.bmp \ - fonts/litt.chr:FONTS/LITT.CHR:$(PROGS)/demos/bgitest/trunk/FONTS/LITT.CHR \ - games/snake.ini:GAMES/SNAKE.INI:$(PROGS)/games/snake/trunk/snake.ini \ - media/kiv.ini:MEDIA/KIV.INI:$(PROGS)/media/kiv/trunk/kiv.ini \ - .shell:.shell:$(PROGS)/system/shell/bin/rus/.shell \ - mykey.ini:MYKEY.INI:$(PROGS)/system/MyKey/trunk/mykey.ini \ -# end of list - -# The list of all C-- programs with one main C-- file. -# Format of an item is exactly the same as in the previous list, -# except that there can be fourth field with parameters for a compiler. -CMM_PROGRAMS:=\ - File|Managers/eolite:File|Managers/EOLITE:$(PROGS)/fs/Eolite/trunk/Eolite.c-- \ - games/clicks:GAMES/CLICKS:$(PROGS)/games/clicks/trunk/clicks.c \ - games/FindNumbers:GAMES/FindNumbers:$(PROGS)/games/FindNumbers/trunk/FindNumbers.c-- \ - games/flood-it:GAMES/flood-it:$(PROGS)/games/flood-it/trunk/flood-it.c \ - games/mine:GAMES/MINE:$(PROGS)/games/mine/trunk/mine.c--:/MEOS \ - HTMLv:HTMLv:$(PROGS)/network/htmlv/browser/HTMLv.c \ -# end of list - -# List of other files to be included in the image file. -# Some of them are auto-built with special rules, some just exist before build. -# Each item is of the form :. -# Spaces should be represented as |. -# -# yogev_ezra: Removed '3dsheart' to free some space on RAMDISK. This demo has 90% in common with VIEW3DS -OTHER_FILES:=autorun.dat:AUTORUN.DAT \ - background.gif:background.gif default.skn:DEFAULT.SKN \ - e80:E80 graph:GRAPH hdread:HDREAD \ - icons.dat:ICONS.DAT iconstrp.png:ICONSTRP.PNG index_htm:INDEX.HTM \ - kernel.mnt:KERNEL.MNT kerpack:KERPACK keymap.key:KEYMAP.KEY \ - kuzkina.mid:KUZKINA.MID lang.inc:LANG.INC lang.ini:LANG.INI \ - menu.dat:MENU.DAT \ - panel.ini:PANEL.INI pipetka:PIPETKA setup.dat:SETUP.DAT \ - shell:SHELL table:TABLE vmode:VMODE \ - 3d/cubeline:3D/CUBELINE 3d/gears:3D/GEARS 3d/house.3ds:3D/HOUSE.3DS \ - demos/ak47.lif:DEMOS/AK47.LIF \ - demos/barge.lif:DEMOS/BARGE.LIF demos/life2:DEMOS/LIFE2 \ - demos/relay.lif:DEMOS/RELAY.LIF demos/rpento.lif:DEMOS/RPENTO.LIF \ - demos/use_mb:DEMOS/USE_MB \ - File|Managers/eolite.ini:File|Managers/EOLITE.INI \ - File|Managers/icons.ini:File|Managers/ICONS.INI \ - File|Managers/kfar.ini:File|Managers/KFAR.INI \ - File|Managers/kfm.ini:File|Managers/KFM.INI \ - games/appdata.dat:GAMES/APPDATA.DAT games/ataka:GAMES/ATAKA \ - games/basekurs.kla:GAMES/BASEKURS.KLA games/checkers:GAMES/CHECKERS \ - games/kosilka:GAMES/KOSILKA games/kosskin.gfx:GAMES/KOSSKIN.GFX \ - games/megamaze:GAMES/MEGAMAZE games/padenie:GAMES/PADENIE \ - games/reversi:GAMES/REVERSI games/rforces:GAMES/RFORCES \ - games/whowtbam:GAMES/WHOWTBAM games/xonix:GAMES/XONIX \ - lib/msgbox.obj:LIB/MSGBOX.OBJ \ - lib/pixlib.obj:LIB/PIXLIB.OBJ lib/sort.obj:LIB/SORT.OBJ \ - drivers/intel_hda.obj:DRIVERS/intel_hda.obj \ - media/ac97snd:MEDIA/AC97SND \ - network/jmail:NETWORK/JMAIL network/zeroconf.ini:NETWORK/ZEROCONF.INI \ -#end of list -#3d/logio.bmp:3D/LOGIO.BMP 3d/cubetext:3D/CUBETEXT - -# Generate skins list understandable by gnu make -Makefile.skins: $(REPOSITORY)/skins/authors.txt $(REPOSITORY)/data/generate_makefile_skins.sh - cut -f1 $< | $(SHELL) $(REPOSITORY)/data/generate_makefile_skins.sh > $@ -include Makefile.skins - -# Extra targets for LiveCD image in the syntax of mkisofs -MKISOFS_EXTRA:=\ - dosbox/=$(PROGS)/emulator/DosBox/dosbox \ - dosbox/=$(PROGS)/emulator/DosBox/dosbox.conf \ - dosbox/=$(PROGS)/emulator/DosBox/readme.txt \ - /=drivers/atikms \ - /=drivers/atikms.dll \ - /=distr_data/autorun.inf \ - /=distr_data/KolibriOS_icon.ico \ - /=distr_data/readme.txt \ - /=distr_data/readme_dos.txt \ - Skins/=$(REPOSITORY)/skins/authors.txt \ - Docs/cp866/config.txt=docs/CONFIG.TXT \ - Docs/cp866/gnu.txt=docs/GNU.TXT \ - Docs/cp866/history.txt=docs/HISTORY.TXT \ - Docs/cp866/hot_keys.txt=docs/HOT_KEYS.TXT \ - Docs/cp866/install.txt=docs/INSTALL.TXT \ - Docs/cp866/readme.txt=docs/README.TXT \ - Docs/cp866/stack_ru.txt=docs/STACK_RU.TXT \ - Docs/cp866/sysfuncr.txt=docs/SYSFUNCR.TXT \ - Docs/cp1251/config.txt=docs/CONFIG.WIN.TXT \ - Docs/cp1251/gnu.txt=docs/GNU.WIN.TXT \ - Docs/cp1251/history.txt=docs/HISTORY.WIN.TXT \ - Docs/cp1251/hot_keys.txt=docs/HOT_KEYS.WIN.TXT \ - Docs/cp1251/install.txt=docs/INSTALL.WIN.TXT \ - Docs/cp1251/readme.txt=docs/README.WIN.TXT \ - Docs/cp1251/stack_ru.txt=docs/STACK_RU.WIN.TXT \ - Docs/cp1251/sysfuncr.txt=docs/SYSFUNCR.WIN.TXT \ - HD_Load/9x2klbr/=distr_data/9x2klbr.exe \ - HD_Load/9x2klbr/=../common/HD_load/9x2klbr/LDKLBR.VXD \ - HD_Load/9x2klbr/=$(PROGS)/hd_load/9x2klbr/readme_dos.txt \ - HD_Load/9x2klbr/=$(PROGS)/hd_load/9x2klbr/readme_win.txt \ - HD_Load/MeOSLoad/=distr_data/MeOSload.com \ - HD_Load/MeOSLoad/=$(PROGS)/hd_load/meosload/AUTOEXEC.BAT \ - HD_Load/MeOSLoad/=$(PROGS)/hd_load/meosload/CONFIG.SYS \ - HD_Load/MeOSLoad/=$(PROGS)/hd_load/meosload/L_readme.txt \ - HD_Load/MeOSLoad/=$(PROGS)/hd_load/meosload/L_readme_Win.txt \ - HD_Load/mtldr/=distr_data/mtldr \ - HD_Load/mtldr/=$(PROGS)/hd_load/mtldr/install.txt \ - HD_Load/mtldr/=$(PROGS)/hd_load/mtldr/vista_install.bat \ - HD_Load/mtldr/=$(PROGS)/hd_load/mtldr/vista_remove.bat \ - HD_Load/=distr_data/mtldr_install.exe \ - HD_Load/memdisk=../common/HD_load/memdisk \ - HD_Load/USB_Boot/=distr_data/BOOT_F32.BIN \ - HD_Load/USB_Boot/=distr_data/MTLD_F32 \ - HD_Load/USB_Boot/=distr_data/inst.exe \ - HD_Load/USB_Boot/=distr_data/setmbr.exe \ - HD_Load/USB_Boot/=$(PROGS)/hd_load/usb_boot/readme.txt \ - HD_Load/USB_boot_old/=$(PROGS)/hd_load/usb_boot_old/usb_boot.rtf \ - HD_Load/USB_boot_old/=$(PROGS)/hd_load/usb_boot_old/usb_boot_866.txt \ - HD_Load/USB_boot_old/=$(PROGS)/hd_load/usb_boot_old/usb_boot_1251.txt \ - HD_Load/USB_boot_old/MeOSload.com=distr_data/MeOSload_for_usb_boot_old.com \ - HD_Load/USB_boot_old/enable.exe=distr_data/enable_for_usb_boot_old.exe \ - games/=../common/games \ - games/fara=games/fara \ - games/soko/soko=games/soko \ -#end of list - -# Text files which need to be recoded to cp1251 from native aka cp866 -RECODE_TEXT_FILES:=\ - distr_data/readme.txt:distr_data/readme_dos.txt \ - docs/CONFIG.WIN.TXT:docs/CONFIG.TXT \ - docs/GNU.WIN.TXT:docs/GNU.TXT \ - docs/HISTORY.WIN.TXT:docs/HISTORY.TXT \ - docs/HOT_KEYS.WIN.TXT:docs/HOT_KEYS.TXT \ - docs/INSTALL.WIN.TXT:docs/INSTALL.TXT \ - docs/README.WIN.TXT:docs/README.TXT \ - docs/STACK_RU.WIN.TXT:docs/STACK_RU.TXT \ - docs/SYSFUNCR.WIN.TXT:docs/SYSFUNCR.TXT \ -#end of list - -# Some macro for convenient work. -# Macros for replacing '|' to escaped space '\ '. -space:=\ #plus space -respace=$(subst |,$(space),$(1)) -# Macro for selecting different parts of ':'-separated items. -binarypart=$(word 1,$(subst :, ,$(1))) -imagepart=$(word 2,$(subst :, ,$(1))) -sourcepart=$(word 3,$(subst :, ,$(1))) -parampart=$(word 4,$(subst :, ,$(1))) -# Get file names, possibly with spaces inside, from an item. -# Here $(f) is an item - in fact, macro argument. -fbinary=$(call respace,$(call binarypart,$(f))) -fimage=$(call respace,$(call imagepart,$(f))) -fsource=$(call respace,$(call sourcepart,$(f))) -fparam=$(call respace,$(call parampart,$(f))) - -# Define targets for image file. -# Join all the lists above. -targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS) -# For each item in the united list call fbinary. -targets:=$(foreach f,$(targets_full),$(fbinary)) - -# Define a command for copying a file inside the image. -# mcopy_command is a macro with two parameters, -# local file name $(1) and image file name $(2). -# Note that spaces in these have to be escaped with backslashes. -mcopy_command=mcopy -moi $(BUILD_DIR)/kolibri.img $(1) ::$(2) -# Specialize a previous command for an item $(f) in one of lists. -mcopy_item_command=$(call mcopy_command,$(fbinary),$(fimage)) - -# Join all $(mcopy_item_command) for all items, -# append newline after each item. -# The first newline character after "define" line and -# the last newline character before "endef" line get away -# with define/endef, so we make three newline characters, -# that is two empty lines, in order to get one in $(newline). -define newline - - -endef -mcopy_all_items:=$(foreach f,$(targets_full),$(mcopy_item_command)$(newline)) - -# add skins to MKISOFS_EXTRA -MKISOFS_EXTRA:=$(MKISOFS_EXTRA) $(foreach f,$(SKIN_SOURCES),$(call imagepart,$(f))=$(call binarypart,$(f))) -# dependencies of MKISOFS_EXTRA; we iterate through $(MKISOFS_EXTRA), -# substitute "=" with space, get the 2nd word and join all results -mkisofs_extra_targets:=$(call respace,$(foreach f,$(MKISOFS_EXTRA),$(word 2,$(subst =, ,$(f))))) - -# The first goal: floppy image. -$(BUILD_DIR)/kolibri.img: $(BUILD_DIR)/.dir \ - Makefile \ - $(BUILD_DIR)/boot_fat12.bin \ - $(targets) -# SYSXTREE -# 3d/CUBETEXT -# 3d/LOGIO.BMP - str=`LANG=ru_RU.utf8 date -u +"[автосборка %d %b %Y %R, r$(REV)]"|iconv -f utf8 -t cp866`; \ - echo -n $$str|dd of=kernel.mnt bs=1 seek=`expr 279 - length "$$str"` conv=notrunc 2>/dev/null - dd if=/dev/zero of=$(BUILD_DIR)/kolibri.img count=2880 bs=512 2>&1 - mformat -f 1440 -i $(BUILD_DIR)/kolibri.img :: - dd if=$(BUILD_DIR)/boot_fat12.bin of=$(BUILD_DIR)/kolibri.img count=1 bs=512 conv=notrunc 2>&1 - mmd -i $(BUILD_DIR)/kolibri.img ::3D - mmd -i $(BUILD_DIR)/kolibri.img ::DEMOS - mmd -i $(BUILD_DIR)/kolibri.img ::DEVELOP - mmd -i $(BUILD_DIR)/kolibri.img ::DEVELOP/INFO - mmd -i $(BUILD_DIR)/kolibri.img ::DRIVERS - mmd -i $(BUILD_DIR)/kolibri.img ::File\ Managers - mmd -i $(BUILD_DIR)/kolibri.img ::FONTS - mmd -i $(BUILD_DIR)/kolibri.img ::GAMES - mmd -i $(BUILD_DIR)/kolibri.img ::LIB - mmd -i $(BUILD_DIR)/kolibri.img ::MEDIA - mmd -i $(BUILD_DIR)/kolibri.img ::NETWORK - $(mcopy_all_items) - -# The second goal: LiveCD image. -$(BUILD_DIR)/kolibri.iso: $(BUILD_DIR)/kolibri.img $(mkisofs_extra_targets) - mkisofs -U -J -pad -b kolibri.img -c boot.catalog -hide-joliet boot.catalog -graft-points \ - -A "KolibriOS AutoBuilder" -p "CleverMouse" -publisher "KolibriOS Team" -V "KolibriOS r$(REV)" -sysid "KOLIBRI" \ - -iso-level 3 -o $(BUILD_DIR)/kolibri.iso $(BUILD_DIR)/kolibri.img $(call respace,$(MKISOFS_EXTRA)) 2>&1 - -# Special targets to modify behaviour of make. -.DELETE_ON_ERROR: -.SUFFIXES: # disable all predefined rules - -# The floppy bootsector. -$(BUILD_DIR)/boot_fat12.bin: $(KERNEL)/bootloader/boot_fat12.asm $(KERNEL)/bootloader/floppy1440.inc - fasm $(KERNEL)/bootloader/boot_fat12.asm $(BUILD_DIR)/boot_fat12.bin - -$(BUILD_DIR)/.dir 3d/.dir demos/.dir develop/.dir develop/info/.dir drivers/.dir fonts/.dir \ - games/.dir lib/.dir media/.dir network/.dir allskins/.dir distr_data/.dir .deps/.dir: - mkdir -p $(dir $@) - touch $@ -develop/info/.dir: develop/.dir -File\ Managers/.dir: - mkdir -p "File Managers" - touch "File Managers/.dir" - -# extra dependency for mtldr_install.exe -distr_data/mtldr_install.exe: mtldr_for_installer - -# FASM black magic goes to Makefile.fasm. -include Makefile.fasm - -# Similar for NASM. -include Makefile.nasm - -# Similar for copying files. -include Makefile.copy - -# Special rules for copying sysfuncr.txt - it isn't directly included in the image. -docpack: $(DOCDIR)SYSFUNCR.TXT -$(DOCDIR)SYSFUNCR.TXT: $(KERNEL)/docs/sysfuncr.txt - cp $(KERNEL)/docs/sysfuncr.txt $(DOCDIR)SYSFUNCR.TXT - -# Similar for C--. -include Makefile.cmm - -# Recode some text files from native encoding aka cp866 to cp1251 -define recode_meta_rule -$(1): $(2) - iconv -f cp866 -t cp1251 "$$<" > "$$@" -endef -$(foreach f, $(RECODE_TEXT_FILES), $(eval $(call recode_meta_rule,$(fbinary),$(fimage)))) - -# Sorry, even black magic seems to be insufficient for -# auto-handling all subtle effects. So we just define -# command lines for compiling and linking, and -# maintain the list of sources and objects by hand. -include Makefile.msvc - -# Rules for table -table: .obj.table/table.exe - $(msvc_final) -TABLE_OBJECTS:=.obj.table/calc.obj .obj.table/func.obj .obj.table/hello.obj \ - .obj.table/KosFile.obj .obj.table/kosSyst.obj .obj.table/math2.obj \ - .obj.table/mcsmemm.obj .obj.table/parser.obj -TABLE_H_FILES:=$(wildcard $(PROGS)/other/table/*.h) -.obj.table/table.exe: $(TABLE_OBJECTS) - $(msvc_link) -$(TABLE_OBJECTS): .obj.table/%.obj: $(PROGS)/other/table/%.cpp $(TABLE_H_FILES) Makefile.msvc | .obj.table - $(msvc_compile) -.obj.table: - mkdir -p .obj.table - -# Rules for graph -graph: .obj.graph/graph.exe - $(msvc_final) -GRAPH_CPP_OBJECTS:=.obj.graph/func.obj .obj.graph/hello.obj .obj.graph/kolibri.obj \ - .obj.graph/KosFile.obj .obj.graph/kosSyst.obj .obj.graph/math2.obj \ - .obj.graph/mcsmemm.obj .obj.graph/parser.obj -GRAPH_C_OBJECTS:=.obj.graph/string.obj -GRAPH_H_FILES:=$(wildcard $(PROGS)/other/graph/*.h) -GRAPH_FASM_OBJECTS:=.obj.graph/memcpy.obj .obj.graph/memset.obj -.obj.graph/graph.exe: $(GRAPH_CPP_OBJECTS) $(GRAPH_C_OBJECTS) $(GRAPH_FASM_OBJECTS) - $(msvc_link) -$(GRAPH_CPP_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.cpp $(GRAPH_H_FILES) Makefile.msvc | .obj.graph - $(msvc_compile) -$(GRAPH_C_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.c $(GRAPH_H_FILES) Makefile.msvc | .obj.graph - $(msvc_compile) -$(GRAPH_FASM_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.asm Makefile.msvc | .obj.graph - fasm $< $@ -.obj.graph: - mkdir -p .obj.graph - -# Rules for kosilka -games/kosilka: .obj.kosilka/kosilka.exe - $(msvc_final) -KOSILKA_OBJECTS:=.obj.kosilka/kosilka.obj .obj.kosilka/KosFile.obj .obj.kosilka/kosSyst.obj .obj.kosilka/mcsmemm.obj -KOSILKA_H_FILES:=$(PROGS)/games/kosilka/*.h -.obj.kosilka/kosilka.exe: $(KOSILKA_OBJECTS) - $(msvc_link) -$(KOSILKA_OBJECTS): .obj.kosilka/%.obj: $(PROGS)/games/kosilka/%.cpp $(KOSILKA_H_FILES) Makefile.msvc | .obj.kosilka - $(msvc_compile) -.obj.kosilka: - mkdir -p .obj.kosilka - -include Makefile.gcc - -# Rules for shell -shell: .obj.shell/start.o .obj.shell/shell.o .obj.shell/kolibri.o .obj.shell/stdlib.o .obj.shell/string.o .obj.shell/ctype.o \ - $(PROGS)/system/shell/kolibri.ld - $(call gcc_link,$(PROGS)/system/shell/kolibri.ld) -.obj.shell/shell.o: $(PROGS)/system/shell/shell.c \ - $(PROGS)/system/shell/all.h \ - $(PROGS)/system/shell/system/*.h \ - $(PROGS)/system/shell/cmd/*.c \ - $(PROGS)/system/shell/modules/*.c \ - $(PROGS)/system/shell/locale/rus/globals.h \ - Makefile.gcc | .obj.shell - $(gcc_compile) -.obj.shell/kolibri.o .obj.shell/stdlib.o .obj.shell/string.o .obj.shell/ctype.o: .obj.shell/%.o: \ - $(PROGS)/system/shell/system/%.c $(PROGS)/system/shell/system/*.h \ - Makefile.gcc | .obj.shell - $(gcc_compile) -.obj.shell/start.o: $(PROGS)/system/shell/start.asm | .obj.shell - fasm $< $@ -.obj.shell: - mkdir -p .obj.shell - -# Rules for e80 -E80DIR=$(PROGS)/emulator/e80/trunk -e80: .obj.e80/start.o .obj.e80/kolibri.o .obj.e80/stdlib.o .obj.e80/string.o .obj.e80/z80.o .obj.e80/e80.o - $(call gcc_link,$(E80DIR)/kolibri.ld) -.obj.e80/e80.o: $(E80DIR)/e80.c $(E80DIR)/48.h \ - $(E80DIR)/system/*.h $(E80DIR)/system/msgbox.c \ - $(E80DIR)/z80/z80.h Makefile.gcc | .obj.e80 - $(gcc_compile) -.obj.e80/kolibri.o .obj.e80/stdlib.o .obj.e80/string.o: .obj.e80/%.o: \ - $(E80DIR)/system/%.c $(E80DIR)/system/*.h Makefile.gcc | .obj.e80 - $(gcc_compile) -.obj.e80/z80.o: $(E80DIR)/z80/z80.c $(E80DIR)/z80/* - $(gcc_compile) -.obj.e80/start.o: $(E80DIR)/asm_code.asm | .obj.e80 - fasm $< $@ -.obj.e80: - mkdir -p .obj.e80 - -# Rules for sdk/sound, used by media/ac97snd -SOUNDDIR=$(PROGS)/develop/sdk/trunk/sound/src -SOUND_OBJECTS:=$(patsubst $(SOUNDDIR)/%.asm,.sdk/%.obj,$(wildcard $(SOUNDDIR)/*.asm)) -SOUND_INC_FILES:=$(wildcard $(SOUNDDIR)/*.inc) -.sdk/sound.lib: $(SOUND_OBJECTS) - win32-link /lib /out:$@ $^ -$(SOUND_OBJECTS): .sdk/%.obj: $(SOUNDDIR)/%.asm $(SOUND_INC_FILES) | .sdk - fasm $< $@ -.sdk: - mkdir -p .sdk -# Rules for media/ac97snd -AC97DIR=$(PROGS)/media/ac97snd -media/ac97snd: .obj.ac97snd/ac97snd.exe - $(msvc_final) -.obj.ac97snd/ac97snd.exe: .obj.ac97snd/ac97wav.obj .obj.ac97snd/crt.obj .obj.ac97snd/k_lib.obj \ - .obj.ac97snd/mpg.lib .sdk/sound.lib .obj.ac97snd/ufmod.obj - $(msvc_link) -.obj.ac97snd/ac97wav.obj: $(AC97DIR)/ac97snd/ac97wav.c \ - $(AC97DIR)/kolibri.h $(AC97DIR)/ac97snd/ac97wav.h $(AC97DIR)/mpg/mpg123.h \ - $(AC97DIR)/sound.h $(AC97DIR)/ufmod-codec.h Makefile.msvc | .obj.ac97snd - $(msvc_compile) -.obj.ac97snd/crt.obj: $(AC97DIR)/ac97snd/crt.c $(AC97DIR)/ac97snd/crt.h Makefile.msvc | .obj.ac97snd - $(msvc_compile) -.obj.ac97snd/k_lib.obj: $(AC97DIR)/ac97snd/k_lib.asm $(AC97DIR)/ac97snd/proc32.inc | .obj.ac97snd - fasm $< $@ -.obj.ac97snd/ufmod.obj: $(AC97DIR)/ufmod-config.asm | .obj.ac97snd - fasm $< $@ -s .deps/ac97snd-ufmod.fas - prepsrc .deps/ac97snd-ufmod.fas /dev/stdout | \ - perl -n -e 's|\\|/|g;s| |\\ |g;push @a,$$1 if/^;include\\ \x27(.*?)\x27/;' \ - -e 'END{$$a=join " \\\n ",@a;print "$@: $$a\n$$a:\n"}' > .deps/ac97snd-ufmod.Po --include .deps/ac97snd-ufmod.Po -AC97SND_MPG_C_FILES:=$(wildcard $(AC97DIR)/mpg/*.c) -AC97SND_MPG_H_FILES:=$(wildcard $(AC97DIR)/mpg/*.h) -AC97SND_MPG_C_OBJECTS:=$(patsubst $(AC97DIR)/mpg/%.c,.obj.ac97snd/%.o,$(AC97SND_MPG_C_FILES)) -.obj.ac97snd/mpg.lib: $(AC97SND_MPG_C_OBJECTS) .obj.ac97snd/pow.obj - win32-link /lib /ltcg /out:$@ $^ -$(AC97SND_MPG_C_OBJECTS): .obj.ac97snd/%.o: $(AC97DIR)/mpg/%.c $(AC97SND_MPG_H_FILES) Makefile.msvc | .obj.ac97snd - $(msvc_compile) -.obj.ac97snd/pow.obj: $(AC97DIR)/mpg/pow.asm $(AC97DIR)/mpg/proc32.inc | .obj.ac97snd - fasm $< $@ -.obj.ac97snd: - mkdir -p .obj.ac97snd - -# Rules for atikms.dll -# Use Makefile from $(REPOSITORY)/drivers/ddk and $(REPOSITORY)/drivers/video/drm/radeon -# However, dependencies must be duplicated - I don't know how to avoid this -# without need to rebuild kolibri.img at every iteration... -# Note that we are going to write in the directory shared -# between all Makefiles, so we need locked operations. -drivers/atikms.dll: $(REPOSITORY)/drivers/video/drm/radeon/atikms.dll drivers/.dir - kpack --nologo $< $@ -$(REPOSITORY)/drivers/video/drm/radeon/atikms.dll: $(REPOSITORY)/drivers/video/drm/radeon/Makefile.lto - flock $(REPOSITORY)/drivers/video/drm/radeon/.lock \ - $(MAKE) CC=win32-gcc45 AS=win32-as LD=win32-ld AR=win32-ar FASM=fasm -C $(REPOSITORY)/drivers/video/drm/radeon -f Makefile.lto -$(REPOSITORY)/drivers/ddk/libddk.a: $(REPOSITORY)/drivers/ddk/Makefile - flock $(REPOSITORY)/drivers/ddk/.lock \ - $(MAKE) CC=win32-gcc45 AS=win32-as LD=win32-ld AR=win32-ar FASM=fasm -C $(REPOSITORY)/drivers/ddk libddk.a -$(REPOSITORY)/drivers/ddk/libcore.a: $(REPOSITORY)/drivers/ddk/Makefile - flock $(REPOSITORY)/drivers/ddk/.lock \ - $(MAKE) CC=win32-gcc45 AS=win32-as LD=win32-ld AR=win32-ar FASM=fasm -C $(REPOSITORY)/drivers/ddk libcore.a -# dependencies -$(REPOSITORY)/drivers/video/drm/radeon/atikms.dll: \ - $(REPOSITORY)/drivers/video/drm/radeon/atikms.lds \ - $(REPOSITORY)/drivers/ddk/libddk.a \ - $(REPOSITORY)/drivers/ddk/libcore.a \ - $(REPOSITORY)/drivers/video/drm/radeon/*.[Sch] \ - $(REPOSITORY)/drivers/video/drm/radeon/*.asm \ - $(REPOSITORY)/drivers/video/drm/radeon/Makefile \ - $(REPOSITORY)/drivers/video/drm/radeon/firmware/*.bin \ - $(REPOSITORY)/drivers/include/*.h \ - $(REPOSITORY)/drivers/include/*/*.h \ - $(REPOSITORY)/drivers/include/*/*/*.h \ - $(REPOSITORY)/drivers/include/*/*/*/*.h -$(REPOSITORY)/drivers/ddk/libddk.a: \ - $(REPOSITORY)/drivers/ddk/*/* \ - $(REPOSITORY)/drivers/include/*.h \ - $(REPOSITORY)/drivers/include/*/*.h \ - $(REPOSITORY)/drivers/include/*/*/*.h \ - $(REPOSITORY)/drivers/include/*/*/*/*.h -$(REPOSITORY)/drivers/ddk/libcore.a: \ - $(REPOSITORY)/drivers/ddk/core.S +# General rule for naming: variables with CAPITALIZED names hold settings, +# you can - and are expected - to modify it; variables with lowercase names +# are intermediate variables and macroses not to be modified unless you +# know what you're doing. + +# Define directories for destination, source repository, sources of kernel, sources of programs. +BUILD_DIR:=build +REPOSITORY:=../.. +KERNEL:=$(REPOSITORY)/kernel/trunk +PROGS:=$(REPOSITORY)/programs + +# The main goal: build kolibri.img and kolibri.iso +all: $(BUILD_DIR)/kolibri.img $(BUILD_DIR)/kolibri.iso + +# Docpak requires some documents; we place them +# into 'docs' subdir and communicate with FASM +# through environment var DOCDIR. +DOCDIR:=docs/ +export DOCDIR + +# Because most programs are written in FASM and have +# the common structure of one main .asm file possibly including +# several .inc files, we handle this case separately. +# Namely, we organize one big list of such programs +# (FASM_PROGRAMS, see below) containing name of local binary file, +# name of file inside kolibri.img and name of the source file. +# This list is maintained by hand, and the rest is done with some macroses... +# well, slightly complicated macroses - however, you do not need to +# understand them in order to maintain the list. +# To add a FASM program with one .asm file, just +# add the corresponding item to the list and enjoy +# the power of GNU make. + +# The list of all FASM programs with one main FASM file. +# Every item consists of three parts, separated by ':'. +# First part is the real name of binary file in $(BUILD_DIR) +# as it should be produced by make. +# Second part is the name of a file inside kolibri.img, +# usually uppercased version of first part - to save space +# for FAT filesystem. +# Third part is the name of the source file. +# Spaces separate items, so spaces in names should be +# represented as '|'. +FASM_PROGRAMS:=\ + @clip:@CLIP:$(PROGS)/system/clip/trunk/@clip.ASM \ + @menu:@MENU:$(PROGS)/system/menu/trunk/menu.asm \ + @notify:@NOTIFY:$(PROGS)/system/notify/trunk/@notify.asm \ + @panel:@PANEL:$(PROGS)/system/panel/trunk/@PANEL.ASM \ + @rb:@RB:$(PROGS)/system/rb/trunk/@RB.ASM \ + @ss:@SS:$(PROGS)/system/ss/trunk/@ss.asm \ + refrscrn:REFRSCRN:$(PROGS)/system/refrscrn/refrscrn.asm \ + asciivju:ASCIIVJU:$(PROGS)/develop/asciivju/trunk/asciivju.asm \ + calc:CALC:$(PROGS)/other/calc/trunk/calc.asm \ + calendar:CALENDAR:$(PROGS)/system/calendar/trunk/calendar.asm \ + commouse:COMMOUSE:$(PROGS)/system/commouse/trunk/commouse.asm \ + cpu:CPU:$(PROGS)/system/cpu/trunk/cpu.asm \ + cpuid:CPUID:$(PROGS)/system/cpuid/trunk/CPUID.ASM \ + desktop:DESKTOP:$(PROGS)/system/desktop/trunk/desktop.asm \ + disptest:DISPTEST:$(PROGS)/system/disptest/trunk/disptest.ASM \ + docpack:DOCPACK:$(PROGS)/system/docpack/trunk/docpack.asm \ + end:END:$(PROGS)/system/end/light/end.asm \ + gmon:GMON:$(PROGS)/system/gmon/gmon.asm \ + hdd_info:HDD_INFO:$(PROGS)/system/hdd_info/trunk/hdd_info.asm \ + icon:ICON:$(PROGS)/system/icon/trunk/icon.asm \ + cropflat:CROPFLAT:$(PROGS)/system/cropflat/cropflat.asm \ + kbd:KBD:$(PROGS)/system/kbd/trunk/kbd.ASM \ + kpack:KPACK:$(PROGS)/other/kpack/trunk/kpack.asm \ + launcher:LAUNCHER:$(PROGS)/system/launcher/trunk/launcher.asm \ + magnify:MAGNIFY:$(PROGS)/demos/magnify/trunk/magnify.asm \ + mgb:MGB:$(PROGS)/system/mgb/trunk/mgb.asm \ + mousemul:MOUSEMUL:$(PROGS)/system/mousemul/trunk/mousemul.asm \ + madmouse:MADMOUSE:$(PROGS)/other/madmouse/madmouse.asm \ + mykey:MYKEY:$(PROGS)/system/MyKey/trunk/MyKey.asm \ + pcidev:PCIDEV:$(PROGS)/system/pcidev/trunk/PCIDEV.ASM \ + period:PERIOD:$(PROGS)/other/period/trunk/period.asm \ + pic4:PIC4:$(PROGS)/media/pic4/trunk/pic4.asm \ + rdsave:RDSAVE:$(PROGS)/system/rdsave/trunk/rdsave.asm \ + rtfread:RTFREAD:$(PROGS)/other/rtfread/trunk/rtfread.asm \ + run:RUN:$(PROGS)/system/run/trunk/run.asm \ + scrshoot:SCRSHOOT:$(PROGS)/media/scrshoot/scrshoot.asm \ + setup:SETUP:$(PROGS)/system/setup/trunk/setup.asm \ + test:TEST:$(PROGS)/system/test/trunk/test.asm \ + tinypad:TINYPAD:$(PROGS)/develop/tinypad/trunk/tinypad.asm \ + zkey:ZKEY:$(PROGS)/system/zkey/trunk/ZKEY.ASM \ + 3d/3dcube2:3D/3DCUBE2:$(PROGS)/demos/3dcube2/trunk/3DCUBE2.ASM \ + 3d/3dsheart:3D/3DSHEART:$(PROGS)/demos/3dsheart/trunk/3dsheart.asm \ + 3d/3dwav:3D/3DWAV:$(PROGS)/demos/3dwav/trunk/3dwav.asm \ + 3d/crownscr:3D/CROWNSCR:$(PROGS)/demos/crownscr/trunk/crownscr.asm \ + 3d/flatwav:3D/FLATWAV:$(PROGS)/demos/flatwav/trunk/FLATWAV.ASM \ + 3d/free3d04:3D/FREE3D04:$(PROGS)/demos/free3d04/trunk/free3d04.asm \ + 3d/view3ds:3D/VIEW3DS:$(PROGS)/demos/3DS/VIEW3DS.ASM \ + demos/bcdclk:DEMOS/BCDCLK:$(PROGS)/demos/bcdclk/trunk/bcdclk.asm \ + demos/circle:DEMOS/CIRCLE:$(PROGS)/develop/examples/circle/trunk/circle.asm \ + demos/colorref:DEMOS/COLORREF:$(PROGS)/demos/colorref/trunk/colorref.asm \ + demos/cslide:DEMOS/CSLIDE:$(PROGS)/demos/cslide/trunk/cslide.asm \ + demos/eyes:DEMOS/EYES:$(PROGS)/demos/eyes/trunk/eyes.asm \ + demos/fire:DEMOS/FIRE:$(PROGS)/demos/fire/trunk/fire.asm \ + demos/firework:DEMOS/FIREWORK:$(PROGS)/demos/firework/trunk/firework.asm \ + demos/movback:DEMOS/MOVBACK:$(PROGS)/demos/movback/trunk/movback.asm \ + demos/plasma:DEMOS/PLASMA:$(PROGS)/demos/plasma/trunk/plasma.asm \ + demos/timer:DEMOS/TIMER:$(PROGS)/demos/timer/trunk/timer.asm \ + demos/tinyfrac:DEMOS/TINYFRAC:$(PROGS)/demos/tinyfrac/trunk/tinyfrac.asm \ + demos/trantest:DEMOS/TRANTEST:$(PROGS)/demos/trantest/trunk/trantest.asm \ + demos/tube:DEMOS/TUBE:$(PROGS)/demos/tube/trunk/tube.asm \ + demos/unvwater:DEMOS/UNVWATER:$(PROGS)/demos/unvwater/trunk/unvwater.asm \ + demos/web:DEMOS/WEB:$(PROGS)/demos/web/trunk/web.asm \ + develop/board:DEVELOP/BOARD:$(PROGS)/system/board/trunk/board.asm \ + develop/cObj:DEVELOP/cObj:$(PROGS)/develop/cObj/trunk/cObj.asm \ + develop/fasm:DEVELOP/FASM:$(PROGS)/develop/fasm/trunk/fasm.asm \ + develop/h2d2b:DEVELOP/H2D2B:$(PROGS)/develop/h2d2b/trunk/h2d2b.asm \ + develop/heed:DEVELOP/HEED:$(PROGS)/develop/heed/trunk/heed.asm \ + develop/ipc:DEVELOP/IPC:$(PROGS)/network/ipc/trunk/ipc.asm \ + develop/keyascii:DEVELOP/KEYASCII:$(PROGS)/develop/keyascii/trunk/keyascii.asm \ + develop/mtdbg:DEVELOP/MTDBG:$(PROGS)/develop/mtdbg/mtdbg.asm \ + develop/scancode:DEVELOP/SCANCODE:$(PROGS)/develop/scancode/trunk/scancode.asm \ + develop/t_edit:DEVELOP/T_EDIT:$(PROGS)/other/t_edit/t_edit.asm \ + develop/test_gets:DEVELOP/test_gets:$(PROGS)/develop/libraries/console/examples/test_gets.asm \ + develop/testcon2:DEVELOP/TESTCON2:$(PROGS)/develop/libraries/console/examples/testcon2.asm \ + develop/thread:DEVELOP/THREAD:$(PROGS)/develop/examples/thread/trunk/thread.asm \ + develop/info/asm.syn:DEVELOP/INFO/ASM.SYN:$(PROGS)/other/t_edit/info/asm_syn.asm \ + develop/info/cpp_kol_cla.syn:DEVELOP/INFO/CPP_KOL_CLA.SYN:$(PROGS)/other/t_edit/info/cpp_kol_cla_syn.asm \ + develop/info/cpp_kol_dar.syn:DEVELOP/INFO/CPP_KOL_DAR.SYN:$(PROGS)/other/t_edit/info/cpp_kol_dar_syn.asm \ + develop/info/cpp_kol_def.syn:DEVELOP/INFO/CPP_KOL_DEF.SYN:$(PROGS)/other/t_edit/info/cpp_kol_def_syn.asm \ + develop/info/default.syn:DEVELOP/INFO/DEFAULT.SYN:$(PROGS)/other/t_edit/info/default_syn.asm \ + develop/info/html.syn:DEVELOP/INFO/HTML.SYN:$(PROGS)/other/t_edit/info/html_syn.asm \ + develop/info/ini_files.syn:DEVELOP/INFO/INI_FILES.SYN:$(PROGS)/other/t_edit/info/ini_files_syn.asm \ + develop/info/win_const.syn:DEVELOP/INFO/WIN_CONST.SYN:$(PROGS)/other/t_edit/info/win_const_syn.asm \ + drivers/com_mouse.obj:DRIVERS/COM_MOUSE.OBJ:$(KERNEL)/drivers/com_mouse.asm \ + drivers/emu10k1x.obj:DRIVERS/EMU10K1X.OBJ:$(KERNEL)/drivers/emu10k1x.asm \ + drivers/fm801.obj:DRIVERS/FM801.OBJ:$(KERNEL)/drivers/fm801.asm \ + drivers/infinity.obj:DRIVERS/INFINITY.OBJ:$(KERNEL)/drivers/infinity.asm \ + drivers/ps2mouse.obj:DRIVERS/PS2MOUSE.OBJ:$(REPOSITORY)/drivers/mouse/ps2mouse4d/trunk/ps2mouse.asm \ + drivers/sb16.obj:DRIVERS/SB16.OBJ:$(KERNEL)/drivers/sb16/sb16.asm \ + drivers/sound.obj:DRIVERS/SOUND.OBJ:$(KERNEL)/drivers/sound.asm \ + drivers/vt8235.obj:DRIVERS/VT8235.OBJ:$(KERNEL)/drivers/vt823x.asm \ + File|Managers/kfar:File|Managers/KFAR:$(PROGS)/fs/kfar/trunk/kfar.asm \ + File|Managers/kfm:File|Managers/KFM:$(PROGS)/fs/kfm/trunk/kfm.asm \ + File|Managers/opendial:File|Managers/OPENDIAL:$(PROGS)/fs/opendial/opendial.asm \ + games/15:GAMES/15:$(PROGS)/games/15/trunk/15.ASM \ + games/arcanii:GAMES/ARCANII:$(PROGS)/games/arcanii/trunk/arcanii.asm \ + games/freecell:GAMES/FREECELL:$(PROGS)/games/freecell/freecell.asm \ + games/gomoku:GAMES/GOMOKU:$(PROGS)/games/gomoku/trunk/gomoku.asm \ + games/invaders:GAMES/INVADERS:$(PROGS)/games/invaders/invaders.asm \ + games/klavisha:GAMES/KLAVISHA:$(PROGS)/games/klavisha/trunk/klavisha.asm \ + games/lines:GAMES/LINES:$(PROGS)/games/lines/lines.asm \ + games/mblocks:GAMES/MBLOCKS:$(PROGS)/games/mblocks/trunk/mblocks.asm \ + games/msquare:GAMES/MSQUARE:$(PROGS)/games/MSquare/trunk/MSquare.asm \ + games/phenix:GAMES/PHENIX:$(PROGS)/games/phenix/trunk/phenix.asm \ + games/pipes:GAMES/PIPES:$(PROGS)/games/pipes/pipes.asm \ + games/pong:GAMES/PONG:$(PROGS)/games/pong/trunk/pong.asm \ + games/pong3:GAMES/PONG3:$(PROGS)/games/pong3/trunk/pong3.asm \ + games/rsquare:GAMES/RSQUARE:$(PROGS)/games/rsquare/trunk/rsquare.asm \ + games/snake:GAMES/SNAKE:$(PROGS)/games/snake/trunk/snake.asm \ + games/sq_game:GAMES/SQ_GAME:$(PROGS)/games/sq_game/trunk/SQ_GAME.ASM \ + games/sudoku:GAMES/SUDOKU:$(PROGS)/games/sudoku/trunk/sudoku.asm \ + games/sw:GAMES/SW:$(PROGS)/games/sw/trunk/sw.asm \ + games/tanks:GAMES/TANKS:$(PROGS)/games/tanks/trunk/tanks.asm \ + games/tetris:GAMES/TETRIS:$(PROGS)/games/tetris/trunk/tetris.asm \ + lib/archiver.obj:LIB/ARCHIVER.OBJ:$(PROGS)/fs/kfar/trunk/kfar_arc/kfar_arc.asm \ + lib/box_lib.obj:LIB/BOX_LIB.OBJ:$(PROGS)/develop/libraries/box_lib/trunk/box_lib.asm \ + lib/console.obj:LIB/CONSOLE.OBJ:$(PROGS)/develop/libraries/console/console.asm \ + lib/libgfx.obj:LIB/LIBGFX.OBJ:$(PROGS)/develop/libraries/libs-dev/libgfx/libgfx.asm \ + lib/libimg.obj:LIB/LIBIMG.OBJ:$(PROGS)/develop/libraries/libs-dev/libimg/libimg.asm \ + lib/libini.obj:LIB/LIBINI.OBJ:$(PROGS)/develop/libraries/libs-dev/libini/libini.asm \ + lib/libio.obj:LIB/LIBIO.OBJ:$(PROGS)/develop/libraries/libs-dev/libio/libio.asm \ + lib/network.obj:LIB/NETWORK.OBJ:$(PROGS)/develop/libraries/network/network.asm \ + lib/proc_lib.obj:LIB/PROC_LIB.OBJ:$(PROGS)/develop/libraries/proc_lib/trunk/proc_lib.asm \ + lib/cnv_png.obj:LIB/CNV_PNG.OBJ:$(PROGS)/media/zsea/plugins/png/cnv_png.asm \ + media/animage:MEDIA/ANIMAGE:$(PROGS)/media/animage/trunk/animage.asm \ + media/cdp:MEDIA/CDP:$(PROGS)/media/cdp/trunk/cdp.asm \ + media/kiv:MEDIA/KIV:$(PROGS)/media/kiv/trunk/kiv.asm \ + media/listplay:MEDIA/LISTPLAY:$(PROGS)/media/listplay/trunk/listplay.asm \ + media/midamp:MEDIA/MIDAMP:$(PROGS)/media/midamp/trunk/midamp.asm \ + media/startmus:MEDIA/STARTMUS:$(PROGS)/media/startmus/trunk/STARTMUS.ASM \ + network/airc:NETWORK/AIRC:$(PROGS)/network/airc/trunk/airc.asm \ + network/arpstat:NETWORK/ARPSTAT:$(PROGS)/network/arpstat/trunk/arpstat.asm \ + network/chess:NETWORK/CHESS:$(PROGS)/network/chess/trunk/chess.asm \ + network/downloader:NETWORK/DOWNLOADER:$(PROGS)/network/downloader/trunk/downloader.asm \ + network/ethstat:NETWORK/ETHSTAT:$(PROGS)/network/ethstat/trunk/ethstat.asm \ + network/ftps:NETWORK/FTPS:$(PROGS)/network/ftps/trunk/FTPS.ASM \ + network/https:NETWORK/HTTPS:$(PROGS)/network/https/trunk/https.asm \ + network/nntpc:NETWORK/NNTPC:$(PROGS)/network/nntpc/trunk/nntpc.asm \ + network/nslookup:NETWORK/NSLOOKUP:$(PROGS)/develop/libraries/network/examples/nslookup.asm \ + network/popc:NETWORK/POPC:$(PROGS)/network/popc/trunk/popc.asm \ + network/smtps:NETWORK/SMTPS:$(PROGS)/network/smtps/trunk/smtps.asm \ + network/stackcfg:NETWORK/STACKCFG:$(PROGS)/network/stackcfg/trunk/stackcfg.asm \ + network/telnet:NETWORK/TELNET:$(PROGS)/network/telnet/trunk/telnet.asm \ + network/tftpc:NETWORK/TFTPC:$(PROGS)/network/tftpc/trunk/tftpc.asm \ + network/VNCclient:NETWORK/VNCclient:$(PROGS)/network/VNCclient/VNCclient.asm \ + network/ym:NETWORK/YM:$(PROGS)/network/ym/trunk/ym.asm \ + network/zeroconf:NETWORK/ZEROCONF:$(PROGS)/network/zeroconf/trunk/zeroconf.asm \ +# end of list +# The list of all FASM programs with one main FASM file for CD image. +# Format of an item is exactly the same as in the previous list. +FASM_PROGRAMS_CD:=\ + drivers/atikms:DRIVERS/ATIKMS:$(REPOSITORY)/drivers/video/drm/radeon/atikms.asm \ +# end of list + +# The list of all FASM programs which needs to be compiled without KPACKing. +FASM_NOKPACK_PROGRAMS:=\ + distr_data/9x2klbr.exe:-:$(PROGS)/hd_load/9x2klbr/9x2klbr.asm \ + distr_data/MeOSload.com:-:$(PROGS)/hd_load/meosload/MeOSload.asm \ + distr_data/mtldr:-:$(PROGS)/hd_load/mtldr/mtldr.asm \ + mtldr_for_installer:-:$(PROGS)/hd_load/mtldr_install/mtldr_code/mtldr.asm \ + distr_data/mtldr_install.exe:-:$(PROGS)/hd_load/mtldr_install/mtldr_install.asm \ + distr_data/MeOSload_for_usb_boot_old.com:-:$(PROGS)/hd_load/usb_boot_old/MeOSload.asm \ + distr_data/enable_for_usb_boot_old.exe:-:$(PROGS)/hd_load/usb_boot_old/enable.asm \ + distr_data/BOOT_F32.BIN:-:$(PROGS)/hd_load/usb_boot/BOOT_F32.ASM \ + distr_data/MTLD_F32:-:$(PROGS)/hd_load/usb_boot/mtldr.asm \ + distr_data/inst.exe:-:$(PROGS)/hd_load/usb_boot/inst.asm \ + distr_data/setmbr.exe:-:$(PROGS)/hd_load/usb_boot/setmbr.asm \ +#end of list + +# The list of all NASM programs with one main NASM file. +# Format of an item is exactly the same as in the previous list. +NASM_PROGRAMS:=\ + demos/aclock:DEMOS/ACLOCK:$(PROGS)/demos/aclock/trunk/aclock.asm \ + games/c4:GAMES/C4:$(PROGS)/games/c4/trunk/c4.asm \ +# end of list + +# The list of files which should be copied from somewhere. +# Format of an item is exactly the same as in the previous list. +COPY_FILES:=\ + macros.inc:MACROS.INC:$(PROGS)/macros.inc \ + config.inc:CONFIG.INC:$(PROGS)/config.inc \ + struct.inc:STRUCT.INC:$(PROGS)/struct.inc \ + develop/te_icon.png:DEVELOP/TE_ICON.PNG:$(PROGS)/other/t_edit/te_icon.png \ + develop/tl_nod_16.png:DEVELOP/TL_NOD_16.PNG:$(PROGS)/other/t_edit/tl_nod_16.png \ + develop/tl_sys_16.png:DEVELOP/TL_SYS_16.PNG:$(PROGS)/media/log_el/trunk/tl_sys_16.png \ + develop/t_edit.ini:DEVELOP/T_EDIT.INI:$(PROGS)/other/t_edit/t_edit.ini \ + File|Managers/z_icons.png:File|Managers/Z_ICONS.PNG:$(PROGS)/fs/opendial/z_icons.png \ + File|Managers/kfm_keys.txt:File|Managers/KFM_KEYS.TXT:$(PROGS)/fs/kfm/trunk/docs/russian/dos_kolibri/kfm_keys.txt \ + File|Managers/buttons.bmp:File|Managers/BUTTONS.BMP:$(PROGS)/fs/kfm/trunk/buttons.bmp \ + File|Managers/icons.bmp:File|Managers/ICONS.BMP:$(PROGS)/fs/kfm/trunk/icons.bmp \ + fonts/litt.chr:FONTS/LITT.CHR:$(PROGS)/demos/bgitest/trunk/FONTS/LITT.CHR \ + games/snake.ini:GAMES/SNAKE.INI:$(PROGS)/games/snake/trunk/snake.ini \ + media/kiv.ini:MEDIA/KIV.INI:$(PROGS)/media/kiv/trunk/kiv.ini \ + .shell:.shell:$(PROGS)/system/shell/bin/rus/.shell \ + mykey.ini:MYKEY.INI:$(PROGS)/system/MyKey/trunk/mykey.ini \ +# end of list + +# The list of all C-- programs with one main C-- file. +# Format of an item is exactly the same as in the previous list, +# except that there can be fourth field with parameters for a compiler. +CMM_PROGRAMS:=\ + File|Managers/eolite:File|Managers/EOLITE:$(PROGS)/fs/Eolite/trunk/Eolite.c-- \ + games/clicks:GAMES/CLICKS:$(PROGS)/games/clicks/trunk/clicks.c \ + games/FindNumbers:GAMES/FindNumbers:$(PROGS)/games/FindNumbers/trunk/FindNumbers.c-- \ + games/flood-it:GAMES/flood-it:$(PROGS)/games/flood-it/trunk/flood-it.c \ + games/mine:GAMES/MINE:$(PROGS)/games/mine/trunk/mine.c--:/MEOS \ + HTMLv:HTMLv:$(PROGS)/network/htmlv/browser/HTMLv.c \ +# end of list + +# List of other files to be included in the image file. +# Some of them are auto-built with special rules, some just exist before build. +# Each item is of the form :. +# Spaces should be represented as |. +# +# yogev_ezra: Removed '3dsheart' to free some space on RAMDISK. This demo has 90% in common with VIEW3DS +OTHER_FILES:=autorun.dat:AUTORUN.DAT \ + background.gif:background.gif default.skn:DEFAULT.SKN \ + e80:E80 graph:GRAPH hdread:HDREAD \ + icons.dat:ICONS.DAT iconstrp.png:ICONSTRP.PNG index_htm:INDEX.HTM \ + kernel.mnt:KERNEL.MNT kerpack:KERPACK keymap.key:KEYMAP.KEY \ + kuzkina.mid:KUZKINA.MID lang.inc:LANG.INC lang.ini:LANG.INI \ + menu.dat:MENU.DAT \ + panel.ini:PANEL.INI pipetka:PIPETKA setup.dat:SETUP.DAT \ + shell:SHELL table:TABLE vmode:VMODE \ + 3d/cubeline:3D/CUBELINE 3d/gears:3D/GEARS 3d/house.3ds:3D/HOUSE.3DS \ + demos/ak47.lif:DEMOS/AK47.LIF \ + demos/barge.lif:DEMOS/BARGE.LIF demos/life2:DEMOS/LIFE2 \ + demos/relay.lif:DEMOS/RELAY.LIF demos/rpento.lif:DEMOS/RPENTO.LIF \ + demos/use_mb:DEMOS/USE_MB \ + File|Managers/eolite.ini:File|Managers/EOLITE.INI \ + File|Managers/icons.ini:File|Managers/ICONS.INI \ + File|Managers/kfar.ini:File|Managers/KFAR.INI \ + File|Managers/kfm.ini:File|Managers/KFM.INI \ + games/appdata.dat:GAMES/APPDATA.DAT games/ataka:GAMES/ATAKA \ + games/basekurs.kla:GAMES/BASEKURS.KLA games/checkers:GAMES/CHECKERS \ + games/kosilka:GAMES/KOSILKA games/kosskin.gfx:GAMES/KOSSKIN.GFX \ + games/megamaze:GAMES/MEGAMAZE games/padenie:GAMES/PADENIE \ + games/reversi:GAMES/REVERSI games/rforces:GAMES/RFORCES \ + games/whowtbam:GAMES/WHOWTBAM games/xonix:GAMES/XONIX \ + lib/msgbox.obj:LIB/MSGBOX.OBJ \ + lib/pixlib.obj:LIB/PIXLIB.OBJ lib/sort.obj:LIB/SORT.OBJ \ + drivers/intel_hda.obj:DRIVERS/intel_hda.obj \ + media/ac97snd:MEDIA/AC97SND \ + network/jmail:NETWORK/JMAIL network/zeroconf.ini:NETWORK/ZEROCONF.INI \ +#end of list +#3d/logio.bmp:3D/LOGIO.BMP 3d/cubetext:3D/CUBETEXT + +# Generate skins list understandable by gnu make +Makefile.skins: $(REPOSITORY)/skins/authors.txt $(REPOSITORY)/data/generate_makefile_skins.sh + cut -f1 $< | $(SHELL) $(REPOSITORY)/data/generate_makefile_skins.sh > $@ +include Makefile.skins + +# Extra targets for LiveCD image in the syntax of mkisofs +MKISOFS_EXTRA:=\ + dosbox/=$(PROGS)/emulator/DosBox/dosbox \ + dosbox/=$(PROGS)/emulator/DosBox/dosbox.conf \ + dosbox/=$(PROGS)/emulator/DosBox/readme.txt \ + /=drivers/atikms \ + /=drivers/atikms.dll \ + /=distr_data/autorun.inf \ + /=distr_data/KolibriOS_icon.ico \ + /=distr_data/readme.txt \ + /=distr_data/readme_dos.txt \ + Skins/=$(REPOSITORY)/skins/authors.txt \ + Docs/cp866/config.txt=docs/CONFIG.TXT \ + Docs/cp866/gnu.txt=docs/GNU.TXT \ + Docs/cp866/history.txt=docs/HISTORY.TXT \ + Docs/cp866/hot_keys.txt=docs/HOT_KEYS.TXT \ + Docs/cp866/install.txt=docs/INSTALL.TXT \ + Docs/cp866/readme.txt=docs/README.TXT \ + Docs/cp866/stack_ru.txt=docs/STACK_RU.TXT \ + Docs/cp866/sysfuncr.txt=docs/SYSFUNCR.TXT \ + Docs/cp1251/config.txt=docs/CONFIG.WIN.TXT \ + Docs/cp1251/gnu.txt=docs/GNU.WIN.TXT \ + Docs/cp1251/history.txt=docs/HISTORY.WIN.TXT \ + Docs/cp1251/hot_keys.txt=docs/HOT_KEYS.WIN.TXT \ + Docs/cp1251/install.txt=docs/INSTALL.WIN.TXT \ + Docs/cp1251/readme.txt=docs/README.WIN.TXT \ + Docs/cp1251/stack_ru.txt=docs/STACK_RU.WIN.TXT \ + Docs/cp1251/sysfuncr.txt=docs/SYSFUNCR.WIN.TXT \ + HD_Load/9x2klbr/=distr_data/9x2klbr.exe \ + HD_Load/9x2klbr/=../common/HD_load/9x2klbr/LDKLBR.VXD \ + HD_Load/9x2klbr/=$(PROGS)/hd_load/9x2klbr/readme_dos.txt \ + HD_Load/9x2klbr/=$(PROGS)/hd_load/9x2klbr/readme_win.txt \ + HD_Load/MeOSLoad/=distr_data/MeOSload.com \ + HD_Load/MeOSLoad/=$(PROGS)/hd_load/meosload/AUTOEXEC.BAT \ + HD_Load/MeOSLoad/=$(PROGS)/hd_load/meosload/CONFIG.SYS \ + HD_Load/MeOSLoad/=$(PROGS)/hd_load/meosload/L_readme.txt \ + HD_Load/MeOSLoad/=$(PROGS)/hd_load/meosload/L_readme_Win.txt \ + HD_Load/mtldr/=distr_data/mtldr \ + HD_Load/mtldr/=$(PROGS)/hd_load/mtldr/install.txt \ + HD_Load/mtldr/=$(PROGS)/hd_load/mtldr/vista_install.bat \ + HD_Load/mtldr/=$(PROGS)/hd_load/mtldr/vista_remove.bat \ + HD_Load/=distr_data/mtldr_install.exe \ + HD_Load/memdisk=../common/HD_load/memdisk \ + HD_Load/USB_Boot/=distr_data/BOOT_F32.BIN \ + HD_Load/USB_Boot/=distr_data/MTLD_F32 \ + HD_Load/USB_Boot/=distr_data/inst.exe \ + HD_Load/USB_Boot/=distr_data/setmbr.exe \ + HD_Load/USB_Boot/=$(PROGS)/hd_load/usb_boot/readme.txt \ + HD_Load/USB_boot_old/=$(PROGS)/hd_load/usb_boot_old/usb_boot.rtf \ + HD_Load/USB_boot_old/=$(PROGS)/hd_load/usb_boot_old/usb_boot_866.txt \ + HD_Load/USB_boot_old/=$(PROGS)/hd_load/usb_boot_old/usb_boot_1251.txt \ + HD_Load/USB_boot_old/MeOSload.com=distr_data/MeOSload_for_usb_boot_old.com \ + HD_Load/USB_boot_old/enable.exe=distr_data/enable_for_usb_boot_old.exe \ + games/=../common/games \ + games/fara=games/fara \ + games/soko/soko=games/soko \ +#end of list + +# Text files which need to be recoded to cp1251 from native aka cp866 +RECODE_TEXT_FILES:=\ + distr_data/readme.txt:distr_data/readme_dos.txt \ + docs/CONFIG.WIN.TXT:docs/CONFIG.TXT \ + docs/GNU.WIN.TXT:docs/GNU.TXT \ + docs/HISTORY.WIN.TXT:docs/HISTORY.TXT \ + docs/HOT_KEYS.WIN.TXT:docs/HOT_KEYS.TXT \ + docs/INSTALL.WIN.TXT:docs/INSTALL.TXT \ + docs/README.WIN.TXT:docs/README.TXT \ + docs/STACK_RU.WIN.TXT:docs/STACK_RU.TXT \ + docs/SYSFUNCR.WIN.TXT:docs/SYSFUNCR.TXT \ +#end of list + +# Some macro for convenient work. +# Macros for replacing '|' to escaped space '\ '. +space:=\ #plus space +respace=$(subst |,$(space),$(1)) +# Macro for selecting different parts of ':'-separated items. +binarypart=$(word 1,$(subst :, ,$(1))) +imagepart=$(word 2,$(subst :, ,$(1))) +sourcepart=$(word 3,$(subst :, ,$(1))) +parampart=$(word 4,$(subst :, ,$(1))) +# Get file names, possibly with spaces inside, from an item. +# Here $(f) is an item - in fact, macro argument. +fbinary=$(call respace,$(call binarypart,$(f))) +fimage=$(call respace,$(call imagepart,$(f))) +fsource=$(call respace,$(call sourcepart,$(f))) +fparam=$(call respace,$(call parampart,$(f))) + +# Define targets for image file. +# Join all the lists above. +targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS) +# For each item in the united list call fbinary. +targets:=$(foreach f,$(targets_full),$(fbinary)) + +# Define a command for copying a file inside the image. +# mcopy_command is a macro with two parameters, +# local file name $(1) and image file name $(2). +# Note that spaces in these have to be escaped with backslashes. +mcopy_command=mcopy -moi $(BUILD_DIR)/kolibri.img $(1) ::$(2) +# Specialize a previous command for an item $(f) in one of lists. +mcopy_item_command=$(call mcopy_command,$(fbinary),$(fimage)) + +# Join all $(mcopy_item_command) for all items, +# append newline after each item. +# The first newline character after "define" line and +# the last newline character before "endef" line get away +# with define/endef, so we make three newline characters, +# that is two empty lines, in order to get one in $(newline). +define newline + + +endef +mcopy_all_items:=$(foreach f,$(targets_full),$(mcopy_item_command)$(newline)) + +# add skins to MKISOFS_EXTRA +MKISOFS_EXTRA:=$(MKISOFS_EXTRA) $(foreach f,$(SKIN_SOURCES),$(call imagepart,$(f))=$(call binarypart,$(f))) +# dependencies of MKISOFS_EXTRA; we iterate through $(MKISOFS_EXTRA), +# substitute "=" with space, get the 2nd word and join all results +mkisofs_extra_targets:=$(call respace,$(foreach f,$(MKISOFS_EXTRA),$(word 2,$(subst =, ,$(f))))) + +# The first goal: floppy image. +$(BUILD_DIR)/kolibri.img: $(BUILD_DIR)/.dir \ + Makefile \ + $(BUILD_DIR)/boot_fat12.bin \ + $(targets) +# SYSXTREE +# 3d/CUBETEXT +# 3d/LOGIO.BMP + str=`LANG=ru_RU.utf8 date -u +"[автосборка %d %b %Y %R, r$(REV)]"|iconv -f utf8 -t cp866`; \ + echo -n $$str|dd of=kernel.mnt bs=1 seek=`expr 279 - length "$$str"` conv=notrunc 2>/dev/null + dd if=/dev/zero of=$(BUILD_DIR)/kolibri.img count=2880 bs=512 2>&1 + mformat -f 1440 -i $(BUILD_DIR)/kolibri.img :: + dd if=$(BUILD_DIR)/boot_fat12.bin of=$(BUILD_DIR)/kolibri.img count=1 bs=512 conv=notrunc 2>&1 + mmd -i $(BUILD_DIR)/kolibri.img ::3D + mmd -i $(BUILD_DIR)/kolibri.img ::DEMOS + mmd -i $(BUILD_DIR)/kolibri.img ::DEVELOP + mmd -i $(BUILD_DIR)/kolibri.img ::DEVELOP/INFO + mmd -i $(BUILD_DIR)/kolibri.img ::DRIVERS + mmd -i $(BUILD_DIR)/kolibri.img ::File\ Managers + mmd -i $(BUILD_DIR)/kolibri.img ::FONTS + mmd -i $(BUILD_DIR)/kolibri.img ::GAMES + mmd -i $(BUILD_DIR)/kolibri.img ::LIB + mmd -i $(BUILD_DIR)/kolibri.img ::MEDIA + mmd -i $(BUILD_DIR)/kolibri.img ::NETWORK + $(mcopy_all_items) + +# The second goal: LiveCD image. +$(BUILD_DIR)/kolibri.iso: $(BUILD_DIR)/kolibri.img $(mkisofs_extra_targets) + mkisofs -U -J -pad -b kolibri.img -c boot.catalog -hide-joliet boot.catalog -graft-points \ + -A "KolibriOS AutoBuilder" -p "CleverMouse" -publisher "KolibriOS Team" -V "KolibriOS r$(REV)" -sysid "KOLIBRI" \ + -iso-level 3 -o $(BUILD_DIR)/kolibri.iso $(BUILD_DIR)/kolibri.img $(call respace,$(MKISOFS_EXTRA)) 2>&1 + +# Special targets to modify behaviour of make. +.DELETE_ON_ERROR: +.SUFFIXES: # disable all predefined rules + +# The floppy bootsector. +$(BUILD_DIR)/boot_fat12.bin: $(KERNEL)/bootloader/boot_fat12.asm $(KERNEL)/bootloader/floppy1440.inc + fasm $(KERNEL)/bootloader/boot_fat12.asm $(BUILD_DIR)/boot_fat12.bin + +$(BUILD_DIR)/.dir 3d/.dir demos/.dir develop/.dir develop/info/.dir drivers/.dir fonts/.dir \ + games/.dir lib/.dir media/.dir network/.dir allskins/.dir distr_data/.dir .deps/.dir: + mkdir -p $(dir $@) + touch $@ +develop/info/.dir: develop/.dir +File\ Managers/.dir: + mkdir -p "File Managers" + touch "File Managers/.dir" + +# extra dependency for mtldr_install.exe +distr_data/mtldr_install.exe: mtldr_for_installer + +# FASM black magic goes to Makefile.fasm. +include Makefile.fasm + +# Similar for NASM. +include Makefile.nasm + +# Similar for copying files. +include Makefile.copy + +# Special rules for copying sysfuncr.txt - it isn't directly included in the image. +docpack: $(DOCDIR)SYSFUNCR.TXT +$(DOCDIR)SYSFUNCR.TXT: $(KERNEL)/docs/sysfuncr.txt + cp $(KERNEL)/docs/sysfuncr.txt $(DOCDIR)SYSFUNCR.TXT + +# Similar for C--. +include Makefile.cmm + +# Recode some text files from native encoding aka cp866 to cp1251 +define recode_meta_rule +$(1): $(2) + iconv -f cp866 -t cp1251 "$$<" > "$$@" +endef +$(foreach f, $(RECODE_TEXT_FILES), $(eval $(call recode_meta_rule,$(fbinary),$(fimage)))) + +# Sorry, even black magic seems to be insufficient for +# auto-handling all subtle effects. So we just define +# command lines for compiling and linking, and +# maintain the list of sources and objects by hand. +include Makefile.msvc + +# Rules for table +table: .obj.table/table.exe + $(msvc_final) +TABLE_OBJECTS:=.obj.table/calc.obj .obj.table/func.obj .obj.table/hello.obj \ + .obj.table/KosFile.obj .obj.table/kosSyst.obj .obj.table/math2.obj \ + .obj.table/mcsmemm.obj .obj.table/parser.obj +TABLE_H_FILES:=$(wildcard $(PROGS)/other/table/*.h) +.obj.table/table.exe: $(TABLE_OBJECTS) + $(msvc_link) +$(TABLE_OBJECTS): .obj.table/%.obj: $(PROGS)/other/table/%.cpp $(TABLE_H_FILES) Makefile.msvc | .obj.table + $(msvc_compile) +.obj.table: + mkdir -p .obj.table + +# Rules for graph +graph: .obj.graph/graph.exe + $(msvc_final) +GRAPH_CPP_OBJECTS:=.obj.graph/func.obj .obj.graph/hello.obj .obj.graph/kolibri.obj \ + .obj.graph/KosFile.obj .obj.graph/kosSyst.obj .obj.graph/math2.obj \ + .obj.graph/mcsmemm.obj .obj.graph/parser.obj +GRAPH_C_OBJECTS:=.obj.graph/string.obj +GRAPH_H_FILES:=$(wildcard $(PROGS)/other/graph/*.h) +GRAPH_FASM_OBJECTS:=.obj.graph/memcpy.obj .obj.graph/memset.obj +.obj.graph/graph.exe: $(GRAPH_CPP_OBJECTS) $(GRAPH_C_OBJECTS) $(GRAPH_FASM_OBJECTS) + $(msvc_link) +$(GRAPH_CPP_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.cpp $(GRAPH_H_FILES) Makefile.msvc | .obj.graph + $(msvc_compile) +$(GRAPH_C_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.c $(GRAPH_H_FILES) Makefile.msvc | .obj.graph + $(msvc_compile) +$(GRAPH_FASM_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.asm Makefile.msvc | .obj.graph + fasm $< $@ +.obj.graph: + mkdir -p .obj.graph + +# Rules for kosilka +games/kosilka: .obj.kosilka/kosilka.exe + $(msvc_final) +KOSILKA_OBJECTS:=.obj.kosilka/kosilka.obj .obj.kosilka/KosFile.obj .obj.kosilka/kosSyst.obj .obj.kosilka/mcsmemm.obj +KOSILKA_H_FILES:=$(PROGS)/games/kosilka/*.h +.obj.kosilka/kosilka.exe: $(KOSILKA_OBJECTS) + $(msvc_link) +$(KOSILKA_OBJECTS): .obj.kosilka/%.obj: $(PROGS)/games/kosilka/%.cpp $(KOSILKA_H_FILES) Makefile.msvc | .obj.kosilka + $(msvc_compile) +.obj.kosilka: + mkdir -p .obj.kosilka + +include Makefile.gcc + +# Rules for shell +shell: .obj.shell/start.o .obj.shell/shell.o .obj.shell/kolibri.o .obj.shell/stdlib.o .obj.shell/string.o .obj.shell/ctype.o \ + $(PROGS)/system/shell/kolibri.ld + $(call gcc_link,$(PROGS)/system/shell/kolibri.ld) +.obj.shell/shell.o: $(PROGS)/system/shell/shell.c \ + $(PROGS)/system/shell/all.h \ + $(PROGS)/system/shell/system/*.h \ + $(PROGS)/system/shell/cmd/*.c \ + $(PROGS)/system/shell/modules/*.c \ + $(PROGS)/system/shell/locale/rus/globals.h \ + Makefile.gcc | .obj.shell + $(gcc_compile) +.obj.shell/kolibri.o .obj.shell/stdlib.o .obj.shell/string.o .obj.shell/ctype.o: .obj.shell/%.o: \ + $(PROGS)/system/shell/system/%.c $(PROGS)/system/shell/system/*.h \ + Makefile.gcc | .obj.shell + $(gcc_compile) +.obj.shell/start.o: $(PROGS)/system/shell/start.asm | .obj.shell + fasm $< $@ +.obj.shell: + mkdir -p .obj.shell + +# Rules for e80 +E80DIR=$(PROGS)/emulator/e80/trunk +e80: .obj.e80/start.o .obj.e80/kolibri.o .obj.e80/stdlib.o .obj.e80/string.o .obj.e80/z80.o .obj.e80/e80.o + $(call gcc_link,$(E80DIR)/kolibri.ld) +.obj.e80/e80.o: $(E80DIR)/e80.c $(E80DIR)/48.h \ + $(E80DIR)/system/*.h $(E80DIR)/system/msgbox.c \ + $(E80DIR)/z80/z80.h Makefile.gcc | .obj.e80 + $(gcc_compile) +.obj.e80/kolibri.o .obj.e80/stdlib.o .obj.e80/string.o: .obj.e80/%.o: \ + $(E80DIR)/system/%.c $(E80DIR)/system/*.h Makefile.gcc | .obj.e80 + $(gcc_compile) +.obj.e80/z80.o: $(E80DIR)/z80/z80.c $(E80DIR)/z80/* + $(gcc_compile) +.obj.e80/start.o: $(E80DIR)/asm_code.asm | .obj.e80 + fasm $< $@ +.obj.e80: + mkdir -p .obj.e80 + +# Rules for sdk/sound, used by media/ac97snd +SOUNDDIR=$(PROGS)/develop/sdk/trunk/sound/src +SOUND_OBJECTS:=$(patsubst $(SOUNDDIR)/%.asm,.sdk/%.obj,$(wildcard $(SOUNDDIR)/*.asm)) +SOUND_INC_FILES:=$(wildcard $(SOUNDDIR)/*.inc) +.sdk/sound.lib: $(SOUND_OBJECTS) + win32-link /lib /out:$@ $^ +$(SOUND_OBJECTS): .sdk/%.obj: $(SOUNDDIR)/%.asm $(SOUND_INC_FILES) | .sdk + fasm $< $@ +.sdk: + mkdir -p .sdk +# Rules for media/ac97snd +AC97DIR=$(PROGS)/media/ac97snd +media/ac97snd: .obj.ac97snd/ac97snd.exe + $(msvc_final) +.obj.ac97snd/ac97snd.exe: .obj.ac97snd/ac97wav.obj .obj.ac97snd/crt.obj .obj.ac97snd/k_lib.obj \ + .obj.ac97snd/mpg.lib .sdk/sound.lib .obj.ac97snd/ufmod.obj + $(msvc_link) +.obj.ac97snd/ac97wav.obj: $(AC97DIR)/ac97snd/ac97wav.c \ + $(AC97DIR)/kolibri.h $(AC97DIR)/ac97snd/ac97wav.h $(AC97DIR)/mpg/mpg123.h \ + $(AC97DIR)/sound.h $(AC97DIR)/ufmod-codec.h Makefile.msvc | .obj.ac97snd + $(msvc_compile) +.obj.ac97snd/crt.obj: $(AC97DIR)/ac97snd/crt.c $(AC97DIR)/ac97snd/crt.h Makefile.msvc | .obj.ac97snd + $(msvc_compile) +.obj.ac97snd/k_lib.obj: $(AC97DIR)/ac97snd/k_lib.asm $(AC97DIR)/ac97snd/proc32.inc | .obj.ac97snd + fasm $< $@ +.obj.ac97snd/ufmod.obj: $(AC97DIR)/ufmod-config.asm | .obj.ac97snd + fasm $< $@ -s .deps/ac97snd-ufmod.fas + prepsrc .deps/ac97snd-ufmod.fas /dev/stdout | \ + perl -n -e 's|\\|/|g;s| |\\ |g;push @a,$$1 if/^;include\\ \x27(.*?)\x27/;' \ + -e 'END{$$a=join " \\\n ",@a;print "$@: $$a\n$$a:\n"}' > .deps/ac97snd-ufmod.Po +-include .deps/ac97snd-ufmod.Po +AC97SND_MPG_C_FILES:=$(wildcard $(AC97DIR)/mpg/*.c) +AC97SND_MPG_H_FILES:=$(wildcard $(AC97DIR)/mpg/*.h) +AC97SND_MPG_C_OBJECTS:=$(patsubst $(AC97DIR)/mpg/%.c,.obj.ac97snd/%.o,$(AC97SND_MPG_C_FILES)) +.obj.ac97snd/mpg.lib: $(AC97SND_MPG_C_OBJECTS) .obj.ac97snd/pow.obj + win32-link /lib /ltcg /out:$@ $^ +$(AC97SND_MPG_C_OBJECTS): .obj.ac97snd/%.o: $(AC97DIR)/mpg/%.c $(AC97SND_MPG_H_FILES) Makefile.msvc | .obj.ac97snd + $(msvc_compile) +.obj.ac97snd/pow.obj: $(AC97DIR)/mpg/pow.asm $(AC97DIR)/mpg/proc32.inc | .obj.ac97snd + fasm $< $@ +.obj.ac97snd: + mkdir -p .obj.ac97snd + +# Rules for atikms.dll +# Use Makefile from $(REPOSITORY)/drivers/ddk and $(REPOSITORY)/drivers/video/drm/radeon +# However, dependencies must be duplicated - I don't know how to avoid this +# without need to rebuild kolibri.img at every iteration... +# Note that we are going to write in the directory shared +# between all Makefiles, so we need locked operations. +drivers/atikms.dll: $(REPOSITORY)/drivers/video/drm/radeon/atikms.dll drivers/.dir + kpack --nologo $< $@ +$(REPOSITORY)/drivers/video/drm/radeon/atikms.dll: $(REPOSITORY)/drivers/video/drm/radeon/Makefile.lto + flock $(REPOSITORY)/drivers/video/drm/radeon/.lock \ + $(MAKE) CC=win32-gcc45 AS=win32-as LD=win32-ld AR=win32-ar FASM=fasm -C $(REPOSITORY)/drivers/video/drm/radeon -f Makefile.lto +$(REPOSITORY)/drivers/ddk/libddk.a: $(REPOSITORY)/drivers/ddk/Makefile + flock $(REPOSITORY)/drivers/ddk/.lock \ + $(MAKE) CC=win32-gcc45 AS=win32-as LD=win32-ld AR=win32-ar FASM=fasm -C $(REPOSITORY)/drivers/ddk libddk.a +$(REPOSITORY)/drivers/ddk/libcore.a: $(REPOSITORY)/drivers/ddk/Makefile + flock $(REPOSITORY)/drivers/ddk/.lock \ + $(MAKE) CC=win32-gcc45 AS=win32-as LD=win32-ld AR=win32-ar FASM=fasm -C $(REPOSITORY)/drivers/ddk libcore.a +# dependencies +$(REPOSITORY)/drivers/video/drm/radeon/atikms.dll: \ + $(REPOSITORY)/drivers/video/drm/radeon/atikms.lds \ + $(REPOSITORY)/drivers/ddk/libddk.a \ + $(REPOSITORY)/drivers/ddk/libcore.a \ + $(REPOSITORY)/drivers/video/drm/radeon/*.[Sch] \ + $(REPOSITORY)/drivers/video/drm/radeon/*.asm \ + $(REPOSITORY)/drivers/video/drm/radeon/Makefile \ + $(REPOSITORY)/drivers/video/drm/radeon/firmware/*.bin \ + $(REPOSITORY)/drivers/include/*.h \ + $(REPOSITORY)/drivers/include/*/*.h \ + $(REPOSITORY)/drivers/include/*/*/*.h \ + $(REPOSITORY)/drivers/include/*/*/*/*.h +$(REPOSITORY)/drivers/ddk/libddk.a: \ + $(REPOSITORY)/drivers/ddk/*/* \ + $(REPOSITORY)/drivers/include/*.h \ + $(REPOSITORY)/drivers/include/*/*.h \ + $(REPOSITORY)/drivers/include/*/*/*.h \ + $(REPOSITORY)/drivers/include/*/*/*/*.h +$(REPOSITORY)/drivers/ddk/libcore.a: \ + $(REPOSITORY)/drivers/ddk/core.S diff --git a/programs/other/t_edit/t_button.inc b/programs/other/t_edit/t_button.inc index d5b9c07a6..24a3e41be 100644 --- a/programs/other/t_edit/t_button.inc +++ b/programs/other/t_edit/t_button.inc @@ -17,8 +17,6 @@ struct symbol td dd ? ;+14 ६. 㤠 ends - -hed db 'TextEditor 1.06.12',0 ; sc system_colors bmp_icon dd 0 @@ -112,15 +110,15 @@ ted_but_open_file: stdcall [mb_create],msgbox_9,thread ;message: error run 'open file dialog' jmp .ret_f @@: - cmp [OpenDialog_data.status],1 + cmp [OpenDialog_data.status],1 jne .ret_f - mov esi,[OpenDialog_data.openfile_path] - call strlen - mov [edit1.size],eax - mov [edit1.pos],eax - stdcall [edit_box_draw], edit1 - stdcall [ted_open_file], tedit0,run_file_70,[edit1.text] - call ted_messages_after_open_file + mov esi,[OpenDialog_data.openfile_path] + call strlen + mov [edit1.size],eax + mov [edit1.pos],eax + stdcall [edit_box_draw], edit1 + stdcall [ted_open_file], tedit0,run_file_70,[edit1.text] + call ted_messages_after_open_file .ret_f: popad ret diff --git a/programs/other/t_edit/t_data.inc b/programs/other/t_edit/t_data.inc index b83c349ad..3a04891b8 100644 --- a/programs/other/t_edit/t_data.inc +++ b/programs/other/t_edit/t_data.inc @@ -2,6 +2,30 @@ fn_col_option dd def_col_file fn_syntax_dir db 'info/',0 def_col_file db 'default.syn',0 +;祭 㬮砭, ini 䠩 +ini_def_window_t equ 10 +ini_def_window_l equ 10 +ini_def_window_w equ 485 +ini_def_window_h equ 320 +ini_def_symbol_w equ 7 +ini_def_symbol_h equ 10 +ini_def_scroll_type equ 0 +;ᠭ ࠬ஢ ini 䠩 +ini_name db 't_edit.ini',0 +ini_sec_window db 'Window',0 +key_window_t db 't',0 +key_window_l db 'l',0 +key_window_w db 'w',0 +key_window_h db 'h',0 +key_symbol_w db 'symbol_w',0 +key_symbol_h db 'symbol_h',0 +key_scroll_type db 'scroll_type',0 +ini_sec_options db 'Options',0 + +align 4 +wnd_s_pos: ; ஥ ⮢ 樨 + rq 0 + system_dir_0 db '/sys/lib/' lib_name_0 db 'box_lib.obj',0 @@ -14,6 +38,10 @@ lib_name_2 db 'proc_lib.obj',0 system_dir_3 db '/sys/lib/' lib_name_3 db 'libimg.obj',0 +system_dir_4 db '/sys/lib/' +lib_name_4 db 'libini.obj',0 + + ;--------------------------------------------------------------------- align 4 import_box_lib: @@ -24,14 +52,6 @@ import_box_lib: edit_box_mouse dd aEdit_box_mouse ;version_ed dd aVersion_ed - ;check_box_draw dd aCheck_box_draw - ;check_box_mouse dd aCheck_box_mouse - ;version_ch dd aVersion_ch - - ;option_box_draw dd aOption_box_draw - ;option_box_mouse dd aOption_box_mouse - ;version_op dd aVersion_op - scrollbar_ver_draw dd aScrollbar_ver_draw scrollbar_ver_mouse dd aScrollbar_ver_mouse scrollbar_hor_draw dd aScrollbar_hor_draw @@ -61,7 +81,7 @@ import_box_lib: tl_cur_beg dd sz_tl_cur_beg tl_cur_next dd sz_tl_cur_next tl_cur_perv dd sz_tl_cur_perv - tl_node_close_open dd sz_tl_node_close_open + ;tl_node_close_open dd sz_tl_node_close_open tl_node_lev_inc dd sz_tl_node_lev_inc tl_node_lev_dec dd sz_tl_node_lev_dec @@ -99,14 +119,6 @@ dd 0,0 aEdit_box_mouse db 'edit_box_mouse',0 ;aVersion_ed db 'version_ed',0 - ;aCheck_box_draw db 'check_box_draw',0 - ;aCheck_box_mouse db 'check_box_mouse',0 - ;aVersion_ch db 'version_ch',0 - - ;aOption_box_draw db 'option_box_draw',0 - ;aOption_box_mouse db 'option_box_mouse',0 - ;aVersion_op db 'version_op',0 - aScrollbar_ver_draw db 'scrollbar_v_draw',0 aScrollbar_ver_mouse db 'scrollbar_v_mouse',0 aScrollbar_hor_draw db 'scrollbar_h_draw',0 @@ -136,7 +148,7 @@ dd 0,0 sz_tl_cur_beg db 'tl_cur_beg',0 sz_tl_cur_next db 'tl_cur_next',0 sz_tl_cur_perv db 'tl_cur_perv',0 - sz_tl_node_close_open db 'tl_node_close_open',0 + ;sz_tl_node_close_open db 'tl_node_close_open',0 sz_tl_node_lev_inc db 'tl_node_lev_inc',0 sz_tl_node_lev_dec db 'tl_node_lev_dec',0 @@ -187,49 +199,27 @@ dd 0,0 align 4 import_libimg: dd alib_init1 - ;img_is_img dd aimg_is_img - ;img_info dd aimg_info - ;img_from_file dd aimg_from_file - ;img_to_file dd aimg_to_file - ;img_from_rgb dd aimg_from_rgb - ;img_to_rgb dd aimg_to_rgb img_to_rgb2 dd aimg_to_rgb2 img_decode dd aimg_decode - ;img_encode dd aimg_encode - ;img_create dd aimg_create img_destroy dd aimg_destroy - ;img_destroy_layer dd aimg_destroy_layer - ;img_count dd aimg_count - ;img_lock_bits dd aimg_lock_bits - ;img_unlock_bits dd aimg_unlock_bits - ;img_flip dd aimg_flip - ;img_flip_layer dd aimg_flip_layer - ;img_rotate dd aimg_rotate - ;img_rotate_layer dd aimg_rotate_layer - ;img_draw dd aimg_draw dd 0,0 alib_init1 db 'lib_init',0 - ;aimg_is_img db 'img_is_img',0 ;। , ⥪ ᤥ ࠦ - ;aimg_info db 'img_info',0 - ;aimg_from_file db 'img_from_file',0 - ;aimg_to_file db 'img_to_file',0 - ;aimg_from_rgb db 'img_from_rgb',0 - ;aimg_to_rgb db 'img_to_rgb',0 ;८ࠧ ࠦ RGB aimg_to_rgb2 db 'img_to_rgb2',0 aimg_decode db 'img_decode',0 ;⮬᪨ । ଠ ᪨ - ;aimg_encode db 'img_encode',0 - ;aimg_create db 'img_create',0 aimg_destroy db 'img_destroy',0 - ;aimg_destroy_layer db 'img_destroy_layer',0 - ;aimg_count db 'img_count',0 - ;aimg_lock_bits db 'img_lock_bits',0 - ;aimg_unlock_bits db 'img_unlock_bits',0 - ;aimg_flip db 'img_flip',0 - ;aimg_flip_layer db 'img_flip_layer',0 - ;aimg_rotate db 'img_rotate',0 - ;aimg_rotate_layer db 'img_rotate_layer',0 - ;aimg_draw db 'img_draw',0 +align 4 +import_libini: + dd alib_init2 + ini_get_str dd aini_get_str + ini_get_int dd aini_get_int + ini_get_color dd aini_get_color +dd 0,0 + alib_init2 db 'lib_init',0 + aini_get_str db 'ini_get_str',0 + aini_get_int db 'ini_get_int',0 + aini_get_color db 'ini_get_color',0 + ;--------------------------------------------------------------------- align 4 wScr: @@ -240,7 +230,7 @@ wScr: .size_y dw 300 ; +4 .start_y dw 50 ; +6 .btn_high dd 15 ; +8 -.type dd 0 ;+12 +.type dd ini_def_scroll_type ;+12 .max_area dd 100 ;+16 .cur_area dd 30 ;+20 .position dd 0 ;+24 @@ -274,7 +264,7 @@ hScr: .size_y dw 16 ;+4 .start_y dw 50 ;+6 .btn_high dd 15 ;+8 -.type dd 0 ;+12 +.type dd ini_def_scroll_type ;+12 .max_area dd 100 ;+16 .cur_area dd 30 ;+20 .position dd 0 ;+24 @@ -308,7 +298,7 @@ ws_dir_lbox: ; .size_y dw 30 ;+4 .start_y dw 70 ;+6 .btn_high dd 15 ;+8 -.type dd 0 ;+12 +.type dd ini_def_scroll_type ;+12 .max_area dd 100 ;+16 .cur_area dd 30 ;+20 .position dd 0 ;+24 @@ -438,7 +428,7 @@ ends align 4 tedit0: ; ⥪⮢ । .wnd BOX 0,50,440,150 ;+ 0 - .rec BOX 30,23,7,10 ;+16 + .rec BOX 30,23,ini_def_symbol_w,ini_def_symbol_h ;+16 .drag_m db 0 ;+32 뤥 .drag_k db 0 ;+33 뤥 .sel TexSelect 0,0,0,0 ;+34 뤥 @@ -518,6 +508,8 @@ dir_mem rb 32+304*count_of_dir_list_files if lang eq ru +hed db '⮢ । 22.06.12',0 ; + menu_text_area: db '',0 .1: @@ -634,6 +626,8 @@ txtFormatApply db ' else +hed db 'Text editor 22.06.12',0 + menu_text_area: db 'File',0 .1: diff --git a/programs/other/t_edit/t_edit.asm b/programs/other/t_edit/t_edit.asm index 7f8c6fcce..3c2b9e5eb 100644 --- a/programs/other/t_edit/t_edit.asm +++ b/programs/other/t_edit/t_edit.asm @@ -16,7 +16,7 @@ use32 MAX_COLOR_WORD_LEN equ 40 maxChars equ 100002 ;(...+2) -BUF_SIZE equ 1000 ;buffer for copy|paste +BUF_SIZE equ 4096 ;buffer for copy|paste maxSyntaxFileSize equ 410000 include '../../proc32.inc' @@ -167,6 +167,30 @@ mov ecx,ebx stdcall dword[tl_cur_beg],tree1 ;⠢ 砫 ᯨ᪠ .end_dir_init: +;--- load ini file --- + copy_path ini_name,sys_path,file_name,0x0 + ;window startup pozition + stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_l,ini_def_window_l + mov word[wnd_s_pos+2],ax + stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_w,ini_def_window_w + mov word[wnd_s_pos],ax + stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_t,ini_def_window_t + mov word[wnd_s_pos+6],ax + stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_h,ini_def_window_h + mov word[wnd_s_pos+4],ax + ;scrool type + stdcall dword[ini_get_int],file_name,ini_sec_window,key_scroll_type,ini_def_scroll_type + mov [wScr.type],eax + mov [hScr.type],eax + mov [ws_dir_lbox.type],eax + ;symbol size + stdcall dword[ini_get_int],file_name,ini_sec_window,key_symbol_w,ini_def_symbol_w + mov dword[tedit0.rec.width],eax + stdcall dword[ini_get_int],file_name,ini_sec_window,key_symbol_h,ini_def_symbol_h + mov dword[tedit0.rec.height],eax + lea eax,[eax+eax*2] + mov dword[tedit0.rec.top],eax + ;--- load color option file --- mov ebx,dword[fn_col_option] copy_path ebx,fn_syntax_dir,file_name_rez,0x0 @@ -182,6 +206,8 @@ mov ecx,ebx call but_no_msg_OpenFile @@: + + align 4 red_win: call draw_window @@ -212,7 +238,7 @@ draw_window: mov edx,[sc.work] or edx,0x73000000 mov edi,hed - mcall 0,(10 shl 16)+485,(10 shl 16)+320 + mcall 0,dword[wnd_s_pos],dword[wnd_s_pos+4] mcall 9,procinfo,-1 mov edi,tedit0 ;祭 edi 㦭 EvSize ted_wnd_t @@ -496,6 +522,8 @@ if lang eq ru err_message_import2 db '訡 ⥪ ',39,'proc_lib.obj',39,0 err_message_found_lib_3 db ' ⥪ ',39,'libimg.obj',39,0 err_message_import_3 db '訡 ⥪ ',39,'libimg.obj',39,0 + err_message_found_lib_4 db ' ⥪ ',39,'libini.obj',39,0 + err_message_import_4 db '訡 ⥪ ',39,'libini.obj',39,0 else head_f_i: head_f_l db 'System error',0 @@ -507,6 +535,8 @@ else err_message_import2 db 'Error on load import library ',39,'proc_lib.obj',39,0 err_message_found_lib_3 db 'Sorry I cannot found library ',39,'libimg.obj',39,0 err_message_import_3 db 'Error on load import library ',39,'libimg.obj',39,0 + err_message_found_lib_4 db 'Sorry I cannot found library ',39,'libini.obj',39,0 + err_message_import_4 db 'Error on load import library ',39,'libini.obj',39,0 end if ;library structures @@ -519,6 +549,8 @@ l_libs_start: err_message_found_lib2, head_f_l, import_proclib, err_message_import2, head_f_i lib3 l_libs lib_name_3, sys_path, file_name, system_dir_3,\ err_message_found_lib_3, head_f_l, import_libimg, err_message_import_3, head_f_i + lib4 l_libs lib_name_4, sys_path, file_name, system_dir_4,\ + err_message_found_lib_4, head_f_l, import_libini, err_message_import_4, head_f_i load_lib_end: IncludeIGlobals diff --git a/programs/other/t_edit/t_edit.ini b/programs/other/t_edit/t_edit.ini new file mode 100644 index 000000000..dab00d4c4 --- /dev/null +++ b/programs/other/t_edit/t_edit.ini @@ -0,0 +1,9 @@ +[Window] +t=10 +l=10 +w=485 +h=370 +symbol_w=7 +symbol_h=11 +scroll_type=0 +[Options] \ No newline at end of file