Subversion Repositories Kolibri OS

Rev

Rev 2746 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2746 Rev 2777
Line 7... Line 7...
7
BUILD_DIR:=build
7
BUILD_DIR:=build
8
REPOSITORY:=../..
8
REPOSITORY:=../..
9
KERNEL:=$(REPOSITORY)/kernel/trunk
9
KERNEL:=$(REPOSITORY)/kernel/trunk
10
PROGS:=$(REPOSITORY)/programs
10
PROGS:=$(REPOSITORY)/programs
Line -... Line 11...
-
 
11
 
-
 
12
# The main goal: build kolibri.img and kolibri.iso
-
 
13
all: $(BUILD_DIR)/kolibri.img $(BUILD_DIR)/kolibri.iso
11
 
14
 
12
# Docpak requires some documents; we place them
15
# Docpak requires some documents; we place them
13
# into 'docs' subdir and communicate with FASM
16
# into 'docs' subdir and communicate with FASM
14
# through environment var DOCDIR.
17
# through environment var DOCDIR.
15
DOCDIR:=docs/
18
DOCDIR:=docs/
Line 268... Line 271...
268
 media/ac97snd:MEDIA/AC97SND \
271
 media/ac97snd:MEDIA/AC97SND \
269
 network/jmail:NETWORK/JMAIL network/zeroconf.ini:NETWORK/ZEROCONF.INI \
272
 network/jmail:NETWORK/JMAIL network/zeroconf.ini:NETWORK/ZEROCONF.INI \
270
#end of list
273
#end of list
271
#3d/logio.bmp:3D/LOGIO.BMP 3d/cubetext:3D/CUBETEXT
274
#3d/logio.bmp:3D/LOGIO.BMP 3d/cubetext:3D/CUBETEXT
Line -... Line 275...
-
 
275
 
-
 
276
# Generate skins list understandable by gnu make
-
 
277
Makefile.skins: $(REPOSITORY)/skins/authors.txt $(REPOSITORY)/data/generate_makefile_skins.sh
-
 
278
	cut -f1 $< | $(SHELL) $(REPOSITORY)/data/generate_makefile_skins.sh > $@
-
 
279
include Makefile.skins
272
 
280
 
273
# Extra targets for LiveCD image in the syntax of mkisofs
281
# Extra targets for LiveCD image in the syntax of mkisofs
274
MKISOFS_EXTRA:=\
282
MKISOFS_EXTRA:=\
275
 dosbox/=$(PROGS)/emulator/DosBox/dosbox \
283
 dosbox/=$(PROGS)/emulator/DosBox/dosbox \
276
 dosbox/=$(PROGS)/emulator/DosBox/dosbox.conf \
284
 dosbox/=$(PROGS)/emulator/DosBox/dosbox.conf \
277
 dosbox/=$(PROGS)/emulator/DosBox/readme.txt \
285
 dosbox/=$(PROGS)/emulator/DosBox/readme.txt \
278
 /=drivers/atikms \
286
 /=drivers/atikms \
-
 
287
 /=drivers/atikms.dll \
-
 
288
 /=distr_data/autorun.inf \
-
 
289
 /=distr_data/KolibriOS_icon.ico \
-
 
290
 /=distr_data/readme.txt \
-
 
291
 /=distr_data/readme_dos.txt \
279
 /=drivers/atikms.dll \
292
 Skins/=$(REPOSITORY)/skins/authors.txt \
Line 280... Line 293...
280
#end of list
293
#end of list
281
 
294
 
282
# Some macro for convenient work.
295
# Some macro for convenient work.
Line 319... Line 332...
319
 
332
 
320
 
333
 
Line -... Line 334...
-
 
334
endef
-
 
335
mcopy_all_items:=$(foreach f,$(targets_full),$(mcopy_item_command)$(newline))
321
endef
336
 
322
mcopy_all_items:=$(foreach f,$(targets_full),$(mcopy_item_command)$(newline))
337
# add skins to MKISOFS_EXTRA
323
 
338
MKISOFS_EXTRA:=$(MKISOFS_EXTRA) $(foreach f,$(SKIN_SOURCES),$(call imagepart,$(f))=$(call binarypart,$(f)))
324
# dependencies of MKISOFS_EXTRA; we iterate through $(MKISOFS_EXTRA),
-
 
325
# substitute "=" with space, get the 2nd word and join all results
-
 
326
mkisofs_extra_targets:=$(foreach f,$(MKISOFS_EXTRA),$(word 2,$(subst =, ,$(f))))
-
 
Line 327... Line 339...
327
 
