Rev 1791 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1737 | clevermous | 1 | # General rule for naming: variables with CAPITALIZED names hold settings, |
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 |
||
1739 | clevermous | 8 | REPOSITORY:=../.. |
1737 | clevermous | 9 | KERNEL:=$(REPOSITORY)/kernel/trunk |
10 | PROGS:=$(REPOSITORY)/programs |
||
11 | |||
12 | # Docpak requires some documents; we place them |
||
13 | # into 'docs' subdir and communicate with FASM |
||
14 | # through environment var DOCDIR. |
||
15 | DOCDIR:=docs/ |
||
16 | export DOCDIR |
||
17 | |||
18 | # Because most programs are written in FASM and have |
||
19 | # the common structure of one main .asm file possibly including |
||
20 | # several .inc files, we handle this case separately. |
||
21 | # Namely, we organize one big list of such programs |
||
22 | # (FASM_PROGRAMS, see below) containing name of local binary file, |
||
23 | # name of file inside kolibri.img and name of the source file. |
||
24 | # This list is maintained by hand, and the rest is done with some macroses... |
||
25 | # well, slightly complicated macroses - however, you do not need to |
||
26 | # understand them in order to maintain the list. |
||
27 | # To add a FASM program with one .asm file, just |
||
28 | # add the corresponding item to the list and enjoy |
||
29 | # the power of GNU make. |
||
30 | |||
31 | # The list of all FASM programs with one main FASM file. |
||
32 | # Every item consists of three parts, separated by ':'. |
||
33 | # First part is the real name of binary file in $(BUILD_DIR) |
||
34 | # as it should be produced by make. |
||
35 | # Second part is the name of a file inside kolibri.img, |
||
36 | # usually uppercased version of first part - to save space |
||
37 | # for FAT filesystem. |
||
38 | # Third part is the name of the source file. |
||
39 | # Spaces separate items, so spaces in names should be |
||
40 | # represented as '|'. |
||
41 | FASM_PROGRAMS:=\ |
||
42 | @clip:@CLIP:$(PROGS)/system/clip/trunk/@clip.ASM \ |
||
43 | @menu:@MENU:$(PROGS)/system/menu/trunk/menu.asm \ |
||
44 | @panel:@PANEL:$(PROGS)/system/panel/trunk/@PANEL.ASM \ |
||
45 | @rb:@RB:$(PROGS)/system/rb/trunk/@RB.ASM \ |
||
1749 | dunkaist | 46 | @ss:@SS:$(PROGS)/system/ss/trunk/@ss.asm \ |
1737 | clevermous | 47 | calc:CALC:$(PROGS)/other/calc/trunk/calc.asm \ |
48 | calendar:CALENDAR:$(PROGS)/system/calendar/trunk/calendar.asm \ |
||
49 | commouse:COMMOUSE:$(PROGS)/system/commouse/trunk/commouse.asm \ |
||
50 | copyr:COPYR:$(PROGS)/fs/copyr/trunk/copyr.asm \ |
||
51 | cpu:CPU:$(PROGS)/system/cpu/trunk/cpu.asm \ |
||
52 | cpuid:CPUID:$(PROGS)/system/cpuid/trunk/CPUID.ASM \ |
||
53 | desktop:DESKTOP:$(PROGS)/system/desktop/trunk/desktop.asm \ |
||
54 | disptest:DISPTEST:$(PROGS)/system/disptest/trunk/disptest.ASM \ |
||
55 | docpak:DOCPAK:$(PROGS)/system/docpack/trunk/docpack.asm \ |
||
56 | downloader:downloader:$(PROGS)/network/downloader/trunk/downloader.asm \ |
||
1743 | clevermous | 57 | end:END:$(PROGS)/system/end/light/end.asm \ |
1737 | clevermous | 58 | gmon:GMON:$(PROGS)/system/gmon/gmon.asm \ |
59 | hdd_info:HDD_INFO:$(PROGS)/system/hdd_info/trunk/hdd_info.asm \ |
||
60 | icon:ICON:$(PROGS)/system/icon/trunk/icon.asm \ |
||
61 | kbd:KBD:$(PROGS)/system/kbd/trunk/kbd.ASM \ |
||
62 | launcher:LAUNCHER:$(PROGS)/system/launcher/trunk/launcher.asm \ |
||
63 | magnify:MAGNIFY:$(PROGS)/demos/magnify/trunk/magnify.asm \ |
||
64 | mgb:MGB:$(PROGS)/system/mgb/trunk/mgb.asm \ |
||
65 | mousemul:MOUSEMUL:$(PROGS)/system/mousemul/trunk/mousemul.asm \ |
||
66 | pcidev:PCIDEV:$(PROGS)/system/pcidev/trunk/PCIDEV.ASM \ |
||
67 | period:PERIOD:$(PROGS)/other/period/trunk/period.asm \ |
||
68 | pic4:PIC4:$(PROGS)/media/pic4/trunk/pic4.asm \ |
||
69 | rdsave:RDSAVE:$(PROGS)/system/rdsave/trunk/rdsave.asm \ |
||
70 | rtfread:RTFREAD:$(PROGS)/other/rtfread/trunk/rtfread.asm \ |
||
71 | run:RUN:$(PROGS)/system/run/trunk/run.asm \ |
||
72 | scrshoot:SCRSHOOT:$(PROGS)/media/scrshoot/scrshoot.asm \ |
||
73 | setup:SETUP:$(PROGS)/system/setup/trunk/setup.asm \ |
||
74 | tinypad:TINYPAD:$(PROGS)/develop/tinypad/trunk/tinypad.asm \ |
||
75 | vrr:VRR:$(PROGS)/system/vrr/trunk/vrr.asm \ |
||
76 | vrr_m:VRR_M:$(PROGS)/system/vrr_m/trunk/vrr_m.asm \ |
||
77 | zkey:ZKEY:$(PROGS)/system/zkey/trunk/ZKEY.ASM \ |
||
78 | 3d/3dcube2:3D/3DCUBE2:$(PROGS)/demos/3dcube2/trunk/3DCUBE2.ASM \ |
||
79 | 3d/3dtcub10:3D/3DTCUB10:$(PROGS)/demos/3dtcub10/trunk/3DTCUB10.ASM \ |
||
80 | 3d/crownscr:3D/CROWNSCR:$(PROGS)/demos/crownscr/trunk/crownscr.asm \ |
||
81 | 3d/free3d04:3D/FREE3D04:$(PROGS)/demos/free3d04/trunk/free3d04.asm \ |
||
82 | 3d/view3ds:3D/VIEW3DS:$(PROGS)/demos/3DS/VIEW3DS.ASM \ |
||
1779 | yogev_ezra | 83 | 3d/3dspiral:3D/3DSPIRAL:$(PROGS)/demos/3dspiral/trunk/3dspiral.asm \ |
1780 | yogev_ezra | 84 | 3d/flatwav:3D/FLATWAV:$(PROGS)/demos/flatwav/trunk/FLATWAV.ASM \ |
1791 | yogev_ezra | 85 | demos/bcdclk:DEMOS/BCDCLK:$(PROGS)/demos/bcdclk/trunk/bcdclk.asm \ |
1737 | clevermous | 86 | demos/circle:DEMOS/CIRCLE:$(PROGS)/develop/examples/circle/trunk/circle.asm \ |
87 | demos/colorref:DEMOS/COLORREF:$(PROGS)/demos/colorref/trunk/colorref.asm \ |
||
88 | demos/cslide:DEMOS/CSLIDE:$(PROGS)/demos/cslide/trunk/cslide.asm \ |
||
89 | demos/eyes:DEMOS/EYES:$(PROGS)/demos/eyes/trunk/eyes.asm \ |
||
90 | demos/fire:DEMOS/FIRE:$(PROGS)/demos/fire/trunk/fire.asm \ |
||
91 | demos/firework:DEMOS/FIREWORK:$(PROGS)/demos/firework/trunk/firework.asm \ |
||
92 | demos/movback:DEMOS/MOVBACK:$(PROGS)/demos/movback/trunk/movback.asm \ |
||
93 | demos/plasma:DEMOS/PLASMA:$(PROGS)/demos/plasma/trunk/plasma.asm \ |
||
94 | demos/timer:DEMOS/TIMER:$(PROGS)/demos/timer/trunk/timer.asm \ |
||
95 | demos/tinyfrac:DEMOS/TINYFRAC:$(PROGS)/demos/tinyfrac/trunk/tinyfrac.asm \ |
||
96 | demos/trantest:DEMOS/TRANTEST:$(PROGS)/demos/trantest/trunk/trantest.asm \ |
||
97 | demos/tube:DEMOS/TUBE:$(PROGS)/demos/tube/trunk/tube.asm \ |
||
98 | demos/unvwater:DEMOS/UNVWATER:$(PROGS)/demos/unvwater/trunk/unvwater.asm \ |
||
1779 | yogev_ezra | 99 | demos/web:DEMOS/WEB:$(PROGS)/demos/web/trunk/web.asm \ |
1737 | clevermous | 100 | develop/board:DEVELOP/BOARD:$(PROGS)/system/board/trunk/board.asm \ |
101 | develop/cObj:DEVELOP/cObj:$(PROGS)/develop/cObj/trunk/cObj.asm \ |
||
102 | develop/fasm:DEVELOP/FASM:$(PROGS)/develop/fasm/trunk/fasm.asm \ |
||
103 | develop/h2d2b:DEVELOP/H2D2B:$(PROGS)/develop/h2d2b/trunk/h2d2b.asm \ |
||
104 | develop/heed:DEVELOP/HEED:$(PROGS)/develop/heed/trunk/heed.asm \ |
||
105 | develop/ipc:DEVELOP/IPC:$(PROGS)/network/ipc/trunk/ipc.asm \ |
||
106 | develop/keyascii:DEVELOP/KEYASCII:$(PROGS)/develop/keyascii/trunk/keyascii.asm \ |
||
107 | develop/mtdbg:DEVELOP/MTDBG:$(PROGS)/develop/mtdbg/mtdbg.asm \ |
||
108 | develop/scancode:DEVELOP/SCANCODE:$(PROGS)/develop/scancode/trunk/scancode.asm \ |
||
109 | develop/test_gets:DEVELOP/test_gets:$(PROGS)/develop/libraries/console/examples/test_gets.asm \ |
||
110 | develop/testcon2:DEVELOP/TESTCON2:$(PROGS)/develop/libraries/console/examples/testcon2.asm \ |
||
111 | develop/thread:DEVELOP/THREAD:$(PROGS)/develop/examples/thread/trunk/thread.asm \ |
||
112 | drivers/atikms:DRIVERS/ATIKMS:$(REPOSITORY)/drivers/video/drm/radeon/atikms.asm \ |
||
113 | drivers/com_mouse.obj:DRIVERS/COM_MOUSE.OBJ:$(KERNEL)/drivers/com_mouse.asm \ |
||
114 | drivers/emu10k1x.obj:DRIVERS/EMU10K1X.OBJ:$(KERNEL)/drivers/emu10k1x.asm \ |
||
115 | drivers/fm801.obj:DRIVERS/FM801.OBJ:$(KERNEL)/drivers/fm801.asm \ |
||
116 | drivers/infinity.obj:DRIVERS/INFINITY.OBJ:$(KERNEL)/drivers/infinity.asm \ |
||
117 | drivers/ps2mouse.obj:DRIVERS/PS2MOUSE.OBJ:$(REPOSITORY)/drivers/mouse/ps2mouse4d/trunk/ps2mouse.asm \ |
||
118 | drivers/sb16.obj:DRIVERS/SB16.OBJ:$(KERNEL)/drivers/sb16/sb16.asm \ |
||
119 | drivers/sound.obj:DRIVERS/SOUND.OBJ:$(KERNEL)/drivers/sound.asm \ |
||
120 | drivers/vmode.mdr:DRIVERS/VMODE.MDR:$(KERNEL)/drivers/vmode.asm \ |
||
121 | drivers/vt8235.obj:DRIVERS/VT8235.OBJ:$(KERNEL)/drivers/vt823x.asm \ |
||
122 | File|Managers/kfar:File|Managers/KFAR:$(PROGS)/fs/kfar/trunk/kfar.asm \ |
||
123 | File|Managers/OpenDial:File|Managers/OPENDIAL:$(PROGS)/develop/libraries/box_lib/asm/trunk/OpenDial.asm \ |
||
124 | fonts/bgitest:FONTS/BGITEST:$(PROGS)/demos/bgitest/trunk/bgitest.asm \ |
||
125 | games/15:GAMES/15:$(PROGS)/games/15/trunk/15.ASM \ |
||
126 | games/arcanii:GAMES/ARCANII:$(PROGS)/games/arcanii/trunk/arcanii.asm \ |
||
127 | games/freecell:GAMES/FREECELL:$(PROGS)/games/freecell/freecell.ASM \ |
||
128 | games/invaders:GAMES/INVADERS:$(PROGS)/games/invaders/invaders.asm \ |
||
129 | games/lines:GAMES/LINES:$(PROGS)/games/lines/lines.asm \ |
||
130 | games/mblocks:GAMES/MBLOCKS:$(PROGS)/games/mblocks/trunk/mblocks.asm \ |
||
131 | games/phenix:GAMES/PHENIX:$(PROGS)/games/phenix/trunk/phenix.asm \ |
||
132 | games/pipes:GAMES/PIPES:$(PROGS)/games/pipes/pipes.asm \ |
||
133 | games/pong:GAMES/PONG:$(PROGS)/games/pong/trunk/pong.asm \ |
||
134 | games/pong3:GAMES/PONG3:$(PROGS)/games/pong3/trunk/pong3.asm \ |
||
135 | games/rsquare:GAMES/RSQUARE:$(PROGS)/games/rsquare/trunk/rsquare.asm \ |
||
136 | games/snake:GAMES/SNAKE:$(PROGS)/games/snake/trunk/snake.asm \ |
||
137 | games/tetris:GAMES/TETRIS:$(PROGS)/games/tetris/trunk/tetris.asm \ |
||
138 | lib/archiver.obj:LIB/ARCHIVER.OBJ:$(PROGS)/fs/kfar/trunk/kfar_arc/kfar_arc.asm \ |
||
139 | lib/box_lib.obj:LIB/BOX_LIB.OBJ:$(PROGS)/develop/libraries/box_lib/trunk/box_lib.asm \ |
||
140 | lib/console.obj:LIB/CONSOLE.OBJ:$(PROGS)/develop/libraries/console/console.asm \ |
||
141 | lib/libgfx.obj:LIB/LIBGFX.OBJ:$(PROGS)/develop/libraries/libs-dev/libgfx/libgfx.asm \ |
||
142 | lib/libimg.obj:LIB/LIBIMG.OBJ:$(PROGS)/develop/libraries/libs-dev/libimg/libimg.asm \ |
||
143 | lib/libini.obj:LIB/LIBINI.OBJ:$(PROGS)/develop/libraries/libs-dev/libini/libini.asm \ |
||
144 | lib/libio.obj:LIB/LIBIO.OBJ:$(PROGS)/develop/libraries/libs-dev/libio/libio.asm \ |
||
145 | lib/network.obj:LIB/NETWORK.OBJ:$(PROGS)/develop/libraries/network/network.asm \ |
||
146 | lib/proc_lib.obj:LIB/PROC_LIB.OBJ:$(PROGS)/develop/libraries/proc_lib/trunk/proc_lib.asm \ |
||
147 | media/animage:MEDIA/ANIMAGE:$(PROGS)/media/animage/trunk/animage.asm \ |
||
148 | media/cdp:MEDIA/CDP:$(PROGS)/media/cdp/trunk/cdp.asm \ |
||
149 | media/kiv:MEDIA/KIV:$(PROGS)/media/kiv/trunk/kiv.asm \ |
||
150 | media/midamp:MEDIA/MIDAMP:$(PROGS)/media/midamp/trunk/midamp.asm \ |
||
1794 | yogev_ezra | 151 | media/listplay:MEDIA/LISTPLAY:$(PROGS)/media/listplay/trunk/listplay.asm \ |
152 | media/startmus:MEDIA/STARTMUS:$(PROGS)/media/startmus/trunk/STARTMUS.ASM \ |
||
1737 | clevermous | 153 | network/airc:NETWORK/AIRC:$(PROGS)/network/airc/trunk/airc.asm \ |
154 | network/arpstat:NETWORK/ARPSTAT:$(PROGS)/network/arpstat/trunk/arpstat.asm \ |
||
155 | network/chess:NETWORK/CHESS:$(PROGS)/network/chess/trunk/chess.asm \ |
||
156 | network/ethstat:NETWORK/ETHSTAT:$(PROGS)/network/ethstat/trunk/ethstat.asm \ |
||
157 | network/ftps:NETWORK/FTPS:$(PROGS)/network/ftps/trunk/FTPS.ASM \ |
||
158 | network/httpc:NETWORK/HTTPC:$(PROGS)/network/httpc/trunk/httpc.asm \ |
||
159 | network/https:NETWORK/HTTPS:$(PROGS)/network/https/trunk/https.asm \ |
||
160 | network/nntpc:NETWORK/NNTPC:$(PROGS)/network/nntpc/trunk/nntpc.asm \ |
||
161 | network/nslookup:NETWORK/NSLOOKUP:$(PROGS)/develop/libraries/network/examples/nslookup.asm \ |
||
162 | network/popc:NETWORK/POPC:$(PROGS)/network/popc/trunk/popc.asm \ |
||
163 | network/smtps:NETWORK/SMTPS:$(PROGS)/network/smtps/trunk/smtps.asm \ |
||
164 | network/stackcfg:NETWORK/STACKCFG:$(PROGS)/network/stackcfg/trunk/stackcfg.asm \ |
||
165 | network/telnet:NETWORK/TELNET:$(PROGS)/network/telnet/trunk/telnet.asm \ |
||
166 | network/tftpc:NETWORK/TFTPC:$(PROGS)/network/tftpc/trunk/tftpc.asm \ |
||
167 | network/VNCclient:NETWORK/VNCclient:$(PROGS)/network/VNCclient/VNCclient.asm \ |
||
168 | network/ym:NETWORK/YM:$(PROGS)/network/ym/trunk/ym.asm \ |
||
169 | network/zeroconf:NETWORK/ZEROCONF:$(PROGS)/network/zeroconf/trunk/zeroconf.asm \ |
||
170 | # end of list |
||
171 | |||
1752 | clevermous | 172 | # The list of all NASM programs with one main NASM file. |
173 | # Format of an item is exactly the same as in the previous list. |
||
174 | NASM_PROGRAMS:=\ |
||
175 | demos/aclock:DEMOS/ACLOCK:$(PROGS)/demos/aclock/trunk/aclock.asm \ |
||
176 | games/c4:GAMES/C4:$(PROGS)/games/c4/trunk/c4.asm \ |
||
177 | # end of list |
||
178 | |||
1737 | clevermous | 179 | # The list of files which should be copied from somewhere. |
180 | # Format of an item is exactly the same as in the previous list. |
||
181 | COPY_FILES:=\ |
||
182 | macros.inc:MACROS.INC:$(PROGS)/macros.inc \ |
||
183 | config.inc:CONFIG.INC:$(PROGS)/config.inc \ |
||
184 | struct.inc:STRUCT.INC:$(PROGS)/struct.inc \ |
||
185 | File|Managers/z_icons.png:File|Managers/Z_ICONS.PNG:$(PROGS)/develop/libraries/box_lib/asm/trunk/z_icons.png \ |
||
186 | fonts/euro.chr:FONTS/EURO.CHR:$(PROGS)/demos/bgitest/trunk/FONTS/EURO.CHR \ |
||
187 | fonts/goth.chr:FONTS/GOTH.CHR:$(PROGS)/demos/bgitest/trunk/FONTS/GOTH.CHR \ |
||
188 | fonts/lcom.chr:FONTS/LCOM.CHR:$(PROGS)/demos/bgitest/trunk/FONTS/LCOM.CHR \ |
||
189 | fonts/litt.chr:FONTS/LITT.CHR:$(PROGS)/demos/bgitest/trunk/FONTS/LITT.CHR \ |
||
190 | fonts/sans.chr:FONTS/SANS.CHR:$(PROGS)/demos/bgitest/trunk/FONTS/SANS.CHR \ |
||
191 | fonts/scri.chr:FONTS/SCRI.CHR:$(PROGS)/demos/bgitest/trunk/FONTS/SCRI.CHR \ |
||
192 | fonts/simp.chr:FONTS/SIMP.CHR:$(PROGS)/demos/bgitest/trunk/FONTS/SIMP.CHR \ |
||
193 | fonts/smal.chr:FONTS/SMAL.CHR:$(PROGS)/demos/bgitest/trunk/FONTS/SMAL.CHR \ |
||
194 | fonts/trip.chr:FONTS/TRIP.CHR:$(PROGS)/demos/bgitest/trunk/FONTS/TRIP.CHR \ |
||
1759 | dunkaist | 195 | fonts/tscr.chr:FONTS/TSCR.CHR:$(PROGS)/demos/bgitest/trunk/FONTS/TSCR.CHR \ |
196 | games/snake.ini:GAMES/SNAKE.INI:$(PROGS)/games/snake/trunk/snake.ini |
||
1737 | clevermous | 197 | |
1764 | clevermous | 198 | # The list of all C-- programs with one main C-- file. |
1766 | clevermous | 199 | # Format of an item is exactly the same as in the previous list, |
200 | # except that there can be fourth field with parameters for a compiler. |
||
1764 | clevermous | 201 | CMM_PROGRAMS:=\ |
202 | File|Managers/eolite:File|Managers/EOLITE:$(PROGS)/fs/Eolite/trunk/Eolite.c-- \ |
||
203 | games/clicks:GAMES/CLICKS:$(PROGS)/games/clicks/trunk/clicks.c-- \ |
||
1766 | clevermous | 204 | games/mine:GAMES/MINE:$(PROGS)/games/mine/trunk/mine.c--:/MEOS \ |
1764 | clevermous | 205 | # end if list |
206 | |||
1737 | clevermous | 207 | # List of other files to be included in the image file. |
208 | # Some of them are auto-built with special rules, some just exist before build. |
||
209 | # Each item is of the form |
||
210 | # Spaces should be represented as |. |
||
211 | OTHER_FILES:=asciivju:ASCIIVJU autorun.dat:AUTORUN.DAT \ |
||
212 | background.gif:background.gif default.skn:DEFAULT.SKN \ |
||
213 | e80:E80 graph:GRAPH hdread:HDREAD htmlv:HTMLV \ |
||
214 | icons.dat:ICONS.DAT iconstrp.gif:ICONSTRP.GIF index_htm:INDEX.HTM \ |
||
215 | kernel.mnt:KERNEL.MNT kerpack:KERPACK keymap.key:KEYMAP.KEY kpack:KPACK \ |
||
216 | kuzkina.mid:KUZKINA.MID lang.inc:LANG.INC lang.ini:LANG.INI \ |
||
217 | menu.dat:MENU.DAT mykey:MYKEY @notify:@NOTIFY \ |
||
218 | panel.dat:PANEL.DAT pipetka:PIPETKA setup.dat:SETUP.DAT \ |
||
219 | shell:SHELL spanel:SPANEL table:TABLE test:TEST \ |
||
1786 | yogev_ezra | 220 | vmode:VMODE 3d/3dsheart:3D/3DSHEART \ |
1788 | yogev_ezra | 221 | 3d/cubeline:3D/CUBELINE 3d/gears:3D/GEARS 3d/house.3ds:3D/HOUSE.3DS \ |
1752 | clevermous | 222 | demos/ak47.lif:DEMOS/AK47.LIF \ |
1737 | clevermous | 223 | demos/barge.lif:DEMOS/BARGE.LIF demos/life2:DEMOS/LIFE2 \ |
224 | demos/relay.lif:DEMOS/RELAY.LIF demos/rpento.lif:DEMOS/RPENTO.LIF \ |
||
1778 | yogev_ezra | 225 | demos/use_mb:DEMOS/USE_MB \ |
1737 | clevermous | 226 | drivers/atikms.dll:DRIVERS/ATIKMS.DLL \ |
227 | File|Managers/buttons.bmp:File|Managers/BUTTONS.BMP \ |
||
228 | File|Managers/eolite.ini:File|Managers/EOLITE.INI \ |
||
229 | File|Managers/icons.bmp:File|Managers/ICONS.BMP \ |
||
230 | File|Managers/icons.ini:File|Managers/ICONS.INI \ |
||
231 | File|Managers/kfar.ini:File|Managers/KFAR.INI \ |
||
232 | File|Managers/kfm:File|Managers/KFM \ |
||
233 | File|Managers/kfm.ini:File|Managers/KFM.INI \ |
||
234 | File|Managers/kfm_keys.txt:File|Managers/KFM_KEYS.TXT \ |
||
235 | fonts/bold.chr:FONTS/BOLD.CHR fonts/char2.mt:FONTS/CHAR2.MT \ |
||
236 | fonts/char.mt:FONTS/CHAR.MT \ |
||
237 | games/appdata.dat:GAMES/APPDATA.DAT games/ataka:GAMES/ATAKA \ |
||
1752 | clevermous | 238 | games/basekurs.kla:GAMES/BASEKURS.KLA games/bnc:GAMES/BNC \ |
1764 | clevermous | 239 | games/checkers:GAMES/CHECKERS \ |
1737 | clevermous | 240 | games/FindNumbers:GAMES/FindNumbers games/gomoku:GAMES/GOMOKU \ |
241 | games/klavisha:GAMES/KLAVISHA games/kosilka:GAMES/KOSILKA \ |
||
242 | games/kosskin.gfx:GAMES/KOSSKIN.GFX games/kox:GAMES/KOX \ |
||
1766 | clevermous | 243 | games/lights:GAMES/LIGHTS games/megamaze:GAMES/MEGAMAZE \ |
1737 | clevermous | 244 | games/msquare:GAMES/MSQUARE games/padenie:GAMES/PADENIE \ |
245 | games/reversi:GAMES/REVERSI games/rforces:GAMES/RFORCES \ |
||
1759 | dunkaist | 246 | games/sq_game:GAMES/SQ_GAME \ |
1737 | clevermous | 247 | games/sudoku:GAMES/SUDOKU games/sw:GAMES/SW games/whowtbam:GAMES/WHOWTBAM \ |
248 | games/xonix:GAMES/XONIX \ |
||
249 | lib/cnv_png.obj:LIB/CNV_PNG.OBJ lib/msgbox.obj:LIB/MSGBOX.OBJ \ |
||
250 | lib/pixlib.obj:LIB/PIXLIB.OBJ lib/sort.obj:LIB/SORT.OBJ \ |
||
251 | media/ac97snd:MEDIA/AC97SND media/kiv.ini:MEDIA/KIV.INI \ |
||
252 | network/jmail:NETWORK/JMAIL network/zeroconf.ini:NETWORK/ZEROCONF.INI \ |
||
253 | #end of list |
||
254 | #3d/logio.bmp:3D/LOGIO.BMP 3d/cubetext:3D/CUBETEXT |
||
255 | |||
256 | # Some macro for convenient work. |
||
257 | # Macros for replacing '|' to escaped space '\ '. |
||
258 | space:=\ #plus space |
||
259 | respace=$(subst |,$(space),$(1)) |
||
260 | # Macro for selecting different parts of ':'-separated items. |
||
261 | binarypart=$(word 1,$(subst :, ,$(1))) |
||
262 | imagepart=$(word 2,$(subst :, ,$(1))) |
||
263 | sourcepart=$(word 3,$(subst :, ,$(1))) |
||
1766 | clevermous | 264 | parampart=$(word 4,$(subst :, ,$(1))) |
1737 | clevermous | 265 | # Get file names, possibly with spaces inside, from an item. |
266 | # Here $(f) is an item - in fact, macro argument. |
||
267 | fbinary=$(call respace,$(call binarypart,$(f))) |
||
268 | fimage=$(call respace,$(call imagepart,$(f))) |
||
269 | fsource=$(call respace,$(call sourcepart,$(f))) |
||
1766 | clevermous | 270 | fparam=$(call respace,$(call parampart,$(f))) |
1737 | clevermous | 271 | |
272 | # Define targets for image file. |
||
1752 | clevermous | 273 | # Join all the lists above. |
1764 | clevermous | 274 | targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS) |
1752 | clevermous | 275 | # For each item in the united list call fbinary. |
276 | targets:=$(foreach f,$(targets_full),$(fbinary)) |
||
1737 | clevermous | 277 | |
278 | # Define a command for copying a file inside the image. |
||
279 | # mcopy_command is a macro with two parameters, |
||
280 | # local file name $(1) and image file name $(2). |
||
281 | # Note that spaces in these have to be escaped with backslashes. |
||
1766 | clevermous | 282 | mcopy_command=mcopy -moi $(BUILD_DIR)/kolibri.img $(1) ::$(2) |
1737 | clevermous | 283 | # Specialize a previous command for an item $(f) in one of lists. |
284 | mcopy_item_command=$(call mcopy_command,$(fbinary),$(fimage)) |
||
285 | |||
286 | # Join all $(mcopy_item_command) for all items, |
||
287 | # append newline after each item. |
||
288 | # The first newline character after "define" line and |
||
289 | # the last newline character before "endef" line get away |
||
290 | # with define/endef, so we make three newline characters, |
||
291 | # that is two empty lines, in order to get one in $(newline). |
||
292 | define newline |
||
293 | |||
294 | |||
295 | endef |
||
1752 | clevermous | 296 | mcopy_all_items:=$(foreach f,$(targets_full),$(mcopy_item_command)$(newline)) |
1737 | clevermous | 297 | |
298 | # The main goal: image. |
||
299 | $(BUILD_DIR)/kolibri.img: $(BUILD_DIR)/.dir \ |
||
300 | Makefile \ |
||
301 | $(BUILD_DIR)/boot_fat12.bin \ |
||
302 | $(targets) |
||
303 | # SYSXTREE |
||
304 | # 3d/CUBETEXT |
||
305 | # 3d/LOGIO.BMP |
||
1740 | clevermous | 306 | dd if=/dev/zero of=$(BUILD_DIR)/kolibri.img count=2880 bs=512 2>&1 |
1737 | clevermous | 307 | mformat -f 1440 -i $(BUILD_DIR)/kolibri.img :: |
1740 | clevermous | 308 | dd if=$(BUILD_DIR)/boot_fat12.bin of=$(BUILD_DIR)/kolibri.img count=1 bs=512 conv=notrunc 2>&1 |
1737 | clevermous | 309 | mmd -i $(BUILD_DIR)/kolibri.img ::3D |
310 | mmd -i $(BUILD_DIR)/kolibri.img ::DEMOS |
||
311 | mmd -i $(BUILD_DIR)/kolibri.img ::DEVELOP |
||
312 | mmd -i $(BUILD_DIR)/kolibri.img ::DRIVERS |
||
313 | mmd -i $(BUILD_DIR)/kolibri.img ::File\ Managers |
||
314 | mmd -i $(BUILD_DIR)/kolibri.img ::FONTS |
||
315 | mmd -i $(BUILD_DIR)/kolibri.img ::GAMES |
||
316 | mmd -i $(BUILD_DIR)/kolibri.img ::LIB |
||
317 | mmd -i $(BUILD_DIR)/kolibri.img ::MEDIA |
||
318 | mmd -i $(BUILD_DIR)/kolibri.img ::NETWORK |
||
319 | $(mcopy_all_items) |
||
320 | |||
1766 | clevermous | 321 | # Special targets to modify behaviour of make. |
1737 | clevermous | 322 | .DELETE_ON_ERROR: |
1766 | clevermous | 323 | .SUFFIXES: # disable all predefined rules |
1737 | clevermous | 324 | |
325 | # The floppy bootsector. |
||
326 | $(BUILD_DIR)/boot_fat12.bin: $(KERNEL)/bootloader/boot_fat12.asm $(KERNEL)/bootloader/floppy1440.inc |
||
327 | fasm $(KERNEL)/bootloader/boot_fat12.asm $(BUILD_DIR)/boot_fat12.bin |
||
328 | |||
329 | $(BUILD_DIR)/.dir 3d/.dir demos/.dir develop/.dir drivers/.dir fonts/.dir \ |
||
330 | games/.dir lib/.dir media/.dir network/.dir .deps/.dir: |
||
331 | mkdir -p $(dir $@) |
||
332 | touch $@ |
||
333 | File\ Managers/.dir: |
||
334 | mkdir -p "File Managers" |
||
335 | touch "File Managers/.dir" |
||
336 | |||
1744 | clevermous | 337 | # FASM black magic goes to Makefile.fasm. |
338 | include Makefile.fasm |
||
1737 | clevermous | 339 | |
1752 | clevermous | 340 | # Similar for NASM. |
341 | include Makefile.nasm |
||
1737 | clevermous | 342 | |
1752 | clevermous | 343 | # Similar for copying files. |
344 | include Makefile.copy |
||
345 | |||
346 | # Special rules for copying sysfuncr.txt - it isn't directly included in the image. |
||
1737 | clevermous | 347 | docpak: $(DOCDIR)SYSFUNCR.TXT $(wildcard $(DOCDIR)*) |
348 | $(DOCDIR)SYSFUNCR.TXT: $(KERNEL)/docs/sysfuncr.txt |
||
349 | cp $(KERNEL)/docs/sysfuncr.txt $(DOCDIR)SYSFUNCR.TXT |
||
1764 | clevermous | 350 | |
351 | # Similar for C--. |
||
352 | include Makefile.cmm |
||
353 | |||
354 | # Sorry, even black magic seems to be insufficient for |
||
355 | # auto-handling all subtle effects. So we just define |
||
356 | # command lines for compiling and linking, and |
||
357 | # maintain the list of sources and objects by hand. |
||
358 | include Makefile.msvc |
||
359 | |||
360 | # Rules for table |
||
361 | table: .obj.table/table.exe |
||
362 | $(msvc_final) |
||
363 | TABLE_OBJECTS:=.obj.table/calc.obj .obj.table/func.obj .obj.table/hello.obj \ |
||
364 | .obj.table/KosFile.obj .obj.table/kosSyst.obj .obj.table/math2.obj \ |
||
365 | .obj.table/mcsmemm.obj .obj.table/parser.obj |
||
366 | TABLE_H_FILES:=$(wildcard $(PROGS)/other/table/*.h) |
||
367 | .obj.table/table.exe: $(TABLE_OBJECTS) |
||
368 | $(msvc_link) |
||
369 | $(TABLE_OBJECTS): .obj.table/%.obj: $(PROGS)/other/table/%.cpp $(TABLE_H_FILES) Makefile.msvc | .obj.table |
||
370 | $(msvc_compile) |
||
371 | .obj.table: |
||
372 | mkdir -p .obj.table |
||
373 | |||
374 | # Rules for graph |
||
375 | graph: .obj.graph/graph.exe |
||
376 | $(msvc_final) |
||
377 | GRAPH_CPP_OBJECTS:=.obj.graph/func.obj .obj.graph/hello.obj .obj.graph/kolibri.obj \ |
||
378 | .obj.graph/KosFile.obj .obj.graph/kosSyst.obj .obj.graph/math2.obj \ |
||
379 | .obj.graph/mcsmemm.obj .obj.graph/parser.obj |
||
380 | GRAPH_C_OBJECTS:=.obj.graph/string.obj |
||
381 | GRAPH_H_FILES:=$(wildcard $(PROGS)/other/graph/*.h) |
||
382 | GRAPH_FASM_OBJECTS:=.obj.graph/memcpy.obj .obj.graph/memset.obj |
||
383 | .obj.graph/graph.exe: $(GRAPH_CPP_OBJECTS) $(GRAPH_C_OBJECTS) $(GRAPH_FASM_OBJECTS) |
||
384 | $(msvc_link) |
||
385 | $(GRAPH_CPP_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.cpp $(GRAPH_H_FILES) Makefile.msvc | .obj.graph |
||
386 | $(msvc_compile) |
||
387 | $(GRAPH_C_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.c $(GRAPH_H_FILES) Makefile.msvc | .obj.graph |
||
388 | $(msvc_compile) |
||
389 | $(GRAPH_FASM_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.asm Makefile.msvc | .obj.graph |
||
390 | fasm $< $@ |
||
391 | .obj.graph: |
||
392 | mkdir -p .obj.graph |
||
393 | |||
394 | # Rules for kosilka |
||
395 | games/kosilka: .obj.kosilka/kosilka.exe |
||
396 | $(msvc_final) |
||
397 | KOSILKA_OBJECTS:=.obj.kosilka/kosilka.obj .obj.kosilka/KosFile.obj .obj.kosilka/kosSyst.obj .obj.kosilka/mcsmemm.obj |
||
398 | KOSILKA_H_FILES:=$(PROGS)/games/kosilka/*.h |
||
399 | .obj.kosilka/kosilka.exe: $(KOSILKA_OBJECTS) |
||
400 | $(msvc_link) |
||
401 | $(KOSILKA_OBJECTS): .obj.kosilka/%.obj: $(PROGS)/games/kosilka/%.cpp $(KOSILKA_H_FILES) Makefile.msvc | .obj.kosilka |
||
402 | $(msvc_compile) |
||
403 | .obj.kosilka: |
||
404 | mkdir -p .obj.kosilka |
||
405 | |||
406 | include Makefile.gcc |
||
407 | |||
408 | # Rules for shell |
||
409 | shell: .obj.shell/start.o .obj.shell/shell.o .obj.shell/kolibri.o .obj.shell/stdlib.o .obj.shell/string.o \ |
||
410 | $(PROGS)/system/shell/kolibri.ld |
||
411 | $(call gcc_link,$(PROGS)/system/shell/kolibri.ld) |
||
412 | .obj.shell/shell.o: $(PROGS)/system/shell/shell.c \ |
||
413 | $(PROGS)/system/shell/all.h \ |
||
414 | $(PROGS)/system/shell/system/*.h \ |
||
415 | $(PROGS)/system/shell/cmd/*.c \ |
||
416 | $(PROGS)/system/shell/modules/*.c \ |
||
417 | $(PROGS)/system/shell/locale/rus/globals.h \ |
||
418 | Makefile.gcc | .obj.shell |
||
419 | $(gcc_compile) |
||
420 | .obj.shell/kolibri.o .obj.shell/stdlib.o .obj.shell/string.o: .obj.shell/%.o: \ |
||
421 | $(PROGS)/system/shell/system/%.c $(PROGS)/system/shell/system/*.h \ |
||
422 | Makefile.gcc | .obj.shell |
||
423 | $(gcc_compile) |
||
424 | .obj.shell/start.o: $(PROGS)/system/shell/start.asm | .obj.shell |
||
425 | fasm $< $@ |
||
426 | .obj.shell: |
||
427 | mkdir -p .obj.shell |
||
428 | |||
429 | # Rules for media/ac97snd |
||
430 | # Not compilable from svn sources, using preloaded binary |
||
431 | |||
432 | # Rules for atikms.dll |
||
433 | # Use Makefile from $(REPOSITORY)/drivers/ddk and $(REPOSITORY)/drivers/video/drm/radeon |
||
434 | # However, dependencies must be duplicated - I don't know how to avoid this |
||
435 | # without need to rebuild kolibri.img at every iteration... |
||
436 | # Note that we are going to write in the directory shared |
||
437 | # between all Makefiles, so we need locked operations. |
||
438 | drivers/atikms.dll: $(REPOSITORY)/drivers/video/drm/radeon/atikms.dll drivers/.dir |
||
439 | kpack --nologo $< $@ |
||
440 | $(REPOSITORY)/drivers/video/drm/radeon/atikms.dll: |
||
441 | flock $(REPOSITORY)/drivers/video/drm/radeon/.lock \ |
||
442 | $(MAKE) CC=win32-gcc AS=win32-as LD=win32-ld AR=win32-ar FASM=fasm -C $(REPOSITORY)/drivers/video/drm/radeon |
||
443 | $(REPOSITORY)/drivers/ddk/libddk.a: |
||
444 | flock $(REPOSITORY)/drivers/ddk/.lock \ |
||
445 | $(MAKE) CC=win32-gcc AS=win32-as LD=win32-ld AR=win32-ar FASM=fasm -C $(REPOSITORY)/drivers/ddk |
||
446 | # dependencies |
||
447 | $(REPOSITORY)/drivers/video/drm/radeon/atikms.dll: \ |
||
448 | $(REPOSITORY)/drivers/video/drm/radeon/atikms.lds \ |
||
449 | $(REPOSITORY)/drivers/ddk/libddk.a \ |
||
450 | $(REPOSITORY)/drivers/video/drm/radeon/*.[Sch] \ |
||
451 | $(REPOSITORY)/drivers/video/drm/radeon/*.asm \ |
||
452 | $(REPOSITORY)/drivers/video/drm/radeon/Makefile \ |
||
453 | $(REPOSITORY)/drivers/video/drm/radeon/firmware/*.bin \ |
||
454 | $(REPOSITORY)/drivers/include/*.h \ |
||
455 | $(REPOSITORY)/drivers/include/*/*.h \ |
||
456 | $(REPOSITORY)/drivers/include/*/*/*.h \ |
||
457 | $(REPOSITORY)/drivers/include/*/*/*/*.h |
||
458 | $(REPOSITORY)/drivers/ddk/libddk.a: \ |
||
459 | $(REPOSITORY)/drivers/ddk/Makefile \ |
||
460 | $(REPOSITORY)/drivers/ddk/*/* \ |
||
461 | $(REPOSITORY)/drivers/include/*.h \ |
||
462 | $(REPOSITORY)/drivers/include/*/*.h \ |
||
463 | $(REPOSITORY)/drivers/include/*/*/*.h \ |
||
464 | $(REPOSITORY)/drivers/include/*/*/*/*.h>>> |