Rev 3236 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2970 | Serge | 1 | # General rule for naming: variables with CAPITALIZED names hold settings, |
2817 | IgorA | 2 | # you can - and are expected - to modify it; variables with lowercase names |
3 | # are intermediate variables and macroses not to be modified unless you |
||
4 | # know what you're doing. |
||
5 | |||
6 | # Define directories for destination, source repository, sources of kernel, sources of programs. |
||
7 | BUILD_DIR:=build |
||
8 | REPOSITORY:=../.. |
||
9 | KERNEL:=$(REPOSITORY)/kernel/trunk |
||
10 | PROGS:=$(REPOSITORY)/programs |
||
11 | |||
3236 | clevermous | 12 | # The main goal: build kolibri.img, kolibri.iso and list for creating a distribution kit |
13 | all: $(BUILD_DIR)/kolibri.img $(BUILD_DIR)/kolibri.iso $(BUILD_DIR)/distr.lst |
||
2817 | IgorA | 14 | |
15 | # Docpak requires some documents; we place them |
||
16 | # into 'docs' subdir and communicate with FASM |
||
17 | # through environment var DOCDIR. |
||
18 | DOCDIR:=docs/ |
||
19 | export DOCDIR |
||
20 | |||
21 | # Because most programs are written in FASM and have |
||
22 | # the common structure of one main .asm file possibly including |
||
23 | # several .inc files, we handle this case separately. |
||
24 | # Namely, we organize one big list of such programs |
||
25 | # (FASM_PROGRAMS, see below) containing name of local binary file, |
||
26 | # name of file inside kolibri.img and name of the source file. |
||
27 | # This list is maintained by hand, and the rest is done with some macroses... |
||
28 | # well, slightly complicated macroses - however, you do not need to |
||
29 | # understand them in order to maintain the list. |
||
30 | # To add a FASM program with one .asm file, just |
||
31 | # add the corresponding item to the list and enjoy |
||
32 | # the power of GNU make. |
||
33 | |||
34 | # The list of all FASM programs with one main FASM file. |
||
35 | # Every item consists of three parts, separated by ':'. |
||
36 | # First part is the real name of binary file in $(BUILD_DIR) |
||
37 | # as it should be produced by make. |
||
38 | # Second part is the name of a file inside kolibri.img, |
||
39 | # usually uppercased version of first part - to save space |
||
40 | # for FAT filesystem. |
||
41 | # Third part is the name of the source file. |
||
42 | # Spaces separate items, so spaces in names should be |
||
43 | # represented as '|'. |
||
44 | FASM_PROGRAMS:=\ |
||
45 | @clip:@CLIP:$(PROGS)/system/clip/trunk/@clip.ASM \ |
||
46 | @menu:@MENU:$(PROGS)/system/menu/trunk/menu.asm \ |
||
47 | @panel:@PANEL:$(PROGS)/system/panel/trunk/@PANEL.ASM \ |
||
48 | @ss:@SS:$(PROGS)/system/ss/trunk/@ss.asm \ |
||
49 | refrscrn:REFRSCRN:$(PROGS)/system/refrscrn/refrscrn.asm \ |
||
50 | asciivju:ASCIIVJU:$(PROGS)/develop/asciivju/trunk/asciivju.asm \ |
||
51 | calc:CALC:$(PROGS)/other/calc/trunk/calc.asm \ |
||
52 | calendar:CALENDAR:$(PROGS)/system/calendar/trunk/calendar.asm \ |
||
53 | commouse:COMMOUSE:$(PROGS)/system/commouse/trunk/commouse.asm \ |
||
54 | cpu:CPU:$(PROGS)/system/cpu/trunk/cpu.asm \ |
||
55 | cpuid:CPUID:$(PROGS)/system/cpuid/trunk/CPUID.ASM \ |
||
56 | desktop:DESKTOP:$(PROGS)/system/desktop/trunk/desktop.asm \ |
||
57 | disptest:DISPTEST:$(PROGS)/system/disptest/trunk/disptest.ASM \ |
||
58 | docpack:DOCPACK:$(PROGS)/system/docpack/trunk/docpack.asm \ |
||
59 | end:END:$(PROGS)/system/end/light/end.asm \ |
||
60 | gmon:GMON:$(PROGS)/system/gmon/gmon.asm \ |
||
61 | hdd_info:HDD_INFO:$(PROGS)/system/hdd_info/trunk/hdd_info.asm \ |
||
62 | icon:ICON:$(PROGS)/system/icon/trunk/icon.asm \ |
||
63 | cropflat:CROPFLAT:$(PROGS)/system/cropflat/cropflat.asm \ |
||
64 | kbd:KBD:$(PROGS)/system/kbd/trunk/kbd.ASM \ |
||
65 | kpack:KPACK:$(PROGS)/other/kpack/trunk/kpack.asm \ |
||
66 | launcher:LAUNCHER:$(PROGS)/system/launcher/trunk/launcher.asm \ |
||
67 | magnify:MAGNIFY:$(PROGS)/demos/magnify/trunk/magnify.asm \ |
||
68 | mgb:MGB:$(PROGS)/system/mgb/trunk/mgb.asm \ |
||
69 | mousemul:MOUSEMUL:$(PROGS)/system/mousemul/trunk/mousemul.asm \ |
||
70 | madmouse:MADMOUSE:$(PROGS)/other/madmouse/madmouse.asm \ |
||
71 | mykey:MYKEY:$(PROGS)/system/MyKey/trunk/MyKey.asm \ |
||
72 | pcidev:PCIDEV:$(PROGS)/system/pcidev/trunk/PCIDEV.ASM \ |
||
73 | period:PERIOD:$(PROGS)/other/period/trunk/period.asm \ |
||
74 | rdsave:RDSAVE:$(PROGS)/system/rdsave/trunk/rdsave.asm \ |
||
75 | rtfread:RTFREAD:$(PROGS)/other/rtfread/trunk/rtfread.asm \ |
||
76 | run:RUN:$(PROGS)/system/run/trunk/run.asm \ |
||
77 | scrshoot:SCRSHOOT:$(PROGS)/media/scrshoot/scrshoot.asm \ |
||
78 | setup:SETUP:$(PROGS)/system/setup/trunk/setup.asm \ |
||
79 | test:TEST:$(PROGS)/system/test/trunk/test.asm \ |
||
80 | tinypad:TINYPAD:$(PROGS)/develop/tinypad/trunk/tinypad.asm \ |
||
81 | zkey:ZKEY:$(PROGS)/system/zkey/trunk/ZKEY.ASM \ |
||
82 | 3d/3dsheart:3D/3DSHEART:$(PROGS)/demos/3dsheart/trunk/3dsheart.asm \ |
||
83 | 3d/3dwav:3D/3DWAV:$(PROGS)/demos/3dwav/trunk/3dwav.asm \ |
||
84 | 3d/crownscr:3D/CROWNSCR:$(PROGS)/demos/crownscr/trunk/crownscr.asm \ |
||
85 | 3d/free3d04:3D/FREE3D04:$(PROGS)/demos/free3d04/trunk/free3d04.asm \ |
||
86 | 3d/view3ds:3D/VIEW3DS:$(PROGS)/demos/3DS/VIEW3DS.ASM \ |
||
87 | demos/bcdclk:DEMOS/BCDCLK:$(PROGS)/demos/bcdclk/trunk/bcdclk.asm \ |
||
88 | demos/circle:DEMOS/CIRCLE:$(PROGS)/develop/examples/circle/trunk/circle.asm \ |
||
89 | demos/colorref:DEMOS/COLORREF:$(PROGS)/demos/colorref/trunk/colorref.asm \ |
||
90 | demos/cslide:DEMOS/CSLIDE:$(PROGS)/demos/cslide/trunk/cslide.asm \ |
||
91 | demos/eyes:DEMOS/EYES:$(PROGS)/demos/eyes/trunk/eyes.asm \ |
||
92 | demos/firework:DEMOS/FIREWORK:$(PROGS)/demos/firework/trunk/firework.asm \ |
||
93 | demos/movback:DEMOS/MOVBACK:$(PROGS)/demos/movback/trunk/movback.asm \ |
||
94 | demos/plasma:DEMOS/PLASMA:$(PROGS)/demos/plasma/trunk/plasma.asm \ |
||
95 | demos/timer:DEMOS/TIMER:$(PROGS)/demos/timer/trunk/timer.asm \ |
||
96 | demos/tinyfrac:DEMOS/TINYFRAC:$(PROGS)/demos/tinyfrac/trunk/tinyfrac.asm \ |
||
97 | demos/trantest:DEMOS/TRANTEST:$(PROGS)/demos/trantest/trunk/trantest.asm \ |
||
98 | demos/tube:DEMOS/TUBE:$(PROGS)/demos/tube/trunk/tube.asm \ |
||
99 | demos/unvwater:DEMOS/UNVWATER:$(PROGS)/demos/unvwater/trunk/unvwater.asm \ |
||
100 | demos/web:DEMOS/WEB:$(PROGS)/demos/web/trunk/web.asm \ |
||
101 | develop/board:DEVELOP/BOARD:$(PROGS)/system/board/trunk/board.asm \ |
||
102 | develop/cObj:DEVELOP/cObj:$(PROGS)/develop/cObj/trunk/cObj.asm \ |
||
103 | develop/fasm:DEVELOP/FASM:$(PROGS)/develop/fasm/trunk/fasm.asm \ |
||
104 | develop/h2d2b:DEVELOP/H2D2B:$(PROGS)/develop/h2d2b/trunk/h2d2b.asm \ |
||
105 | develop/heed:DEVELOP/HEED:$(PROGS)/develop/heed/trunk/heed.asm \ |
||
106 | develop/ipc:DEVELOP/IPC:$(PROGS)/network/ipc/trunk/ipc.asm \ |
||
107 | develop/keyascii:DEVELOP/KEYASCII:$(PROGS)/develop/keyascii/trunk/keyascii.asm \ |
||
108 | develop/mtdbg:DEVELOP/MTDBG:$(PROGS)/develop/mtdbg/mtdbg.asm \ |
||
109 | develop/scancode:DEVELOP/SCANCODE:$(PROGS)/develop/scancode/trunk/scancode.asm \ |
||
110 | develop/t_edit:DEVELOP/T_EDIT:$(PROGS)/other/t_edit/t_edit.asm \ |
||
111 | develop/test_gets:DEVELOP/test_gets:$(PROGS)/develop/libraries/console/examples/test_gets.asm \ |
||
112 | develop/testcon2:DEVELOP/TESTCON2:$(PROGS)/develop/libraries/console/examples/testcon2.asm \ |
||
113 | develop/thread:DEVELOP/THREAD:$(PROGS)/develop/examples/thread/trunk/thread.asm \ |
||
114 | develop/info/asm.syn:DEVELOP/INFO/ASM.SYN:$(PROGS)/other/t_edit/info/asm_syn.asm \ |
||
115 | develop/info/cpp_kol_cla.syn:DEVELOP/INFO/CPP_KOL_CLA.SYN:$(PROGS)/other/t_edit/info/cpp_kol_cla_syn.asm \ |
||
116 | develop/info/cpp_kol_dar.syn:DEVELOP/INFO/CPP_KOL_DAR.SYN:$(PROGS)/other/t_edit/info/cpp_kol_dar_syn.asm \ |
||
117 | develop/info/cpp_kol_def.syn:DEVELOP/INFO/CPP_KOL_DEF.SYN:$(PROGS)/other/t_edit/info/cpp_kol_def_syn.asm \ |
||
118 | develop/info/default.syn:DEVELOP/INFO/DEFAULT.SYN:$(PROGS)/other/t_edit/info/default_syn.asm \ |
||
119 | develop/info/html.syn:DEVELOP/INFO/HTML.SYN:$(PROGS)/other/t_edit/info/html_syn.asm \ |
||
120 | develop/info/ini_files.syn:DEVELOP/INFO/INI_FILES.SYN:$(PROGS)/other/t_edit/info/ini_files_syn.asm \ |
||
121 | develop/info/win_const.syn:DEVELOP/INFO/WIN_CONST.SYN:$(PROGS)/other/t_edit/info/win_const_syn.asm \ |
||
122 | drivers/com_mouse.obj:DRIVERS/COM_MOUSE.OBJ:$(KERNEL)/drivers/com_mouse.asm \ |
||
123 | drivers/emu10k1x.obj:DRIVERS/EMU10K1X.OBJ:$(KERNEL)/drivers/emu10k1x.asm \ |
||
124 | drivers/fm801.obj:DRIVERS/FM801.OBJ:$(KERNEL)/drivers/fm801.asm \ |
||
125 | drivers/infinity.obj:DRIVERS/INFINITY.OBJ:$(KERNEL)/drivers/infinity.asm \ |
||
3084 | leency | 126 | drivers/intel_hda.obj:DRIVERS/intel_hda.obj:$(REPOSITORY)/drivers/audio/intel_hda/intel_hda.asm \ |
2817 | IgorA | 127 | drivers/ps2mouse.obj:DRIVERS/PS2MOUSE.OBJ:$(REPOSITORY)/drivers/mouse/ps2mouse4d/trunk/ps2mouse.asm \ |
128 | drivers/sb16.obj:DRIVERS/SB16.OBJ:$(KERNEL)/drivers/sb16/sb16.asm \ |
||
129 | drivers/sound.obj:DRIVERS/SOUND.OBJ:$(KERNEL)/drivers/sound.asm \ |
||
3171 | hidnplayr | 130 | drivers/intelac97.obj:DRIVERS/INTELAC97.OBJ:$(KERNEL)/drivers/intelac97.asm \ |
2834 | leency | 131 | drivers/tmpdisk.obj:DRIVERS/TMPDISK.OBJ:$(KERNEL)/drivers/tmpdisk.asm \ |
3173 | hidnplayr | 132 | drivers/vt823x.obj:DRIVERS/VT823X.OBJ:$(KERNEL)/drivers/vt823x.asm \ |
2817 | IgorA | 133 | File|Managers/kfar:File|Managers/KFAR:$(PROGS)/fs/kfar/trunk/kfar.asm \ |
134 | File|Managers/kfm:File|Managers/KFM:$(PROGS)/fs/kfm/trunk/kfm.asm \ |
||
135 | File|Managers/opendial:File|Managers/OPENDIAL:$(PROGS)/fs/opendial/opendial.asm \ |
||
136 | games/15:GAMES/15:$(PROGS)/games/15/trunk/15.ASM \ |
||
137 | games/arcanii:GAMES/ARCANII:$(PROGS)/games/arcanii/trunk/arcanii.asm \ |
||
138 | games/freecell:GAMES/FREECELL:$(PROGS)/games/freecell/freecell.asm \ |
||
139 | games/gomoku:GAMES/GOMOKU:$(PROGS)/games/gomoku/trunk/gomoku.asm \ |
||
140 | games/invaders:GAMES/INVADERS:$(PROGS)/games/invaders/invaders.asm \ |
||
141 | games/klavisha:GAMES/KLAVISHA:$(PROGS)/games/klavisha/trunk/klavisha.asm \ |
||
142 | games/lines:GAMES/LINES:$(PROGS)/games/lines/lines.asm \ |
||
143 | games/mblocks:GAMES/MBLOCKS:$(PROGS)/games/mblocks/trunk/mblocks.asm \ |
||
144 | games/msquare:GAMES/MSQUARE:$(PROGS)/games/MSquare/trunk/MSquare.asm \ |
||
145 | games/phenix:GAMES/PHENIX:$(PROGS)/games/phenix/trunk/phenix.asm \ |
||
146 | games/pipes:GAMES/PIPES:$(PROGS)/games/pipes/pipes.asm \ |
||
147 | games/pong:GAMES/PONG:$(PROGS)/games/pong/trunk/pong.asm \ |
||
148 | games/pong3:GAMES/PONG3:$(PROGS)/games/pong3/trunk/pong3.asm \ |
||
149 | games/rsquare:GAMES/RSQUARE:$(PROGS)/games/rsquare/trunk/rsquare.asm \ |
||
150 | games/snake:GAMES/SNAKE:$(PROGS)/games/snake/trunk/snake.asm \ |
||
151 | games/sq_game:GAMES/SQ_GAME:$(PROGS)/games/sq_game/trunk/SQ_GAME.ASM \ |
||
152 | games/sudoku:GAMES/SUDOKU:$(PROGS)/games/sudoku/trunk/sudoku.asm \ |
||
153 | games/sw:GAMES/SW:$(PROGS)/games/sw/trunk/sw.asm \ |
||
154 | games/tanks:GAMES/TANKS:$(PROGS)/games/tanks/trunk/tanks.asm \ |
||
155 | games/tetris:GAMES/TETRIS:$(PROGS)/games/tetris/trunk/tetris.asm \ |
||
156 | lib/archiver.obj:LIB/ARCHIVER.OBJ:$(PROGS)/fs/kfar/trunk/kfar_arc/kfar_arc.asm \ |
||
157 | lib/box_lib.obj:LIB/BOX_LIB.OBJ:$(PROGS)/develop/libraries/box_lib/trunk/box_lib.asm \ |
||
3104 | leency | 158 | lib/buf2d.obj:LIB/BUF2D.OBJ:$(PROGS)/develop/libraries/buf2d/trunk/buf2d.asm \ |
2817 | IgorA | 159 | lib/console.obj:LIB/CONSOLE.OBJ:$(PROGS)/develop/libraries/console/console.asm \ |
160 | lib/libgfx.obj:LIB/LIBGFX.OBJ:$(PROGS)/develop/libraries/libs-dev/libgfx/libgfx.asm \ |
||
161 | lib/libimg.obj:LIB/LIBIMG.OBJ:$(PROGS)/develop/libraries/libs-dev/libimg/libimg.asm \ |
||
162 | lib/libini.obj:LIB/LIBINI.OBJ:$(PROGS)/develop/libraries/libs-dev/libini/libini.asm \ |
||
163 | lib/libio.obj:LIB/LIBIO.OBJ:$(PROGS)/develop/libraries/libs-dev/libio/libio.asm \ |
||
164 | lib/network.obj:LIB/NETWORK.OBJ:$(PROGS)/develop/libraries/network/network.asm \ |
||
165 | lib/proc_lib.obj:LIB/PROC_LIB.OBJ:$(PROGS)/develop/libraries/proc_lib/trunk/proc_lib.asm \ |
||
166 | lib/cnv_png.obj:LIB/CNV_PNG.OBJ:$(PROGS)/media/zsea/plugins/png/cnv_png.asm \ |
||
167 | media/animage:MEDIA/ANIMAGE:$(PROGS)/media/animage/trunk/animage.asm \ |
||
168 | media/cdp:MEDIA/CDP:$(PROGS)/media/cdp/trunk/cdp.asm \ |
||
169 | media/kiv:MEDIA/KIV:$(PROGS)/media/kiv/trunk/kiv.asm \ |
||
170 | media/listplay:MEDIA/LISTPLAY:$(PROGS)/media/listplay/trunk/listplay.asm \ |
||
171 | media/midamp:MEDIA/MIDAMP:$(PROGS)/media/midamp/trunk/midamp.asm \ |
||
3087 | leency | 172 | media/palitra:MEDIA/PALITRA:$(PROGS)/media/palitra/trunk/palitra.asm \ |
2817 | IgorA | 173 | media/startmus:MEDIA/STARTMUS:$(PROGS)/media/startmus/trunk/STARTMUS.ASM \ |
174 | network/airc:NETWORK/AIRC:$(PROGS)/network/airc/trunk/airc.asm \ |
||
175 | network/arpstat:NETWORK/ARPSTAT:$(PROGS)/network/arpstat/trunk/arpstat.asm \ |
||
176 | network/chess:NETWORK/CHESS:$(PROGS)/network/chess/trunk/chess.asm \ |
||
177 | network/downloader:NETWORK/DOWNLOADER:$(PROGS)/network/downloader/trunk/downloader.asm \ |
||
178 | network/ethstat:NETWORK/ETHSTAT:$(PROGS)/network/ethstat/trunk/ethstat.asm \ |
||
179 | network/ftps:NETWORK/FTPS:$(PROGS)/network/ftps/trunk/FTPS.ASM \ |
||
180 | network/https:NETWORK/HTTPS:$(PROGS)/network/https/trunk/https.asm \ |
||
181 | network/nntpc:NETWORK/NNTPC:$(PROGS)/network/nntpc/trunk/nntpc.asm \ |
||
182 | network/nslookup:NETWORK/NSLOOKUP:$(PROGS)/develop/libraries/network/examples/nslookup.asm \ |
||
183 | network/popc:NETWORK/POPC:$(PROGS)/network/popc/trunk/popc.asm \ |
||
184 | network/smtps:NETWORK/SMTPS:$(PROGS)/network/smtps/trunk/smtps.asm \ |
||
185 | network/stackcfg:NETWORK/STACKCFG:$(PROGS)/network/stackcfg/trunk/stackcfg.asm \ |
||
186 | network/telnet:NETWORK/TELNET:$(PROGS)/network/telnet/trunk/telnet.asm \ |
||
187 | network/tftpc:NETWORK/TFTPC:$(PROGS)/network/tftpc/trunk/tftpc.asm \ |
||
188 | network/VNCclient:NETWORK/VNCclient:$(PROGS)/network/VNCclient/VNCclient.asm \ |
||
189 | network/ym:NETWORK/YM:$(PROGS)/network/ym/trunk/ym.asm \ |
||
190 | network/zeroconf:NETWORK/ZEROCONF:$(PROGS)/network/zeroconf/trunk/zeroconf.asm \ |
||
191 | # end of list |
||
192 | # The list of all FASM programs with one main FASM file for CD image. |
||
193 | # Format of an item is exactly the same as in the previous list. |
||
194 | FASM_PROGRAMS_CD:=\ |
||
195 | drivers/atikms:DRIVERS/ATIKMS:$(REPOSITORY)/drivers/video/drm/radeon/atikms.asm \ |
||
196 | # end of list |
||
197 | |||
198 | # The list of all FASM programs which needs to be compiled without KPACKing. |
||
199 | FASM_NOKPACK_PROGRAMS:=\ |
||
200 | distr_data/9x2klbr.exe:-:$(PROGS)/hd_load/9x2klbr/9x2klbr.asm \ |
||
201 | distr_data/MeOSload.com:-:$(PROGS)/hd_load/meosload/MeOSload.asm \ |
||
202 | distr_data/mtldr:-:$(PROGS)/hd_load/mtldr/mtldr.asm \ |
||
203 | mtldr_for_installer:-:$(PROGS)/hd_load/mtldr_install/mtldr_code/mtldr.asm \ |
||
204 | distr_data/mtldr_install.exe:-:$(PROGS)/hd_load/mtldr_install/mtldr_install.asm \ |
||
205 | distr_data/MeOSload_for_usb_boot_old.com:-:$(PROGS)/hd_load/usb_boot_old/MeOSload.asm \ |
||
206 | distr_data/enable_for_usb_boot_old.exe:-:$(PROGS)/hd_load/usb_boot_old/enable.asm \ |
||
207 | distr_data/BOOT_F32.BIN:-:$(PROGS)/hd_load/usb_boot/BOOT_F32.ASM \ |
||
208 | distr_data/MTLD_F32:-:$(PROGS)/hd_load/usb_boot/mtldr.asm \ |
||
209 | distr_data/inst.exe:-:$(PROGS)/hd_load/usb_boot/inst.asm \ |
||
210 | distr_data/setmbr.exe:-:$(PROGS)/hd_load/usb_boot/setmbr.asm \ |
||
211 | #end of list |
||
212 | |||
213 | # The list of all NASM programs with one main NASM file. |
||
214 | # Format of an item is exactly the same as in the previous list. |
||
215 | NASM_PROGRAMS:=\ |
||
216 | demos/aclock:DEMOS/ACLOCK:$(PROGS)/demos/aclock/trunk/aclock.asm \ |
||
217 | games/c4:GAMES/C4:$(PROGS)/games/c4/trunk/c4.asm \ |
||
218 | # end of list |
||
219 | |||
220 | # The list of files which should be copied from somewhere. |
||
221 | # Format of an item is exactly the same as in the previous list. |
||
222 | COPY_FILES:=\ |
||
223 | macros.inc:MACROS.INC:$(PROGS)/macros.inc \ |
||
224 | config.inc:CONFIG.INC:$(PROGS)/config.inc \ |
||
225 | struct.inc:STRUCT.INC:$(PROGS)/struct.inc \ |
||
226 | develop/te_icon.png:DEVELOP/TE_ICON.PNG:$(PROGS)/other/t_edit/te_icon.png \ |
||
227 | develop/tl_nod_16.png:DEVELOP/TL_NOD |