339
# dependencies of MKISOFS_EXTRA; we iterate through $(MKISOFS_EXTRA),
328
# The main goal: build kolibri.img and kolibri.iso
340
# substitute "=" with space, get the 2nd word and join all results
329
all: $(BUILD_DIR)/kolibri.img $(BUILD_DIR)/kolibri.iso
341
mkisofs_extra_targets:=$(call respace,$(foreach f,$(MKISOFS_EXTRA),$(word 2,$(subst =, ,$(f)))))
330
 
342
 
Line 356... Line 368...
356
 
368
 
357
# The second goal: LiveCD image.
369
# The second goal: LiveCD image.
358
$(BUILD_DIR)/kolibri.iso: $(BUILD_DIR)/kolibri.img $(mkisofs_extra_targets)
370
$(BUILD_DIR)/kolibri.iso: $(BUILD_DIR)/kolibri.img $(mkisofs_extra_targets)
359
	mkisofs -U -J -pad -b kolibri.img -c boot.catalog -hide-joliet boot.catalog -hide-joliet kolibri.img -graft-points \
371
	mkisofs -U -J -pad -b kolibri.img -c boot.catalog -hide-joliet boot.catalog -hide-joliet kolibri.img -graft-points \
360
	-A "KolibriOS AutoBuilder" -p "CleverMouse" -publisher "KolibriOS Team" -V "KolibriOS r$(REV)" -sysid "KOLIBRI" \
372
	-A "KolibriOS AutoBuilder" -p "CleverMouse" -publisher "KolibriOS Team" -V "KolibriOS r$(REV)" -sysid "KOLIBRI" \
Line 361... Line 373...
361
	-iso-level 3 -o $(BUILD_DIR)/kolibri.iso $(BUILD_DIR)/kolibri.img $(MKISOFS_EXTRA) 2>&1
373
	-iso-level 3 -o $(BUILD_DIR)/kolibri.iso $(BUILD_DIR)/kolibri.img $(call respace,$(MKISOFS_EXTRA)) 2>&1
362
 
374
 
363
# Special targets to modify behaviour of make.
375
# Special targets to modify behaviour of make.
Line 364... Line 376...
364
.DELETE_ON_ERROR:
376
.DELETE_ON_ERROR:
365
.SUFFIXES: # disable all predefined rules
377
.SUFFIXES: # disable all predefined rules
366
 
378
 
Line 367... Line 379...
367
# The floppy bootsector.
379
# The floppy bootsector.
368
$(BUILD_DIR)/boot_fat12.bin: $(KERNEL)/bootloader/boot_fat12.asm $(KERNEL)/bootloader/floppy1440.inc
380
$(BUILD_DIR)/boot_fat12.bin: $(KERNEL)/bootloader/boot_fat12.asm $(KERNEL)/bootloader/floppy1440.inc
369
	fasm $(KERNEL)/bootloader/boot_fat12.asm $(BUILD_DIR)/boot_fat12.bin
381
	fasm $(KERNEL)/bootloader/boot_fat12.asm $(BUILD_DIR)/boot_fat12.bin
370
 
382
 
371
$(BUILD_DIR)/.dir 3d/.dir demos/.dir develop/.dir develop/info/.dir drivers/.dir fonts/.dir \
383
$(BUILD_DIR)/.dir 3d/.dir demos/.dir develop/.dir develop/info/.dir drivers/.dir fonts/.dir \
372
 games/.dir lib/.dir media/.dir network/.dir .deps/.dir:
384
 games/.dir lib/.dir media/.dir network/.dir allskins/.dir .deps/.dir:
373
	mkdir -p $(dir $@)
385
	mkdir -p $(dir $@)
Line 392... Line 404...
392
	cp $(KERNEL)/docs/sysfuncr.txt $(DOCDIR)SYSFUNCR.TXT
404
	cp $(KERNEL)/docs/sysfuncr.txt $(DOCDIR)SYSFUNCR.TXT
Line 393... Line 405...
393
 
405
 
394
# Similar for C--.
406
# Similar for C--.
Line -... Line 407...
-
 
407
include Makefile.cmm
-
 
408
 
-
 
409
# Recode some text files from native encoding aka cp866 to cp1251
-
 
410
distr_data/readme.txt: distr_data/readme_dos.txt
395
include Makefile.cmm
411
	iconv -f cp866 -t cp1251 $< > $@
396
 
412
 
397
# Sorry, even black magic seems to be insufficient for
413
# Sorry, even black magic seems to be insufficient for
398
# auto-handling all subtle effects. So we just define
414
# auto-handling all subtle effects. So we just define
399
# command lines for compiling and linking, and
415
# command lines for compiling and linking, and