Rev 2374 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2370 | hidnplayr | 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 |
||
8 | REPOSITORY:=../.. |
||
9 | KERNEL:=$(REPOSITORY)/kernel/branches/net |
||
2372 | hidnplayr | 10 | TRUNKKERNEL:=$(REPOSITORY)/kernel/trunk |
2370 | hidnplayr | 11 | PROGS:=$(REPOSITORY)/programs |
12 | NETPROGS:=$(REPOSITORY)/kernel/branches/net/applications |
||
13 | |||
14 | # Docpak requires some documents; we place them |
||
15 | # into 'docs' subdir and communicate with FASM |
||
16 | # through environment var DOCDIR. |
||
17 | DOCDIR:=docs/ |
||
18 | export DOCDIR |
||
19 | |||
20 | # Because most programs are written in FASM and have |
||
21 | # the common structure of one main .asm file possibly including |
||
22 | # several .inc files, we handle this case separately. |
||
23 | # Namely, we organize one big list of such programs |
||
24 | # (FASM_PROGRAMS, see below) containing name of local binary file, |
||
25 | # name of file inside kolibri.img and name of the source file. |
||
26 | # This list is maintained by hand, and the rest is done with some macroses... |
||
27 | # well, slightly complicated macroses - however, you do not need to |
||
28 | # understand them in order to maintain the list. |
||
29 | # To add a FASM program with one .asm file, just |
||
30 | # add the corresponding item to the list and enjoy |
||
31 | # the power of GNU make. |
||
32 | |||
33 | # The list of all FASM programs with one main FASM file. |
||
34 | # Every item consists of three parts, separated by ':'. |
||
35 | # First part is the real name of binary file in $(BUILD_DIR) |
||
36 | # as it should be produced by make. |
||
37 | # Second part is the name of a file inside kolibri.img, |
||
38 | # usually uppercased version of first part - to save space |
||
39 | # for FAT filesystem. |
||
40 | # Third part is the name of the source file. |
||
41 | # Spaces separate items, so spaces in names should be |
||
42 | # represented as '|'. |
||
43 | FASM_PROGRAMS:=\ |
||
44 | @clip:@CLIP:$(PROGS)/system/clip/trunk/@clip.ASM \ |
||
45 | @menu:@MENU:$(PROGS)/system/menu/trunk/menu.asm \ |
||
46 | @notify:@NOTIFY:$(PROGS)/system/notify/trunk/@notify.asm \ |
||
47 | @panel:@PANEL:$(PROGS)/system/panel/trunk/@PANEL.ASM \ |
||
48 | @rb:@RB:$(PROGS)/system/rb/trunk/@RB.ASM \ |
||
49 | @ss:@SS:$(PROGS)/system/ss/trunk/@ss.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 | docpak:DOCPAK:$(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 | kbd:KBD:$(PROGS)/system/kbd/trunk/kbd.ASM \ |
||
64 | kpack:KPACK:$(PROGS)/other/kpack/trunk/kpack.asm \ |
||
65 | launcher:LAUNCHER:$(PROGS)/system/launcher/trunk/launcher.asm \ |
||
66 | magnify:MAGNIFY:$(PROGS)/demos/magnify/trunk/magnify.asm \ |
||
67 | mgb:MGB:$(PROGS)/system/mgb/trunk/mgb.asm \ |
||
68 | mousemul:MOUSEMUL:$(PROGS)/system/mousemul/trunk/mousemul.asm \ |
||
69 | mykey:MYKEY:$(PROGS)/system/MyKey/trunk/MyKey.asm \ |
||
70 | pcidev:PCIDEV:$(PROGS)/system/pcidev/trunk/PCIDEV.ASM \ |
||
71 | period:PERIOD:$(PROGS)/other/period/trunk/period.asm \ |
||
72 | pic4:PIC4:$(PROGS)/media/pic4/trunk/pic4.asm \ |
||
73 | rdsave:RDSAVE:$(PROGS)/system/rdsave/trunk/rdsave.asm \ |
||
74 | rtfread:RTFREAD:$(PROGS)/other/rtfread/trunk/rtfread.asm \ |
||
75 | run:RUN:$(PROGS)/system/run/trunk/run.asm \ |
||
76 | scrshoot:SCRSHOOT:$(PROGS)/media/scrshoot/scrshoot.asm \ |
||
77 | setup:SETUP:$(PROGS)/system/setup/trunk/setup.asm \ |
||
78 | test:TEST:$(PROGS)/system/test/trunk/test.asm \ |
||
79 | tinypad:TINYPAD:$(PROGS)/develop/tinypad/trunk/tinypad.asm \ |
||
80 | zkey:ZKEY:$(PROGS)/system/zkey/trunk/ZKEY.ASM \ |
||
81 | develop/board:DEVELOP/BOARD:$(PROGS)/system/board/trunk/board.asm \ |
||
82 | develop/cObj:DEVELOP/cObj:$(PROGS)/develop/cObj/trunk/cObj.asm \ |
||
83 | develop/fasm:DEVELOP/FASM:$(PROGS)/develop/fasm/trunk/fasm.asm \ |
||
84 | develop/h2d2b:DEVELOP/H2D2B:$(PROGS)/develop/h2d2b/trunk/h2d2b.asm \ |
||
85 | develop/heed:DEVELOP/HEED:$(PROGS)/develop/heed/trunk/heed.asm \ |
||
86 | develop/ipc:DEVELOP/IPC:$(PROGS)/network/ipc/trunk/ipc.asm \ |
||
87 | develop/keyascii:DEVELOP/KEYASCII:$(PROGS)/develop/keyascii/trunk/keyascii.asm \ |
||
88 | develop/mtdbg:DEVELOP/MTDBG:$(PROGS)/develop/mtdbg/mtdbg.asm \ |
||
89 | develop/scancode:DEVELOP/SCANCODE:$(PROGS)/develop/scancode/trunk/scancode.asm \ |
||
90 | develop/test_gets:DEVELOP/test_gets:$(PROGS)/develop/libraries/console/examples/test_gets.asm \ |
||
91 | develop/testcon2:DEVELOP/TESTCON2:$(PROGS)/develop/libraries/console/examples/testcon2.asm \ |
||
92 | develop/thread:DEVELOP/THREAD:$(PROGS)/develop/examples/thread/trunk/thread.asm \ |
||
2372 | hidnplayr | 93 | drivers/com_mouse.obj:DRIVERS/COM_MOUSE.OBJ:$(TRUNKKERNEL)/drivers/com_mouse.asm \ |
94 | drivers/emu10k1x.obj:DRIVERS/EMU10K1X.OBJ:$(TRUNKKERNEL)/drivers/emu10k1x.asm \ |
||
95 | drivers/fm801.obj:DRIVERS/FM801.OBJ:$(TRUNKKERNEL)/drivers/fm801.asm \ |
||
96 | drivers/infinity.obj:DRIVERS/INFINITY.OBJ:$(TRUNKKERNEL)/drivers/infinity.asm \ |
||
2370 | hidnplayr | 97 | drivers/ps2mouse.obj:DRIVERS/PS2MOUSE.OBJ:$(REPOSITORY)/drivers/mouse/ps2mouse4d/trunk/ps2mouse.asm \ |
2372 | hidnplayr | 98 | drivers/sb16.obj:DRIVERS/SB16.OBJ:$(TRUNKKERNEL)/drivers/sb16/sb16.asm \ |
99 | drivers/sound.obj:DRIVERS/SOUND.OBJ:$(TRUNKKERNEL)/drivers/sound.asm \ |
||
100 | drivers/vt8235.obj:DRIVERS/VT8235.OBJ:$(TRUNKKERNEL)/drivers/vt823x.asm \ |
||
2370 | hidnplayr | 101 | File|Managers/kfar:File|Managers/KFAR:$(PROGS)/fs/kfar/trunk/kfar.asm \ |
102 | File|Managers/kfm:File|Managers/KFM:$(PROGS)/fs/kfm/trunk/kfm.asm \ |
||
103 | File|Managers/opendial:File|Managers/OPENDIAL:$(PROGS)/fs/opendial/opendial.asm \ |
||
104 | fonts/bgitest:FONTS/BGITEST:$(PROGS)/demos/bgitest/trunk/bgitest.asm \ |
||
105 | lib/archiver.obj:LIB/ARCHIVER.OBJ:$(PROGS)/fs/kfar/trunk/kfar_arc/kfar_arc.asm \ |
||
106 | lib/box_lib.obj:LIB/BOX_LIB.OBJ:$(PROGS)/develop/libraries/box_lib/trunk/box_lib.asm \ |
||
107 | lib/console.obj:LIB/CONSOLE.OBJ:$(PROGS)/develop/libraries/console/console.asm \ |
||
108 | lib/libgfx.obj:LIB/LIBGFX.OBJ:$(PROGS)/develop/libraries/libs-dev/libgfx/libgfx.asm \ |
||
109 | lib/libimg.obj:LIB/LIBIMG.OBJ:$(PROGS)/develop/libraries/libs-dev/libimg/libimg.asm \ |
||
110 | lib/libini.obj:LIB/LIBINI.OBJ:$(PROGS)/develop/libraries/libs-dev/libini/libini.asm \ |
||
111 | lib/libio.obj:LIB/LIBIO.OBJ:$(PROGS)/develop/libraries/libs-dev/libio/libio.asm \ |
||
112 | lib/proc_lib.obj:LIB/PROC_LIB.OBJ:$(PROGS)/develop/libraries/proc_lib/trunk/proc_lib.asm \ |
||
113 | lib/cnv_png.obj:LIB/CNV_PNG.OBJ:$(PROGS)/media/zsea/plugins/png/cnv_png.asm \ |
||
114 | media/animage:MEDIA/ANIMAGE:$(PROGS)/media/animage/trunk/animage.asm \ |
||
115 | media/cdp:MEDIA/CDP:$(PROGS)/media/cdp/trunk/cdp.asm \ |
||
116 | media/kiv:MEDIA/KIV:$(PROGS)/media/kiv/trunk/kiv.asm \ |
||
117 | media/listplay:MEDIA/LISTPLAY:$(PROGS)/media/listplay/trunk/listplay.asm \ |
||
118 | media/midamp:MEDIA/MIDAMP:$(PROGS)/media/midamp/trunk/midamp.asm \ |
||
119 | media/startmus:MEDIA/STARTMUS:$(PROGS)/media/startmus/trunk/STARTMUS.ASM \ |
||
120 | network/arpcfg:NETWORK/ARPCFG:$(NETPROGS)/arpcfg/arpcfg.asm \ |
||
121 | network/icmp:NETWORK/ICMP:$(NETPROGS)/icmp/icmp.asm \ |
||
122 | network/netcfg:NETWORK/NETCFG:$(NETPROGS)/netcfg/netcfg.asm \ |
||
123 | network/netstat:NETWORK/NETSTAT:$(NETPROGS)/netstat/netstat.asm \ |
||
124 | network/nslookup:NETWORK/NSLOOKUP:$(NETPROGS)/nslookup/nslookup.asm \ |
||
125 | network/synergyc:NETWORK/SYNERGYC:$(NETPROGS)/synergyc/synergyc.asm \ |
||
126 | network/tcpserv:NETWORK/TCPSERV:$(NETPROGS)/tcpserv/tcpserv.asm \ |
||
127 | network/telnet:NETWORK/TELNET:$(NETPROGS)/telnet/telnet.asm \ |
||
128 | network/zeroconf:NETWORK/ZEROCONF:$(NETPROGS)/zeroconf/zeroconf.asm \ |
||
129 | lib/network.obj:LIB/NETWORK.OBJ:$(NETPROGS)/libraries/network/network.asm \ |
||
130 | # end of list |
||
131 | |||
132 | # The list of files which should be copied from somewhere. |
||
133 | # Format of an item is exactly the same as in the previous list. |
||
134 | COPY_FILES:=\ |
||
135 | macros.inc:MACROS.INC:$(PROGS)/macros.inc \ |
||
136 | config.inc:CONFIG.INC:$(PROGS)/config.inc \ |
||
137 | struct.inc:STRUCT.INC:$(PROGS)/struct.inc \ |
||
138 | File|Managers/z_icons.png:File|Managers/Z_ICONS.PNG:$(PROGS)/fs/opendial/z_icons.png \ |
||
139 | File|Managers/kfm_keys.txt:File|Managers/KFM_KEYS.TXT:$(PROGS)/fs/kfm/trunk/docs/english/kfm_keys.txt \ |
||
140 | File|Managers/buttons.bmp:File|Managers/BUTTONS.BMP:$(PROGS)/fs/kfm/trunk/buttons.bmp \ |
||
141 | File|Managers/icons.bmp:File|Managers/ICONS.BMP:$(PROGS)/fs/kfm/trunk/icons.bmp \ |
||
142 | media/kiv.ini:MEDIA/KIV.INI:$(PROGS)/media/kiv/trunk/kiv.ini \ |
||
143 | .shell:.shell:$(PROGS)/system/shell/bin/eng/.shell \ |
||
144 | mykey.ini:MYKEY.INI:$(PROGS)/system/MyKey/trunk/mykey.ini \ |
||
145 | # end of list |
||
146 | |||
147 | # The list of all C-- programs with one main C-- file. |
||
148 | # Format of an item is exactly the same as in the previous list, |
||
149 | # except that there can be fourth field with parameters for a compiler. |
||
150 | CMM_PROGRAMS:=\ |
||
151 | File|Managers/Eolite:File|Managers/EOLITE:$(PROGS)/fs/Eolite/trunk/Eolite.c-- \ |
||
152 | HTMLv:HTMLv:$(PROGS)/network/htmlv/browser/HTMLv.c-- \ |
||
153 | #develop/c--:DEVELOP/C--:$(PROGS)/develop/c--/trunk/32.c-- \ |
||
154 | # end of list |
||
155 | |||
156 | # List of other files to be included in the image file. |
||
157 | # Some of them are auto-built with special rules, some just exist before build. |
||
158 | # Each item is of the form |
||
159 | # Spaces should be represented as |. |
||
160 | OTHER_FILES:=autorun.dat:AUTORUN.DAT \ |
||
161 | background.gif:background.gif default.skn:DEFAULT.SKN \ |
||
162 | icons.dat:ICONS.DAT iconstrp.gif:ICONSTRP.GIF index_htm:INDEX.HTM \ |
||
163 | kernel.mnt:KERNEL.MNT kerpack:KERPACK keymap.key:KEYMAP.KEY \ |
||
2372 | hidnplayr | 164 | lang.inc:LANG.INC lang.ini:LANG.INI \ |
2370 | hidnplayr | 165 | menu.dat:MENU.DAT \ |
166 | panel.dat:PANEL.DAT setup.dat:SETUP.DAT \ |
||
2372 | hidnplayr | 167 | shell:SHELL \ |
2370 | hidnplayr | 168 | vmode:VMODE \ |
169 | File|Managers/eolite.ini:File|Managers/EOLITE.INI \ |
||
170 | File|Managers/icons.ini:File|Managers/ICONS.INI \ |
||
171 | File|Managers/kfar.ini:File|Managers/KFAR.INI \ |
||
172 | File|Managers/kfm.ini:File|Managers/KFM.INI \ |
||
173 | fonts/bold.chr:FONTS/BOLD.CHR fonts/char2.mt:FONTS/CHAR2.MT \ |
||
174 | fonts/char.mt:FONTS/CHAR.MT \ |
||
175 | lib/msgbox.obj:LIB/MSGBOX.OBJ \ |
||
176 | lib/pixlib.obj:LIB/PIXLIB.OBJ lib/sort.obj:LIB/SORT.OBJ \ |
||
177 | media/ac97snd:MEDIA/AC97SND \ |
||
178 | network/zeroconf.ini:NETWORK/ZEROCONF.INI \ |
||
179 | #end of list |
||
180 | |||
181 | # Some macro for convenient work. |
||
182 | # Macros for replacing '|' to escaped space '\ '. |
||
183 | space:=\ #plus space |
||
184 | respace=$(subst |,$(space),$(1)) |
||
185 | # Macro for selecting different parts of ':'-separated items. |
||
186 | binarypart=$(word 1,$(subst :, ,$(1))) |
||
187 | imagepart=$(word 2,$(subst :, ,$(1))) |
||
188 | sourcepart=$(word 3,$(subst :, ,$(1))) |
||
189 | parampart=$(word 4,$(subst :, ,$(1))) |
||
190 | # Get file names, possibly with spaces inside, from an item. |
||
191 | # Here $(f) is an item - in fact, macro argument. |
||
192 | fbinary=$(call respace,$(call binarypart,$(f))) |
||
193 | fimage=$(call respace,$(call imagepart,$(f))) |
||
194 | fsource=$(call respace,$(call sourcepart,$(f))) |
||
195 | fparam=$(call respace,$(call parampart,$(f))) |
||
196 | |||
197 | # Define targets for image file. |
||
198 | # Join all the lists above. |
||
199 | targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS) |
||
200 | # For each item in the united list call fbinary. |
||
201 | targets:=$(foreach f,$(targets_full),$(fbinary)) |
||
202 | |||
203 | # Define a command for copying a file inside the image. |
||
204 | # mcopy_command is a macro with two parameters, |
||
205 | # local file name $(1) and image file name $(2). |
||
206 | # Note that spaces in these have to be escaped with backslashes. |
||
207 | mcopy_command=mcopy -moi $(BUILD_DIR)/kolibri.img $(1) ::$(2) |
||
208 | # Specialize a previous command for an item $(f) in one of lists. |
||
209 | mcopy_item_command=$(call mcopy_command,$(fbinary),$(fimage)) |
||
210 | |||
211 | # Join all $(mcopy_item_command) for all items, |
||
212 | # append newline after each item. |
||
213 | # The first newline character after "define" line and |
||
214 | # the last newline character before "endef" line get away |
||
215 | # with define/endef, so we make three newline characters, |
||
216 | # that is two empty lines, in order to get one in $(newline). |
||
217 | define newline |
||
218 | |||
219 | |||
220 | endef |
||
221 | mcopy_all_items:=$(foreach f,$(targets_full),$(mcopy_item_command)$(newline)) |
||
222 | |||
223 | # dependencies of MKISOFS_EXTRA; we iterate through $(MKISOFS_EXTRA), |
||
224 | # substitute "=" with space, get the 2nd word and join all results |
||
225 | mkisofs_extra_targets:=$(foreach f,$(MKISOFS_EXTRA),$(word 2,$(subst =, ,$(f)))) |
||
226 | |||
227 | # The main goal: build kolibri.img and kolibri.iso |
||
2372 | hidnplayr | 228 | all: $(BUILD_DIR)/kolibri.img |
2370 | hidnplayr | 229 | |
230 | # The first goal: floppy image. |
||
231 | $(BUILD_DIR)/kolibri.img: $(BUILD_DIR)/.dir \ |
||
232 | Makefile \ |
||
233 | $(BUILD_DIR)/boot_fat12.bin \ |
||
234 | $(targets) |
||
235 | # SYSXTREE |
||
236 | # 3d/CUBETEXT |
||
237 | # 3d/LOGIO.BMP |
||
2375 | hidnplayr | 238 | str=`date -u +"[auto-build %d %b %Y %R, r$(REV)]"`; \ |
239 | echo -n $$str|dd of=kernel.mnt bs=1 seek=`expr 279 - length "$$str"` conv=notrunc 2>/dev/null |
||
240 | dd if=/dev/zero of=$(BUILD_DIR)/kolibri.img count=2880 bs=512 2>&1 |
||
241 | mformat -f 1440 -i $(BUILD_DIR)/kolibri.img :: |
||
242 | dd if=$(BUILD_DIR)/boot_fat12.bin of=$(BUILD_DIR)/kolibri.img count=1 bs=512 conv=notrunc 2>&1 |
||
243 | mmd -i $(BUILD_DIR)/kolibri.img ::DEVELOP |
||
244 | mmd -i $(BUILD_DIR)/kolibri.img ::DRIVERS |
||
245 | mmd -i $(BUILD_DIR)/kolibri.img ::File\ Managers |
||
246 | mmd -i $(BUILD_DIR)/kolibri.img ::FONTS |
||
247 | mmd -i $(BUILD_DIR)/kolibri.img ::LIB |
||
248 | mmd -i $(BUILD_DIR)/kolibri.img ::MEDIA |
||
249 | mmd -i $(BUILD_DIR)/kolibri.img ::NETWORK |
||
250 | $(mcopy_all_items) |
||
2370 | hidnplayr | 251 | |
252 | # Special targets to modify behaviour of make. |
||
253 | .DELETE_ON_ERROR: |
||
254 | .SUFFIXES: # delete all predefined rules |
||
255 | |||
256 | # The floppy bootsector. |
||
2374 | hidnplayr | 257 | $(BUILD_DIR)/boot_fat12.bin: $(TRUNKKERNEL)/bootloader/boot_fat12.asm $(TRUNKKERNEL)/bootloader/floppy1440.inc |
2375 | hidnplayr | 258 | fasm $(TRUNKKERNEL)/bootloader/boot_fat12.asm $(BUILD_DIR)/boot_fat12.bin |
2370 | hidnplayr | 259 | |
260 | $(BUILD_DIR)/.dir develop/.dir drivers/.dir fonts/.dir \ |
||
261 | lib/.dir media/.dir network/.dir .deps/.dir: |
||
2375 | hidnplayr | 262 | mkdir -p $(dir $@) |
263 | touch $@ |
||
2370 | hidnplayr | 264 | File\ Managers/.dir: |
2375 | hidnplayr | 265 | mkdir -p "File Managers" |
266 | touch "File Managers/.dir" |
||
2370 | hidnplayr | 267 | |
268 | # FASM black magic goes to Makefile.fasm. |
||
269 | include Makefile.fasm |
||
270 | |||
271 | # Similar for NASM. |
||
272 | include Makefile.nasm |
||
273 | |||
274 | # Similar for copying files. |
||
275 | include Makefile.copy |
||
276 | |||
277 | # Special rules for copying sysfuncs.txt - it isn't directly included in the image. |
||
278 | docpak: $(DOCDIR)SYSFUNCS.TXT $(wildcard $(DOCDIR)*) |
||
2372 | hidnplayr | 279 | $(DOCDIR)SYSFUNCS.TXT: $(TRUNKKERNEL)/docs/sysfuncs.txt |
2375 | hidnplayr | 280 | cp $(TRUNKKERNEL)/docs/sysfuncs.txt $(DOCDIR)SYSFUNCS.TXT |
2370 | hidnplayr | 281 | |
282 | # Similar for C--. |
||
283 | include Makefile.cmm |
||
284 | |||
285 | # Sorry, even black magic seems to be insufficient for |
||
286 | # auto-handling all subtle effects. So we just define |
||
287 | # command lines for compiling and linking, and |
||
288 | # maintain the list of sources and objects by hand. |
||
289 | include Makefile.msvc |
||
290 | |||
291 | |||
292 | # Rules for shell |
||
293 | 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 \ |
||
294 | $(PROGS)/system/shell/kolibri.ld |
||
2375 | hidnplayr | 295 | $(call gcc_link,$(PROGS)/system/shell/kolibri.ld) |
2370 | hidnplayr | 296 | .obj.shell/shell.o: $(PROGS)/system/shell/shell.c \ |
297 | $(PROGS)/system/shell/all.h \ |
||
298 | $(PROGS)/system/shell/system/*.h \ |
||
299 | $(PROGS)/system/shell/cmd/*.c \ |
||
300 | $(PROGS)/system/shell/modules/*.c \ |
||
301 | $(PROGS)/system/shell/locale/rus/globals.h \ |
||
302 | Makefile.gcc | .obj.shell |
||
2375 | hidnplayr | 303 | $(gcc_compile) |
2370 | hidnplayr | 304 | .obj.shell/kolibri.o .obj.shell/stdlib.o .obj.shell/string.o .obj.shell/ctype.o: .obj.shell/%.o: \ |
305 | $(PROGS)/system/shell/system/%.c $(PROGS)/system/shell/system/*.h \ |
||
306 | Makefile.gcc | .obj.shell |
||
2375 | hidnplayr | 307 | $(gcc_compile) |
308 | win32-gcc -c -Os -o $@ $< |
||
2370 | hidnplayr | 309 | .obj.shell/start.o: $(PROGS)/system/shell/start.asm | .obj.shell |
2375 | hidnplayr | 310 | fasm $< $@ |
2370 | hidnplayr | 311 | .obj.shell: |
2375 | hidnplayr | 312 | mkdir -p .obj.shell |
2370 | hidnplayr | 313 | |
314 | # Rules for sdk/sound, used by media/ac97snd |
||
315 | SOUNDDIR=$(PROGS)/develop/sdk/trunk/sound/src |
||
316 | SOUND_OBJECTS:=$(patsubst $(SOUNDDIR)/%.asm,.sdk/%.obj,$(wildcard $(SOUNDDIR)/*.asm)) |
||
317 | SOUND_INC_FILES:=$(wildcard $(SOUNDDIR)/*.inc) |
||
318 | .sdk/sound.lib: $(SOUND_OBJECTS) |
||
2375 | hidnplayr | 319 | win32-link /lib /out:$@ $^ |
2370 | hidnplayr | 320 | $(SOUND_OBJECTS): .sdk/%.obj: $(SOUNDDIR)/%.asm $(SOUND_INC_FILES) | .sdk |
2375 | hidnplayr | 321 | fasm $< $@ |
2370 | hidnplayr | 322 | .sdk: |
2375 | hidnplayr | 323 | mkdir -p .sdk |
2370 | hidnplayr | 324 | # Rules for media/ac97snd |
325 | AC97DIR=$(PROGS)/media/ac97snd |
||
326 | media/ac97snd: .obj.ac97snd/ac97snd.exe |
||
2375 | hidnplayr | 327 | $(msvc_final) |
2370 | hidnplayr | 328 | .obj.ac97snd/ac97snd.exe: .obj.ac97snd/ac97wav.obj .obj.ac97snd/crt.obj .obj.ac97snd/k_lib.obj \ |
2375 | hidnplayr | 329 | .obj.ac97snd/mpg.lib .sdk/sound.lib $(AC97DIR)/ufmod.obj |
330 | $(msvc_link) |
||
2370 | hidnplayr | 331 | .obj.ac97snd/ac97wav.obj: $(AC97DIR)/ac97snd/ac97wav.c \ |
2375 | hidnplayr | 332 | $(AC97DIR)/kolibri.h $(AC97DIR)/ac97snd/ac97wav.h $(AC97DIR)/mpg/mpg123.h \ |
333 | $(AC97DIR)/sound.h $(AC97DIR)/ufmod-codec.h Makefile.msvc | .obj.ac97snd |
||
334 | $(msvc_compile) |
||
2370 | hidnplayr | 335 | .obj.ac97snd/crt.obj: $(AC97DIR)/ac97snd/crt.c $(AC97DIR)/ac97snd/crt.h Makefile.msvc | .obj.ac97snd |
2375 | hidnplayr | 336 | $(msvc_compile) |
2370 | hidnplayr | 337 | .obj.ac97snd/k_lib.obj: $(AC97DIR)/ac97snd/k_lib.asm $(AC97DIR)/ac97snd/proc32.inc | .obj.ac97snd |
2375 | hidnplayr | 338 | fasm $< $@ |
2370 | hidnplayr | 339 | AC97SND_MPG_C_FILES:=$(wildcard $(AC97DIR)/mpg/*.c) |
340 | AC97SND_MPG_H_FILES:=$(wildcard $(AC97DIR)/mpg/*.h) |
||
341 | AC97SND_MPG_C_OBJECTS:=$(patsubst $(AC97DIR)/mpg/%.c,.obj.ac97snd/%.o,$(AC97SND_MPG_C_FILES)) |
||
342 | .obj.ac97snd/mpg.lib: $(AC97SND_MPG_C_OBJECTS) .obj.ac97snd/pow.obj |
||
2375 | hidnplayr | 343 | win32-link /lib /ltcg /out:$@ $^ |
2370 | hidnplayr | 344 | $(AC97SND_MPG_C_OBJECTS): .obj.ac97snd/%.o: $(AC97DIR)/mpg/%.c $(AC97SND_MPG_H_FILES) Makefile.msvc | .obj.ac97snd |
2375 | hidnplayr | 345 | $(msvc_compile) |
2370 | hidnplayr | 346 | .obj.ac97snd/pow.obj: $(AC97DIR)/mpg/pow.asm $(AC97DIR)/mpg/proc32.inc | .obj.ac97snd |
2375 | hidnplayr | 347 | fasm $< $@ |
2370 | hidnplayr | 348 | .obj.ac97snd: |
2375 | hidnplayr | 349 | mkdir -p .obj.ac97snd>>>> |